Hi @abidg ,
Thanks for reaching out! It seems like you’re running into some performance issues due to the woocommerce_deliver_webhook_async
scheduled actions in WooCommerce. These actions are responsible for delivering webhook payloads asynchronously, but over time, they can build up and cause database bloat, slowing things down.
To resolve this, here’s what you can do:
- Go to WooCommerce > Settings > Advanced > Webhooks.
- Review the list of active webhooks and disable or delete any that are no longer needed or linked to plugins you’re not using anymore.
You can also install the WP Crontrol plugin (here) to better manage scheduled actions. After installing, go to Tools > Cron Events and search for the woocommerce_deliver_webhook_async
actions. You can manually delete any pending actions there to clear the backlog.
If you’d prefer, you can add this code switch to synchronous webhook delivery:
add_filter('woocommerce_webhook_deliver_async', '__return_false');
This code forces WooCommerce to deliver webhooks synchronously, bypassing the scheduling system. However, be aware that this may impact site performance, especially if webhook endpoints are slow to respond, as it could delay page loads for users.
If you’re comfortable with editing your site’s code, you can add this snippet to your child theme’s?functions.php
?file. Alternatively, for a safer method, you can use a plugin like?Code Snippets?to apply the code without directly editing your files.
If you’re looking to find the root cause of the excessive webhooks, try deactivating plugins one by one to see which one is generating them. Once you’ve identified the culprit, you might want to reconfigure or replace the plugin to avoid future issues.
After clearing the backlog, don’t forget to optimize your database to help with performance. The WP-Optimize plugin (here) can assist with that.
I hope this helps!