Automattic\WooCommerce\Internal\Admin
OrderMilestoneEasterEgg::init
Sets up the hooks.
Метод класса: OrderMilestoneEasterEgg{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$OrderMilestoneEasterEgg = new OrderMilestoneEasterEgg(); $OrderMilestoneEasterEgg->init(): void;
Список изменений
| С версии 10.9.0 | Введена. |
Код OrderMilestoneEasterEgg::init() OrderMilestoneEasterEgg::init WC 11.2.2
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 );
}