action_scheduler_enable_failed_action_cleanup
Filter whether failed actions are purged. Return false to disable failed action cleanup.
Использование
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.
По умолчанию: true
Список изменений
| С версии 4.0.0 | Введена. |
Где вызывается хук
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 );