WordPress.org

Ready to get started?Download WordPress

Forums

Paid Memberships Pro
[resolved] hook a function after successful payment for a subscription (3 posts)

  1. polle001
    Member
    Posted 6 months ago #

    I want to hook a function after a successful payment for a subscription. How to hook it right after the payment success and also how I get the subscription ID to use it .

    Thanks.

    http://wordpress.org/plugins/paid-memberships-pro/

  2. strangerstudios
    Member
    Plugin Author

    Posted 6 months ago #

    You want to use the pmpro_after_checkout hook. It passes the $user_id in and you'll have to lookup the order and/or membership level yourself.

    Here is the hook in action:
    https://github.com/strangerstudios/paid-memberships-pro/blob/dev/preheaders/checkout.php#L1018

    If you search for "pmpro_after_checkout", especially on gist.github.com or paidmembershipspro.com, you'll find some examples.

    Good luck.

  3. polle001
    Member
    Posted 6 months ago #

    Thank you.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.