This topic contains 4 replies, has 3 voices, and was last updated by Admin 1 month ago.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Stripe payment plugins for your WordPress site
· ·
Home › Forums › Stripe Payments Plugin › Action Hook not working.
This topic contains 4 replies, has 3 voices, and was last updated by Admin 1 month ago.
Hi guys, I been trying to find a way to use the hook action after a transaction has been made, but I couldn’t get it to work. It mention that a paramaeter is missing.
Following the error direction, it says that the argument is missing in the plugin’s file “process_ipn.php” in the line do_action( 'asp_stripe_payment_completed', $post_data, $charge );
Is there any way you can help me pointing me in the right direction?
Thank you in advance for your help!
That action hooks passes 2 arguments to the callback function. So make sure to catch it like the following example:
add_action ('asp_stripe_payment_completed', 'execute_my_custom_code', 10, 2);
function execute_my_custom_code ($post_data, $charge) {
//Do stuff here
}
This worked perfect!! Thank you
Where did you locate the add_action code?
The “add_action” code goes in your custom plugin/script.
You must be logged in to reply to this topic.