I want to change the product tags in woocommerce to display as hierarchical.
I tried to look for a function or a hook to change this but can’t find any.
Will appreciate any help or suggestion to accomplish this.
Thank you.
I want to change the product tags in woocommerce to display as hierarchical.
I tried to look for a function or a hook to change this but can’t find any.
Will appreciate any help or suggestion to accomplish this.
Thank you.
You must be logged in to post a comment.
Tested on woocommerce 3.0.4
Found the solution, here it is if someone is looking to do the same:
init action with a late priority so other taxonomies are loaded
add_action(‘init’, ‘reregister_taxonomy_pro_tags’, 9999);
Thanks for the above answer saved me a ton of research but you should replace
to
Here’s how I did it for WooCommerce 3.4.5 (and WordPress 4.9.8). This is based on @user2293554’s answer.
The
args['hierarchical'] != true
condition is needed so we don’t get stuck in a loop, as theregistered_taxonomy
action will get called again.