Automattic\WooCommerce\Internal\OrderReviews
Scheduler::init
Register hooks and filters.
Auto-called by the WC dependency container after instantiation.
Method of the class: Scheduler{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Scheduler = new Scheduler(); $Scheduler->init(): void;
Scheduler::init() Scheduler::init code WC 11.0.1
final public function init(): void {
add_action( 'woocommerce_order_status_completed', array( $this, 'handle_woocommerce_order_status_completed' ), 10, 1 );
// Catch every transition out of `completed` (cancelled, refunded,
// processing, on-hold, pending, failed, custom statuses…) so the
// pending email is unscheduled regardless of which status the order
// moves to.
add_action( 'woocommerce_order_status_changed', array( $this, 'handle_status_changed' ), 10, 3 );
add_action( 'woocommerce_trash_order', array( $this, 'handle_cancellation' ), 10, 1 );
add_action( 'woocommerce_before_delete_order', array( $this, 'handle_cancellation' ), 10, 1 );
}