manpreetparisjewellers
Forum Replies Created
-
Hi Bunge, Thank you so much for your help!
Here is the code
add_filter( 'get_terms', 'ts_get_subcategory_terms', 10, 3 ); function ts_get_subcategory_terms( $terms, $taxonomies, $args ) { $new_terms = array(); // if it is a product category and on the shop page if ( in_array( 'product_cat', $taxonomies ) && ! is_admin() && is_shop() ) { foreach ( $terms as $key => $term ) { $termobj = get_term($term); if ( ! in_array( $termobj->slug, array( 'uncategorised') ) ) { //pass the slug name here $new_terms[] = $term; } } $terms = $new_terms; } return $terms; }
- This reply was modified 1 year, 9 months ago by manpreetparisjewellers.
I have latest version and instead of 147 line that was in change log it is in 153 line now. I have version 1.1.3.
Also this print warning in my error logs in every second
Attempt to read property “slug” on null in /home/public_html/wp-content/plugins/hide-categories-on-shop-page/wc-hide-categories-on-shop-page.php on line 153
- This reply was modified 1 year, 10 months ago by manpreetparisjewellers.
They said this is conflict with this plugin and I should contact you. When I deactivate the plugin the error goes away.
Thank you so much for quick reply. It shows me this error. It seems it is because we hide the category and some of the product appears from that category here.
Thank you for the response. Do you now when you will release that version with compatibility.
I tried everything and nothing worked for me. I found this person has the same issue but don’t know what worked for him.
Could you please let me know what solution that person opt.
Thank you so much
Hi I am having the same issue. Could you please tell me what was the cause of issue and how you resolved it?
Thank you so much! yes It helped us!
Thank you so much for your response!
We are using PHP 8.0.25.
Thank you for helping us!
Hi Team, Is that possible to get assistance with this problem.