I was trying to move the product title at Woocommerce single product page to different location. The accepted location is just under itemscope itemtype="http://schema.org/Product"
and i was trying to remove first the title from current location which is remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 50);
but not removed the title from current location.
Another problem is I can’t add product title to new location which I have used do_action( 'woocommerce_moved_product_title_position' );
and then add_action('woocommerce_moved_product_title_position', 'woocommerce_template_single_title', 60);
I am using Woocommerce 2.4.13 and WordPress 4.4.1
Please help me to solve this. It’ll be great for me.
Weirdly, you must call
remove_action
from inside a function.Just a suggestion that there are probably enough hooks without needing to add a custom
do_action()
in the templates.Run the remove_action inside a function doesn’t change anything , but change the priority work for me.
I give you an example:
Pay attention and try with differents priorities.