Register the taxonomy for menus in WooCommerce

When registering taxonomies for your custom attributes, WooCommerce calls the following hook:

$show_in_nav_menus = apply_filters('woocommerce_attribute_show_in_nav_menus', false, $name);

So, for example, if your attribute slug was ‘size’ you would do the following to register it for menus:

add_filter('woocommerce_attribute_show_in_nav_menus', 'wc_reg_for_menus', 1, 2);

function wc_reg_for_menus( $register, $name = '' ) {
     if ( $name == 'pa_size' ) $register = true;
     return $register;
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Oopps, sorry. This discussion is closed.

If you are a paying customer and you are looking for Tech Support please post a ticket on our Support Tickets page and we will respond promptly.

If you are not a paying customer and you would like to post a pre-sale question or a quote request please use our Contact form.

Why did we close the discussion?

Many of the customers started reporting issues as comments instead of the ticketing system and this started delaying our response time.

We are making this change to serve our customers better. We have ramped up our support team and we are trying to get the reply out on the same day.

Thanks for understanding.