Support » Plugin: PayPal IPN for WordPress » Updating WordPress table with hook not working..

  • Resolved schmutly


    not sure why my function isn’t working. Im triggering on payment status ‘Completed’ to paste the data in the array below into a new table.
    Can you see what i have done wrong?
    Thank you,

    add_action(‘paypal_ipn_for_wordpress_payment_status_completed’, ‘post_to_my_ipn_tbl’, 10, 1);
    function post_to_my_ipn_tbl($posted)
    global $wpdb;
    $table_name = $wpdb->prefix .”ipn_data_tbl”;
    $wpdb->insert( $table_name, array(‘payer_email’=>$payer_email,’first_name’ => $first_name,’last_name’ => $last_name ) );

Viewing 6 replies - 1 through 6 (of 6 total)
  • Oliver


    Hi @schmutly

    Thanks for your feedback, We are looking into this and will get back to you soon.




    Hi @schmutly ,

    The issue seems that you are trying to insert values which you have not assigned to those variables, nor they are available inside the function.
    try this and it will work fine.

    Let me know if you have any other questions or concerns.

    Thanks muchly Oliver.
    I will try that shortly. While waiting i went looking and came up with this (which works too) but now i need to process yours to see what i did wrong (to learn and understand)
    I came up with but i will go with your paste 🙂
    Thank you..will leave a review after this.
    ps where’s the “leave a support review” link again?

    • This reply was modified 1 year, 8 months ago by schmutly.


    Sounds great.
    Happy to help , Please mark the issue as resolved and we will really appreciate your feedback here.


    Oliver and Angell have always been extremely helpful even if we ask dumb questions.
    It’d be nice to borrow their brains for a day, I’d get a lot done.
    If you have issues with PayPal plugins or just PayPal in general these are the guys to goto 🙂
    Thanks again for the clean code

    Plugin Contributor angelleye


    Thanks for that awesome feedback! If you have a moment to leave it in the reviews section that would be great. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Updating WordPress table with hook not working..’ is closed to new replies.