before_woocommerce_init action-hookWC 1.0

Action triggered before WooCommerce initialization begins.

Usage

add_action( 'before_woocommerce_init', 'wp_kama_before_woocommerce_init_action' );

/**
 * Function for `before_woocommerce_init` action-hook.
 * 
 * @return void
 */
function wp_kama_before_woocommerce_init_action(){

	// action...
}

Where the hook is called

WooCommerce::init()
before_woocommerce_init
woocommerce/includes/class-woocommerce.php 930
do_action( 'before_woocommerce_init' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment

Where the hook is used in WooCommerce

woocommerce/src/Internal/Admin/Agentic/AgenticController.php 33
add_action( 'before_woocommerce_init', array( $this, 'on_init' ) );
woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php 150
add_action( 'before_woocommerce_init', array( $this, 'maybe_set_order_cache_group_as_non_persistent' ) );
woocommerce/src/Internal/Features/FeaturesController.php 146
add_filter( 'before_woocommerce_init', array( $this, 'register_additional_features' ), -9999, 0 );