Automattic\WooCommerce\Internal\DataStores\Orders

CustomOrdersTableController::add_feature_definition()publicWC 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 9.7.1

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(),
		'plugins_are_incompatible_by_default' => true,
		'additional_settings'                 => array(
			$this->get_hpos_setting_for_sync(),
		),
	);

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