• Resolved drmarvin2k5

    (@drmarvin2k5)


    Hi there.

    I apologize if this is a ridiculous question, but being that I am a very novice dev, especially with WP, I’m not sure what to do with “hooks”.

    I have added the hook info into the functions.php of the theme, commenting out the IPN values I don’t care about.

    I have changed the top of the code to the following:

    add_action(‘pbs_ipn_setup’, ‘pbs_ipn’, 10, 1);
    function pbs_ipn($posted) {

    Is this correct, and if so, how do I invoke it to get the values?

    Thanks in advance

    https://www.ads-software.com/plugins/paypal-ipn/

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter drmarvin2k5

    (@drmarvin2k5)

    That is excellent. Apparently I have been accessing DBs in WP the hard way. I may have to redo a few things. Otherwise, I got it to work. I thoroughly appreciate your help. Thanks so much!!!

    Plugin Contributor angelleye

    (@angelleye)

    Glad to hear it!

    Thread Starter drmarvin2k5

    (@drmarvin2k5)

    One last thing, and I know it’s not directly related to your plugin, but I’m curious if you happen to know if and how to access $_SESSION variables from within an action.

    Thanks for any help

    Plugin Contributor angelleye

    (@angelleye)

    As long as the session is current and loaded with values then the session vars should be available within your hook function code any time it’s triggered.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Creating Hook’ is closed to new replies.