1

A theme I'm using modified a woocommerce that I'd like undo in my child theme.

It's been added as shown:

function theme_setup(){ remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); add_action( 'woocommerce_before_main_content', 'mod_output_content_wrapper', 10 ); } 

How do I remove the add_action?

I tried just using remove_action, but that didn't work.

1 Answer 1

3

Found the answer here: http://code.tutsplus.com/tutorials/a-guide-to-overriding-parent-theme-functions-in-your-child-theme--cms-22623

<?php function child_remove_parent_function() { remove_action( 'woocommerce_before_main_content', 'mod_output_content_wrapper', 10 ); } add_action( 'wp_loaded', 'child_remove_parent_function' ); ?> 

Explanation is in the link.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.