Automattic\WooCommerce\Internal\Features
FeaturesController::register_additional_features
Function to trigger the (now deprecated) woocommerce_register_feature_definitions
This function must execute immediately before the before_woocommerce_init is fired, so that feature compatibility declarations happening in that action find all the features properly declared already.
Method of the class: FeaturesController{}
Hooks from the method
Returns
null. Nothing (null).
Usage
$FeaturesController = new FeaturesController(); $FeaturesController->register_additional_features();
FeaturesController::register_additional_features() FeaturesController::register additional features code WC 10.6.2
public function register_additional_features() {
if ( $this->registered_additional_features_via_action ) {
return;
}
if ( empty( $this->features ) ) {
$this->init_feature_definitions();
}
/**
* The action for registering features.
*
* @since 8.3.0
*
* @param FeaturesController $features_controller The instance of FeaturesController.
*
* @deprecated 9.9.0 Features should be defined directly in get_feature_definitions.
*/
do_action( 'woocommerce_register_feature_definitions', $this );
$this->init_compatibility_info_by_feature();
$this->registered_additional_features_via_action = true;
}