Automattic\WooCommerce\Internal\Admin\Notes

CouponPageMoved::init()publicWC 1.0

Initialize our hooks.

Метод класса: CouponPageMoved{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$CouponPageMoved = new CouponPageMoved();
$CouponPageMoved->init();

Код CouponPageMoved::init() WC 7.3.0

public function init() {
	if ( ! wc_coupons_enabled() ) {
		return;
	}

	add_action( 'admin_init', [ $this, 'possibly_add_note' ] );
	add_action( 'admin_init', [ $this, 'redirect_to_coupons' ] );
	add_action( 'woocommerce_admin_newly_installed', [ $this, 'disable_legacy_menu_for_new_install' ] );
}