This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function reth_run_cleanup() { | |
if ( ! as_next_scheduled_action( 'action_scheduler/cleanup_wp_comment_logs' ) ) { | |
as_schedule_single_action( gmdate( 'U' ) + ( 60 * MINUTE_IN_SECONDS ), 'action_scheduler/cleanup_wp_comment_logs' ); | |
} | |
} | |
add_action( 'init', 'reth_run_cleanup' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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: */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function expand_access_subscription_downloads( $is_download_permitted, $subscription ) { | |
if ( $subscription->has_status ( 'cancelled', 'expired' ) ) { | |
return true; | |
} | |
return $is_download_permitted; | |
} |