action_scheduler_unexpected_schedule_class │ action-hook │ WC 4.1.0

Fires when a stored schedule blob references a class Action Scheduler did not expect.

Usage

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(string)
The class that triggered the rejection.
$outer_class(string)
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.

Changelog

Since 4.1.0 Introduced.

Where the hook is called

ActionScheduler_ScheduleDeserializer::reject()
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 );

Where the hook is used in WooCommerce

Usage not found.