Automattic\WooCommerce\Internal\DataStores\Orders

CustomOrdersTableController::add_feature_definitionpublicWC 1.0

Add the definition for the HPOS feature.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$CustomOrdersTableController = new CustomOrdersTableController();
$CustomOrdersTableController->add_feature_definition( $features_controller );
$features_controller(FeaturesController) (обязательный)
The instance of FeaturesController.

Код CustomOrdersTableController::add_feature_definition() WC 10.4.3

public function add_feature_definition( $features_controller ) {
	$definition = array(
		'option_key'                   => self::CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION,
		'is_experimental'              => false,
		'enabled_by_default'           => false,
		'order'                        => 50,
		'setting'                      => $this->get_hpos_setting_for_feature(),
		'default_plugin_compatibility' => FeaturePluginCompatibility::INCOMPATIBLE,
		'additional_settings'          => array(
			$this->get_hpos_setting_for_sync(),
		),
	);

	$features_controller->add_feature_definition(
		'custom_order_tables',
		__( 'High-Performance order storage', 'woocommerce' ),
		$definition
	);
}