Question

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() {