Automattic\WooCommerce\Internal\Admin
OrderMilestoneEasterEgg::init
Sets up the hooks.
Method of the class: OrderMilestoneEasterEgg{}
No Hooks.
Returns
null. Nothing (null).
Usage
$OrderMilestoneEasterEgg = new OrderMilestoneEasterEgg(); $OrderMilestoneEasterEgg->init(): void;
Changelog
| Since 10.9.0 | Introduced. |
OrderMilestoneEasterEgg::init() OrderMilestoneEasterEgg::init code WC 10.9.1
final public function init(): void {
add_action( 'admin_enqueue_scripts', array( $this, 'handle_admin_enqueue_scripts' ) );
add_action( 'wp_ajax_wc_egg_dismiss', array( $this, 'handle_ajax_dismiss' ) );
add_action( 'wp_ajax_wc_egg_opt_out', array( $this, 'handle_ajax_opt_out' ) );
add_action( 'woocommerce_new_order', array( $this, 'clear_milestone_cache' ), 10, 0 );
add_action( 'woocommerce_update_order', array( $this, 'clear_milestone_cache' ), 10, 0 );
add_action( 'woocommerce_delete_order', array( $this, 'clear_milestone_cache' ), 10, 0 );
add_action( 'woocommerce_trash_order', array( $this, 'clear_milestone_cache' ), 10, 0 );
}