action_scheduler_enable_failed_action_cleanup filter-hookWC 4.0.0

Filter whether failed actions are purged. Return false to disable failed action cleanup.

Usage

add_filter( 'action_scheduler_enable_failed_action_cleanup', 'wp_kama_action_scheduler_enable_failed_cleanup_filter' );

/**
 * Function for `action_scheduler_enable_failed_action_cleanup` filter-hook.
 * 
 * @param bool $enabled Whether failed actions should be purged.
 *
 * @return bool
 */
function wp_kama_action_scheduler_enable_failed_cleanup_filter( $enabled ){

	// filter...
	return $enabled;
}
$enabled(true|false)
Whether failed actions should be purged.
Default: true

Changelog

Since 4.0.0 Introduced.

Where the hook is called

ActionScheduler_QueueCleaner::delete_old_actions()
action_scheduler_enable_failed_action_cleanup
woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueCleaner.php 162
$clean_failed = (bool) apply_filters( 'action_scheduler_enable_failed_action_cleanup', true );

Where the hook is used in WooCommerce

Usage not found.