• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

Stripe Plugins

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • My Downloads
  • Support
    • Support Forum
    • Forum Login
    • Forum Registration
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Topics / Action Hook not working.

[Resolved] Action Hook not working.

· ·

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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 16, 2018 at 5:37 pm #654

    DanielHQ
    Participant

    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!

    April 16, 2018 at 5:55 pm #655

    Admin
    Keymaster

    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
    }
    
    April 20, 2018 at 5:22 pm #666

    DanielHQ
    Participant

    This worked perfect!! Thank you

    January 17, 2019 at 11:45 am #1786

    kaparis
    Participant

    Where did you locate the add_action code?

    January 21, 2019 at 11:55 pm #1791

    Admin
    Keymaster

    The “add_action” code goes in your custom plugin/script.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Primary Sidebar

Search

Featured Addons and Extensions

  • Subscription Payments Addon
  • Secure Downloads Addon
  • Apple Pay and Google Pay

Addon Bundle

Stripe Payments Addon Bundle

Support Links

  • Support Forum
  • Forum Registration

Copyright © 2019 | Stripe Plugins | A member of the Tips and Tricks HQ family.