before_woocommerce_init
Action triggered before WooCommerce initialization begins.
Использование
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... }
Где вызывается хук
before_woocommerce_init
woocommerce/includes/class-woocommerce.php 836
do_action( 'before_woocommerce_init' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment
Где используется хук в WooCommerce
woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php 150
add_action( 'before_woocommerce_init', array( $this, 'maybe_set_order_cache_group_as_non_persistent' ) );