Automattic\WooCommerce\Internal\CostOfGoodsSold

CostOfGoodsSoldController::add_feature_definitionpublicWC 1.0

Add the feature information for the features settings page.

Method of the class: CostOfGoodsSoldController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$CostOfGoodsSoldController = new CostOfGoodsSoldController();
$CostOfGoodsSoldController->add_feature_definition( $features_controller );
$features_controller(FeaturesController) (required)
The instance of FeaturesController to use.

CostOfGoodsSoldController::add_feature_definition() code WC 10.5.0

public function add_feature_definition( $features_controller ) {
	$definition = array(
		'description'                  => __( 'Allows entering cost of goods sold information for products.', 'woocommerce' ),
		'is_experimental'              => false,
		'enabled_by_default'           => false,
		'default_plugin_compatibility' => FeaturePluginCompatibility::COMPATIBLE,
	);

	$features_controller->add_feature_definition(
		'cost_of_goods_sold',
		__( 'Cost of Goods Sold', 'woocommerce' ),
		$definition
	);
}