The code in the hook is not running
-
Hi
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->query(
$wpdb->prepare(“UPDATE “.$wpdb->prefix.”utc_invoicesSET details
=%s WHERE invoice_id = %d”,
$payment_details,$invoice_id)
);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
paypal_ipn_for_wordpress_ipn_response_handler
paypal_ipn_for_wordpress_ipn_response_verified
paypal_ipn_for_wordpress_payment_status_completed
can you help me please !
- The topic ‘The code in the hook is not running’ is closed to new replies.