Answer the question
In order to leave comments, you need to log in
How to use remove_action in child theme?
Hello everyone, I need to move the buy button and price tag from one place to another, I'm using a child theme from oceanwp, I write
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_add_to_cart', 10 );
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_price', 5 );
and remove_action does not work in any way, I googled, hung up on different hooks
add_action ('init', 'removeOldFunction');
remove_action( 'template_redirect', 'alienship_nice_search_redirect' );
}
and tried inserting
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
into different content-single-product files, incl. parent theme, does not work in any way, that just did not try, tell me what's wrong?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question