php – Is it possible to stop adjust_download_permissions from scheduling?


I’ve noticed with quite a few stores I manage that the actionscheduler_actions and actionscheduler_log are huge. After doing some research, it seemed to be the adjust_download_permissions job triggering hundreds of times every couple of minutes.

None of the stores actually sell downloadable products, but have a large number of Variable products – I applied the following snippet as a temporary measure to automatically cancel these tasks but I’m now seeing in excess of ~500k cancelled actions in the two mentioned tables

add_action( 'init', function() {
    as_unschedule_all_actions( 'adjust_download_permissions' );
} );

Is there a way of stopping this task from being scheduled altogether?

AspireP 8 months 2021-12-21T07:58:55-05:00 0 Answers 0 views 0

Leave an answer