Automattic\WooCommerce\Internal\Admin
Coupons::__construct()
Hook into WooCommerce.
Метод класса: Coupons{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Coupons = new Coupons(); $Coupons->__construct();
Код Coupons::__construct() Coupons:: construct WC 9.5.1
public function __construct() { if ( ! is_admin() ) { return; } // If the main marketing feature is disabled, don't modify coupon behavior. if ( ! Features::is_enabled( 'marketing' ) ) { return; } // Only support coupon modifications if coupons are enabled. if ( ! wc_coupons_enabled() ) { return; } add_action( 'admin_enqueue_scripts', array( $this, 'maybe_add_marketing_coupon_script' ) ); add_action( 'woocommerce_register_post_type_shop_coupon', array( $this, 'move_coupons' ) ); add_action( 'admin_head', array( $this, 'fix_coupon_menu_highlight' ), 99 ); add_action( 'admin_menu', array( $this, 'maybe_add_coupon_menu_redirect' ) ); }