Hello there,
Good day!
Thank you for your kind words about our plugin! We’re glad to hear it’s working well for you.
Regarding the issue, here are the steps to resolve it:
Steps to Resolve:
- Ensure wp-cron is Disabled in wp-config.php:
Since you’re using server-side cron jobs, make sure that WordPress’s default wp-cron is disabled by adding the following line to your wp-config.php
file:
define('DISABLE_WP_CRON', true);
- Check Server-Side Cron Job Setup:
Verify that your server-side cron job is correctly configured to run the wp-cron.php
script. It should look something like this:
wget -q -O - "https://yourdomain.com/wp-cron.php?doing_wp_cron" > /dev/null 2>&1
Ensure it’s running at regular intervals (every 5-10 minutes) to trigger background tasks efficiently.
- Manually Trigger cwg_sync_instock_data:
If the cwg_sync_instock_data
action is not running properly, you can try manually triggering it. To do this, install the WP Crontrol plugin to view and manage scheduled tasks:
? Go to Tools > Cron Events and find the cwg_sync_instock_data event.
? Check the status of this action and try manually running it to see if it executes correctly.
- Check ActionScheduler Logs:
WooCommerce uses ActionScheduler to handle background processes. To review the status of these jobs: ? Go to WooCommerce > Status > Scheduled Actions.
? Filter the list by cwg_sync_instock_data.
? Check if the action is scheduled, pending, or failed.
? If it’s stuck, retry it manually and check the logs for any errors.
- Increase Server Cron Frequency:
Sometimes server cron jobs run at longer intervals, which might cause delays in ActionScheduler tasks. Ensure your server-side cron job is running frequently enough (e.g., every 5 minutes):
*/5 * * * * wget -q -O - "https://yourdomain.com/wp-cron.php?doing_wp_cron" > /dev/null 2>&1
- Check for Conflicting Plugins:
Ensure no other plugins are conflicting with the ActionScheduler. Sometimes caching plugins or security plugins may block or delay cron events.
Thanks!