Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8203149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:26:56+00:00 2026-06-07T07:26:56+00:00

I am trying to write a hook for s2Member : I have trouble with

  • 0

I am trying to write a hook for s2Member:

I have trouble with the following code:

eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action ("ws_plugin__s2member_after_paypal_notify", get_defined_vars ());
unset ($__refs, $__v); /* Unset defined __refs, __v. */
  1. What does eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do, especially &$$__v?

  2. I can’t find the source code for ws_plugin__s2member_after_paypal_notify. Is this supposed to be a class? How can I find the source code for this class?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:26:58+00:00Added an answer on June 7, 2026 at 7:26 am
    1. eval takes a string and then runs it as if it was PHP code. In this particular case, the code takes a string and manipulates it trying to insert some variable names or variable addresses. Eval is a very very bad practice and an antipattern. If you can – don’t use this plugin, as it is probably full of security holes.

    2. ws_plugin__s2member_after_paypal_notify is a hook. WordPress hooks are wonderful – it’s like an event in JavaScript. For example, if you click on something in the page, JavaScript fires the onclick event and anyone can attach to that event and run some code. WordPress hooks work the same way. Now when you run do_action ("ws_plugin__s2member_after_paypal_notify", get_defined_vars ()); any third-party plugins that you have installed can attach to it and perform an action.

    If you want to find bits of code that run on this action, look for add_action('ws_plugin__s2member_after_paypal_notify' ...) (this is how you attach to the hook), or simply for ws_plugin__s2member_after_paypal_notify in your wp-content directory (any plugin and/or theme can attach to this hook).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to write a GLOBAL CBT HOOK, this is My code, but my hooking
I m trying write code that after reset set up rrpmax as 3000. It
Trying to write a code at the moment that basically tests to see if
I am trying to write a pre-commit hook script that will alter a specific
I'm trying to write a post-commit hook for SVN, which is hosted on our
I am trying to learn python, I was trying write C/C++ code i used
I'm trying write a query to find records which don't have a matching record
I'm trying to write an SVN Post-Commit hook to generate javadoc on a webpage
I've been trying to write a DLL in C. Install hook sets up the
I'm trying to write a simple paint applet with Java, but I'm having trouble

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.