action_scheduler_enable_failed_action_cleanup хук-фильтрWC 4.0.0

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 Введена.

Где вызывается хук

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 );

Где используется хук в WooCommerce

Использование не найдено.