Skip to content
Advertisement

Tag: woocommerce

Hide item from array

I am showing the product categories on the WooCommerce thank you page using this piece of code: The code above shows all categories, but I need to hide a specific category. Is it possible to hide a specific category by ID in the above code? Answer Woocommerce uses main get_categories() function from Wordpress core. You can exclude any categories with

Transition of Woocommerce Percentage Review Chart to Numeric

On my website’s homepage, I use a chart that counts all Woocommerce reviews. These reviews are shown as a percentage for each rating (1 star, 2 star etc …). I need to change functionality to the total number of ratings for each rating section instead of the percentage and display stars instead of labels. Any advice? Now: Goal: Code of

Add product category in woocommerce archive/shop page

I’m trying to add the product category inside the product card in the woocommerce archive page. Right now it shows “Thumbnail” “Title” “Price” and “Add to cart button”. I’m using this function which should work if the variable “product” is set to the current product displayed. My Question: Is there a way to get the queried Product in this variable?

Advertisement