Condition function for a category of product - php

None of snippets are working for categoreis based query:
for specific product categories in woocommerce
Unset product tabs for specific product categories in woocommerce
or changing tab text for a particular category which is displayed as special product on display page or single product page.
Codes by LoicTheAztec are perfect as always but i dont know where i am going wrong.

Related

Advanced Custom Fields on Product Categories in Wordpress disappear when Category has Products applied to it

I can successfully get my Advanced Custom Fields to display on Category pages that don’t have Products applied to them. But as soon as I apply products to the category, then the Custom Fields stop displaying on the frontend.
Any ideas how I can retain the Custom Fields display and also show product listings on the Category pages?
Example page:
Category example URL
Example code that works when no products are applied:
<?php the_field(‘categtest1’); ?>
<?php the_field(‘richt’); ?>

Show variable product price according to taxonomy page in Woocommerce

I am working on a shop where I sell variable products.
Each product has 1 global attribute with 3-5 terms used as variants also. I used this code to show the default variant price on shop page and this one to change the price according to the selected variant on product page.
Attribute: Condition |
Terms: Ver1, Ver2, Ver3, Ver4, Ver5.
I have an archive page which can be accesed on localhost/condition/ver1 and show only the products with ver1 variant.
I would like:
When I go to the above page to display the price of that variant (Ver1) for all products.
When I click on a product from this page, take me to the product page with Ver1 like default variant selected.
I think this problems can be solved with term_link() but I'm not sure how to do it. Thank you!

Hide or remove the quantity field from WooCommerce Product filter in product-category page

Every time I click on a category, it directs to product-category/name_of_ category page. I have a sidebar that displays filters for products in that category.
By default, it shows the quantity of product that match the filters. I want to remove that quantity.
Please guide me.
Thanks.
Check with WOOF by Category, which have the ability for this

Display related products based on tags only in Woocommerce 3

By default Woocommerce on single product page displays related products based on category - related product slider will display the same category products.
Woocommerce documentation states this - "Related Products is a section on some templates that pulls products from your store that share the same tags or categories as the current product. These products cannot be specified in the admin, but can be influenced by grouping similar products in the same category or by using the same tags."
My shop has 2 categories - "men" and "women", so this Woocommerce related product condition does not work for me. My related products should be more specific, therefore I added tags.
So - I would like to display related products based on tags only, not on categories. How can I do that?
There have been similar questions on this forum, but none of the provided codes worked, maybe because of several Woocommerce updates.
Thank you!
This can be done with this little hooked function:
add_filter( 'woocommerce_get_related_product_cat_terms', 'remove_related_product_categories', 10, 2 );
function remove_related_product_categories( $terms_ids, $product_id ){
return array();
}
Code goes in function.php file of the active child theme (or active theme).
Tested and works.

All categories are not showing in Manage products?

After I click on Edit link in product grid. In categories section I am getting only one category. But I have lots of categories in store.
If I am going to add new product, all categories are showing.
Existing product, If I want to change subcategories. Its just showing only one always for every existing products.
Maybe these categories are not visible in the same storeview that the product is.

Categories