Automattic\WooCommerce\Internal\DataStores\Orders

CustomOrdersTableController::add_feature_definition()privateWC 1.0

Add the definition for the HPOS feature.

Method of the class: CustomOrdersTableController{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->add_feature_definition( $features_controller );
$features_controller(FeaturesController) (required)
The instance of FeaturesController.

CustomOrdersTableController::add_feature_definition() code WC 9.3.3

private 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
	);
}