Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

estore – post payment action hook

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › estore – post payment action hook

Tagged: code, hooks, Tweaks

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 2 months ago by admin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 11, 2015 at 11:59 pm #12341
    geektastic
    Participant

    Hi, I’m trying to get a custom php function to run at the end of a successful paypal checkout using the eestore plugin. I had a look at the post payment action plugin and tried to register my function to run using the same action hook (eStore_product_database_updated_after_payment) but i cant seem to get it to trigger all the time while testing. I’m using paypal in sandbox mode to test.

    Am i using the right hook to do this or is there a better way?

    Many Thanks.

    March 12, 2015 at 1:25 am #69083
    admin
    Keymaster

    There maybe a race condition happening between when the hook is being registered and when it is being triggered.

    Please show me how you have added the “add_action” call for that hook so I can see if it is being registered as early as possible.

    March 12, 2015 at 7:59 am #69084
    geektastic
    Participant

    I basically took the boiler plate plugin http://tommcfarlin.github.io/WordPress-Plugin-Boilerplate/ as a base and then under public hooks registered one for estore_product_database_updated_after_payment.

    $this->loader->add_action( ‘eStore_product_database_updated_after_payment’, $plugin_public, ‘custom_update_user’,10,2);

    March 12, 2015 at 8:56 pm #69085
    geektastic
    Participant

    I think i know what my issue is. The products i am selling take a reoccurring payment and looking in the code i think that the estore_product_database_updated_after_payment hook only gets run for non reoccurring payments?

    If so i think i need to hook into this hook (eStore_paypal_recurring_payment_received)?

    March 12, 2015 at 11:41 pm #69086
    admin
    Keymaster

    Yes, for the recurring payment notifications, you need to use the following hook. See example below:

    add_action('eStore_paypal_recurring_payment_received', 'my_custom_payment_tweak', 10, 2);
    function my_custom_payment_tweak($ipn_data, $cart_items)
    {
    //Do something here
    }

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ