woocommerce_before_main_content хук-событиеWC 1.0

Hook: woocommerce_before_main_content.

Использование

add_action( 'woocommerce_before_main_content', 'wp_kama_woocommerce_before_main_content_action' );

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

	// action...
}

Где вызывается хук

В файле: /templates/archive-product.php
woocommerce_before_main_content
woocommerce/templates/archive-product.php 29
do_action( 'woocommerce_before_main_content' );
woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php 201
do_action( 'woocommerce_before_main_content' );
woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php 252
do_action( 'woocommerce_before_main_content' );
woocommerce/templates/single-product.php 31
do_action( 'woocommerce_before_main_content' );

Где используется хук в WooCommerce

woocommerce/includes/class-wc-structured-data.php 29
add_action( 'woocommerce_before_main_content', array( $this, 'generate_website_data' ), 30 );
woocommerce/includes/class-wc-template-loader.php 355
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
woocommerce/includes/theme-support/class-wc-twenty-eleven.php 21
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-eleven.php 25
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-fifteen.php 22
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-fifteen.php 26
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-fourteen.php 22
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-fourteen.php 26
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-nineteen.php 24
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
woocommerce/includes/theme-support/class-wc-twenty-nineteen.php 27
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ), 10 );
woocommerce/includes/theme-support/class-wc-twenty-seventeen.php 22
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
woocommerce/includes/theme-support/class-wc-twenty-seventeen.php 25
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ), 10 );
woocommerce/includes/theme-support/class-wc-twenty-sixteen.php 21
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-sixteen.php 25
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-ten.php 21
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-ten.php 25
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-thirteen.php 22
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-thirteen.php 26
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-twelve.php 22
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' );
woocommerce/includes/theme-support/class-wc-twenty-twelve.php 26
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) );
woocommerce/includes/theme-support/class-wc-twenty-twenty-one.php 24
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
woocommerce/includes/theme-support/class-wc-twenty-twenty.php 24
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
woocommerce/includes/theme-support/class-wc-twenty-twenty.php 27
add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ), 10 );
woocommerce/includes/wc-template-hooks.php 30
add_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
woocommerce/includes/wc-template-hooks.php 47
add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );