woocommerce_register_feature_definitions action-hookWC 8.3.0

The action for registering features.

Usage

add_action( 'woocommerce_register_feature_definitions', 'wp_kama_woocommerce_register_feature_definitions_action' );

/**
 * Function for `woocommerce_register_feature_definitions` action-hook.
 * 
 * @param FeaturesController $features_controller The instance of FeaturesController.
 *
 * @return void
 */
function wp_kama_woocommerce_register_feature_definitions_action( $features_controller ){

	// action...
}
$features_controller(FeaturesController)
The instance of FeaturesController.

Changelog

Since 8.3.0 Introduced.

Where the hook is called

FeaturesController::get_feature_definitions()
woocommerce_register_feature_definitions
woocommerce/src/Internal/Features/FeaturesController.php 262
do_action( 'woocommerce_register_feature_definitions', $this );

Where the hook is used in WooCommerce

woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php 149
self::add_action( 'woocommerce_register_feature_definitions', array( $this, 'add_feature_definition' ) );