NooTheme Premium WordPress Theme › Forums › Yogi › Membership Package is shown as "Uncategorized" in Shop (Woocommerce v3.5.3)
- This topic has 4 replies, 3 voices, and was last updated 4 years, 8 months ago by
Jackie.
-
AuthorPosts
-
4 years, 8 months ago #1066882
Hi,
I have upgraded to Woocommerce v3.5.3 recently. All "Membership Package" products used to be hidden from Woocommerce Shop when using the Category view. However, it is now grouped under the default "Uncategorized" category which cannot be deleted (see photo-00.png, photo-01.png). And, "Uncategorized" is shown in WooCommerce Shop and nothing is displayed when clicking it (see photo-02.png & photo-03.png)
Kindly advise how to hide the "Membership Package" product type in the Shop page when the default view is "by Category" in WooCommerce Shop like before.
Thank you.
4 years, 8 months ago #1067026Hi,
Thanks for contacting us.
Your uploaded file got the error so we cannot see them.
Please send us with your image again. Then we will check, then feedback you soon.
Thank you.
NooTheme
4 years, 8 months ago #1067371Hi,
Here's the screenshots for your reference.
In fact, you can reproduce the issue as follows:
1. update to WooCommerce v3.5.3
2. update to the latest version of Yogi Theme v2.8.1
3. add a new "Membership Package"
4. go to WooCommerce Shop. The default "Uncategorized" will be shown and nothing will be shown when clicked this category.Thank you.
4 years, 8 months ago #1067372For some reasons, this forum cannot upload zip file. I combined all the screenshots here.
Attachments:
You must be logged in to view attached files.4 years, 8 months ago #1067431Hi again.
You can add this code to the end of this file /wp-content/themes/noo-yogi/functions.php file to hide the Uncategorized on the shop page.
/** Remove categories from shop and other pages * in Woocommerce */ function wc_hide_selected_terms( $terms, $taxonomies, $args ) { $new_terms = array(); if ( in_array( 'product_cat', $taxonomies ) && !is_admin() && is_shop() ) { foreach ( $terms as $key => $term ) { if ( ! in_array( $term->slug, array( 'uncategorized' ) ) ) { $new_terms[] = $term; } } $terms = $new_terms; } return $terms; } add_filter( 'get_terms', 'wc_hide_selected_terms', 10, 3 );
Please check it again.
Thanks.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.