action_scheduler_unexpected_schedule_class
Fires when a stored schedule blob references a class Action Scheduler did not expect.
Использование
add_action( 'action_scheduler_unexpected_schedule_class', 'wp_kama_action_scheduler_unexpected_schedule_class_action', 10, 4 );
/**
* Function for `action_scheduler_unexpected_schedule_class` action-hook.
*
* @param string $offending_class The class that triggered the rejection.
* @param string $outer_class The outermost class in the blob.
* @param string[] $unexpected_classes Every class the blob names that is outside the safe set.
* @param bool $rejected Whether the blob was rejected (true) or allowed through in
* shadow mode (false). Always true for a structural rejection
* (top-level non-schedule or unwalkable graph), which shadow
* mode cannot relax.
*
* @return void
*/
function wp_kama_action_scheduler_unexpected_schedule_class_action( $offending_class, $outer_class, $unexpected_classes, $rejected ){
// action...
}
- $offending_class(строка)
- The class that triggered the rejection.
- $outer_class(строка)
- The outermost class in the blob.
- $unexpected_classes(string[])
- Every class the blob names that is outside the safe set.
- $rejected(true|false)
- Whether the blob was rejected (true) or allowed through in shadow mode (false). Always true for a structural rejection (top-level non-schedule or unwalkable graph), which shadow mode cannot relax.
Список изменений
| С версии 4.1.0 | Введена. |
Где вызывается хук
action_scheduler_unexpected_schedule_class
woocommerce/packages/action-scheduler/classes/ActionScheduler_ScheduleDeserializer.php 305
do_action( 'action_scheduler_unexpected_schedule_class', $offending_class, $this->outer_class, $this->potential_offenders, $rejected );