Stop runinng unwanted actions on WooCommerce

Add the following code to the functions.php to stop the action scheduler on the website.

function yourprefix_disable_action_scheduler() {

if ( class_exists( ‘ActionScheduler’ ) ) {

remove_action( ‘action_scheduler_run_queue’, array( ActionScheduler::runner(), ‘run’ ) );

}

}

add_action( ‘init’, ‘yourprefix_disable_action_scheduler’, 10 );

Now this will disable the running status of all events on the woocoommerce.

This may be done because may be WordPress website may slows down during some times after woo-commerce installation

Leave a comment

Your email address will not be published. Required fields are marked *