Avoid queue on init

This commit is contained in:
Mike Jolley 2019-04-24 13:00:23 +01:00
parent db67172b75
commit 618e98f4e0
1 changed files with 0 additions and 6 deletions

View File

@ -26,12 +26,6 @@ class WC_Marketplace_Updater {
* Schedule events and hook appropriate actions.
*/
public static function init() {
$queue = WC()->queue();
$next = $queue->get_next( 'woocommerce_update_marketplace_suggestions' );
if ( ! $next ) {
$queue->schedule_recurring( time(), WEEK_IN_SECONDS, 'woocommerce_update_marketplace_suggestions' );
}
add_action( 'woocommerce_update_marketplace_suggestions', array( __CLASS__, 'update_marketplace_suggestions' ) );
}