Hey @portailpsc – thank you a lot for your message, as well as for using our plugin. 🙂
In case the webhook triggers multiple times, that means you have any third-party plugin installed that re-saves the user while the user is saved. Unfortunately, this is commonly used to save additional data, which causes the trigger to fire multiple times.
At the moment, we do not have a predefined functionality that allows you to filter all of them and fire only one since this would be against the standards.
Still, it is possible to do with some custom code by filtering the post-delayed triggers using the following filter:
$triggers = apply_filters( 'wpwhpro/post_delay/post_delay_triggers', $this->post_delay_triggers );
How it works is that we, by default, delay all outgoing triggers and fire them before WordPress finished loading everything via PHP.
You can then use this filter to only really trigger the last one you want to fire.
We are looking forward of building an integration for that, but it requires some more testing since it can cause a lot of problems if not correctly applied.
If you have further questions, please let me know.
Hi @ironikus !
Thanks for this quick answer! Where should I paste this piece of code? In the class-wp-webhooks-pro-post-delay.php? It’s the only PHP file I’ve found that makes sense – I think. And where in this file do I need to write it?
EDIT : Sorry, I misunderstood your answer and I just found this filter in the PHP code. I do not have the skills to create custom code so I think I’ll wait until, I hope, a solution will be integrated.
Thank you very much for you support!
-
This reply was modified 5 years, 9 months ago by
portailpsc.
Hey @portailpsc – thank you for your answer and no worries, it’s amazing that you took the time to re-edit your answer. 🙂
A small side-note: I added that feature higher on our priority list – once we have something ready, I will prioritize it for the launch so that you do not have to wait too long. 🙂
If you have further questions, feel free to reach out at any time.
Awesome! Thanks!
And I just noticed that wp-webhook does a better job for transiting WooCommerce Membership data than the official WooCommerce Zapier extension. As soon as our renewal expires, I subscribe to the pro version of wp-webhook!
Hey @portailpsc – thank you a lot for your feedback, it’s highly appreciated!
If I can be again of your service, feel free to reach out at any time. 🙂