Change the “Duplicate product” capability in WooCommerce

WooCommerce has a nice feature which allows you to duplicate a product and create new products starting from there. This saves a lot of time to shop managers and administrators.

But they are the only two (roles) who can duplicate products by default.

What if somebody needs the same feature, like a vendor?

Continue reading Change the “Duplicate product” capability in WooCommerce

Hide checkout fields based on the products in the cart

You ask, i write! This post has been asked by sidharh in my other article about how to “Add a checkout field in WooCommerce only for specific roles“.

This time instead, we will hide checkout fields based on the products contained into your cart. you asked to add them instead to hide them, but it’s a lot quicker to add them all, and then hide them when they are not needed.

Let’s start!

Continue reading Hide checkout fields based on the products in the cart

Exclude related products by category or tag in WooCommerce

As you probably know, WooCommerce shows related products in the single product page and retrieves automatically them filtering products in the same categories and tags of the shown product.

This is a great feature in my opinion, but can be a double-edge sword when you have a lot of tags and/or categories in your shop, which ends to show unrelated products.

But the developers were smart and included two filters to allow you to filter by categories only or by tags only.

Continue reading Exclude related products by category or tag in WooCommerce

Hide the Ninja Forms Add-ons’ prices in the cart and checkout pages

I’ve been asked to write this article to show you how to hide the prices added by Ninja Forms Product Add-ons in the variations table on the checkout and cart page.

This was quite hard (not the code, but the regular expression, i’m a bit noob with regular expressions) but funny!

I chose to hide them with regular expressions. Why?

Continue reading Hide the Ninja Forms Add-ons’ prices in the cart and checkout pages