Automattic\WooCommerce\Internal\Features

FeaturesController::__construct()publicWC 1.0

Creates a new instance of the class.

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

Хуков нет.

Возвращает

null. Ничего.

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

$FeaturesController = new FeaturesController();
$FeaturesController->__construct();

Код FeaturesController::__construct() WC 7.1.0

public function __construct() {
	$features = array(
		'analytics'           => array(
			'name'               => __( 'Analytics', 'woocommerce' ),
			'description'        => __( 'Enables WooCommerce Analytics', 'woocommerce' ),
			'is_experimental'    => false,
			'enabled_by_default' => true,
		),
		'new_navigation'      => array(
			'name'            => __( 'Navigation', 'woocommerce' ),
			'description'     => __( 'Adds the new WooCommerce navigation experience to the dashboard', 'woocommerce' ),
			'is_experimental' => false,
		),
		'custom_order_tables' => array(
			'name'            => __( 'High-Performance order storage (COT)', 'woocommerce' ),
			'description'     => __( 'Enable the high performance order storage feature.', 'woocommerce' ),
			'is_experimental' => true,
		),
	);

	$this->legacy_feature_ids = array( 'analytics', 'new_navigation' );

	$this->init_features( $features );

	self::add_filter( 'updated_option', array( $this, 'process_updated_option' ), 999, 3 );
	self::add_filter( 'added_option', array( $this, 'process_added_option' ), 999, 3 );
	self::add_filter( 'woocommerce_get_sections_advanced', array( $this, 'add_features_section' ), 10, 1 );
	self::add_filter( 'woocommerce_get_settings_advanced', array( $this, 'add_feature_settings' ), 10, 2 );
	self::add_filter( 'deactivated_plugin', array( $this, 'handle_plugin_deactivation' ), 10, 1 );
	self::add_filter( 'all_plugins', array( $this, 'filter_plugins_list' ), 10, 1 );
	self::add_action( 'admin_notices', array( $this, 'display_notices_in_plugins_page' ), 10, 0 );
	self::add_action( 'after_plugin_row', array( $this, 'handle_plugin_list_rows' ), 10, 2 );
	self::add_action( 'current_screen', array( $this, 'enqueue_script_to_fix_plugin_list_html' ), 10, 1 );
	self::add_filter( 'views_plugins', array( $this, 'handle_plugins_page_views_list' ), 10, 1 );
}