S
S
Serge W2021-06-12 12:56:44
WordPress
Serge W, 2021-06-12 12:56:44

Why doesn't remove_action() work?

Hello! I need to make changes to a product card in a woocommerce plugin. For this I use the remove_action() function. I make changes to the functions.php file of the child theme, but they do not work.

function change_summary() {

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );

}

add_action( 'init', 'change_summary' );


I was looking for solutions on the net, but all the proposed options do not work, while new functions are successfully added to the hooks and work. Tried hooking to different events (including init, wp_loaded, plugins_loaded, woocommerce_single_product_summary with an earlier priority than all other functions), but nothing helps.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question