Automattic\WooCommerce\Internal\DataStores\Orders
CustomOrdersTableController::add_feature_definition
Add the definition for the HPOS feature.
Method of the class: CustomOrdersTableController{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$CustomOrdersTableController = new CustomOrdersTableController(); $CustomOrdersTableController->add_feature_definition( $features_controller );
- $features_controller(FeaturesController) (required)
- The instance of FeaturesController.
CustomOrdersTableController::add_feature_definition() CustomOrdersTableController::add feature definition code WC 9.9.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(), '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 ); }