• In my child theme functions.php I’ve got the below lines to unhook one action from the parent theme’s hooks.php and add another. My action is added, but the first one isn’t being removed. What’s wrong? Is doing this in functions.php not correct?

    remove_action( 'woocommerce_before_main_content', 'responsive_woocommerce_wrapper', 10 );
    add_action( 'woocommerce_before_main_content', 'my_responsive_woocommerce_wrapper', 10 );
    function my_responsive_woocommerce_wrapper() {
    	echo '<div id="content-woocommerce" class="grid col-940">';
    }

The topic ‘removing action from hooks.php’ is closed to new replies.