Closed tomdevlive closed 10 months ago
You can comment out the code that does the delete unused attachemnt cron here:
Locate the following lines in the acf-image-aspect-ratio-crop.php file:
if (!wp_next_scheduled('aiarc_delete_unused_attachments')) { wp_schedule_event( time(), 'daily', 'aiarc_delete_unused_attachments' ); }
add_action('aiarc_delete_unused_attachments', [ $this, 'delete_unused_attachments', ]);
and comment out:
// if (!wp_next_scheduled('aiarc_delete_unused_attachments')) { // wp_schedule_event( // time(), // 'daily', // 'aiarc_delete_unused_attachments' // ); // }
// add_action('aiarc_delete_unused_attachments', [ // $this, // 'delete_unused_attachments', // ]);
not the most graceful solution but it works
My server error log gets filled up with:
[02-Dec-2023 19:29:04 UTC] delete unused attachments cron [02-Dec-2023 19:29:04 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:09 UTC] delete unused attachments cron [02-Dec-2023 19:31:09 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:09 UTC] delete unused attachments cron [02-Dec-2023 19:31:09 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:10 UTC] delete unused attachments cron [02-Dec-2023 19:31:10 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:11 UTC] delete unused attachments cron [02-Dec-2023 19:31:11 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:11 UTC] delete unused attachments cron [02-Dec-2023 19:31:11 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:15 UTC] delete unused attachments cron [02-Dec-2023 19:31:15 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:31:18 UTC] delete unused attachments cron [02-Dec-2023 19:31:18 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:32:22 UTC] delete unused attachments cron [02-Dec-2023 19:32:22 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:32:22 UTC] delete unused attachments cron [02-Dec-2023 19:32:22 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:32:25 UTC] delete unused attachments cron [02-Dec-2023 19:32:25 UTC] user has disabled unused attachment deletion [02-Dec-2023 19:32:26 UTC] delete unused attachments cron [02-Dec-2023 19:32:26 UTC] user has disabled unused attachment deletion [02-Dec-2023 20:00:42 UTC] delete unused attachments cron [02-Dec-2023 20:00:42 UTC] user has disabled unused attachment deletion [02-Dec-2023 20:00:50 UTC] delete unused attachments cron [02-Dec-2023 20:00:50 UTC] user has disabled unused attachment deletion [02-Dec-2023 20:00:55 UTC] delete unused attachments cron [02-Dec-2023 20:00:55 UTC] user has disabled unused attachment deletion
It looks like the corn is fired sees that I have not enabled the Beta feature to remove unused attachemnts then logs it. Is there a way to disable this cron since I'm not using that feature? Is there a part of the code I could comment out?