Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jessLundie/0ff2249bb4ec93eba6b45dcf26f25913 to your computer and use it in GitHub Desktop.
Save jessLundie/0ff2249bb4ec93eba6b45dcf26f25913 to your computer and use it in GitHub Desktop.
Remove 'woocommerce_deliver_webhook_async` scheduled actions
/* Change the date forward to do them 10 days at a time until they were all gone */
DELETE FROM `wp_posts`
WHERE `post_type` = 'scheduled-action'
AND `post_title` = 'woocommerce_deliver_webhook_async'
AND `post_date_gmt` < '2019-05-09 00:00:00'```
/* Clean up the pm and comments: */
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
DELETE comments
FROM wp_comments AS comments
LEFT JOIN wp_posts wp ON wp.ID = comments.comment_post_ID
WHERE wp.ID IS NULL
/* Clear the cron events: */
UPDATE wp_options SET option_value = '' WHERE option_name = 'cron'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment