D
D
DeniSidorenko2019-04-06 09:12:27
WooCommerce
DeniSidorenko, 2019-04-06 09:12:27

WooCommerce how to unhook events from a hook?

Good afternoon, in WooCommerce where the product is displayed, there is such a hook

/**
 * Hook: woocommerce_before_main_content.
 *
 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
 * @hooked woocommerce_breadcrumb - 20
 * @hooked WC_Structured_Data::generate_website_data() - 30
 */
do_action( 'woocommerce_before_main_content' );?>

The description shows that it loads woocommerce_output_content_wrapper and woocommerce_breadcrumb . So the question is, how can I do to remove woocommerce_breadcrumb , since the output is not allowed in this place, and I output it in the right place through the <?php woocommerce_breadcrumb(); function itself; ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yanchevsky, 2019-04-06
@DeniSidorenko

Kind.
So?

remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question