• Hi
    I created a custom taxonomy with “product_cat” slug.
    This taxonomy is not appear in plugin settings to enable ordering.
    I know this is because of default product category slug in woocommerce. But i think it should be hidden if any woocommerce installed!
    I found this topic but not work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter HamidReza Abdipour

    (@abdipour)

    I found the solution,
    For who reach this topic use this filter to remove any taxonomy from exclude list:

    add_filter( 'yikes_simple_taxonomy_ordering_excluded_taxonomies', 'change_yikes_excluded_taxonomies', 10, 1 );
    
    function change_yikes_excluded_taxonomies( $excluded_taxonomies ) {
    	if (($key = array_search('product_cat', $excluded_taxonomies)) !== false) {
    		unset($excluded_taxonomies[$key]);
    	}
    	return $excluded_taxonomies;
    }

    Default excluded taxonomies:

    // Array of taxonomies we want to exclude from being displayed in our options.
    		$excluded_taxonomies = array(
    			'nav_menu',
    			'link_category',
    			'post_format',
    			'product_shipping_class',
    			'product_cat',
    			'product_type',
    			'edd_log_type',
    		);
    Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Thank you!

    -Tracy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘product_cat custom taxonomy’ is closed to new replies.