action_scheduler_allowed_nested_schedule_classes
Filters the list of classes that are permitted as nested properties of a schedule object.
The result of this filter is not memoized: this is deliberate, so that it can be changed if the context (including the current blog, in a multisite network) alters during the same request.
Usage
add_filter( 'action_scheduler_allowed_nested_schedule_classes', 'wp_kama_action_scheduler_allowed_nested_schedule_classes_filter' );
/**
* Function for `action_scheduler_allowed_nested_schedule_classes` filter-hook.
*
* @param string[] $default List of allowed nested class names.
*
* @return string[]
*/
function wp_kama_action_scheduler_allowed_nested_schedule_classes_filter( $default ){
// filter...
return $default;
}
- $default(string[])
- List of allowed nested class names.
Changelog
| Since 4.1.0 | Introduced. |
Where the hook is called
action_scheduler_allowed_nested_schedule_classes
woocommerce/packages/action-scheduler/classes/ActionScheduler_ScheduleDeserializer.php 124
$allowed_nested = (array) apply_filters( 'action_scheduler_allowed_nested_schedule_classes', self::DEFAULT_NESTED_CLASSES );