Support » Plugin: PayPal IPN for WordPress » The code in the hook is not running

  • elham94



    I have used this plugin to run some codes after receiving IPN,
    I have used this code with many hooks, and tried sandbox and live but the code is not running !

    function update_wc_order_status($posted) {
    if($posted[‘IPN_status’] == 1){
    echo ‘test’;
    global $wpdb , $user_ID;
    $invoice_id = $posted[‘invoice’];
    $payment_details = ‘json_encode( $p );’;
    $wpdb->prepare(“UPDATE “.$wpdb->prefix.”utc_invoicesSET details=%s WHERE invoice_id = %d”,

    update_user_meta($user_ID , ‘user_credit’ , $total);

    add_action(‘paypal_ipn_for_wordpress_ipn_response_handler’, ‘update_wc_order_status’, 10, 1);

    I used these hooks




    can you help me please !

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


    Hi @elham94,

    Thanks for writing us here. We are looking into this and will get back to you as quickly as we can.




    Hi There,

    I’m not sure what you are trying to achieve here. But after having our developer to look at your code. They suggested to use this code and amend as per your need. But the format should be the same.

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



    Hi Oliver, thank you for your response.

    I’m sorry for bothering you, it was an error in my code

    all work fine now.

    Thank you so much.



    I’m glad to hear things are working well for you now! As such, I am going to close this ticket now, but please feel free to respond here again or create a new ticket if you have any more questions or concerns.

    Also, we would love to know what you think of our product and customer support. If you have a moment to [ leave a review ] it would be greatly appreciated..


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The code in the hook is not running’ is closed to new replies.