Tag: Woocommerce

Woocommerce: Display All Products Eligible For Coupons

Woocommerce: Display All Products Eligible For Coupons

If you are running Woocommerce for your online shop, there is a feature where you can set up coupons for your customers to use. If you want your coupons to be used only on certain products in your shop instead of shop-wide, you can also do so. Woocommerce allows you to add products of your choice to certain coupons, so that customers will be able to get discounts when they buy those products, given that they know what the coupon codes for those products are. This feature does not require any Woocommerce extensions, it's one of Woocommerce core features. There could be times when you want to allow your customers to filter products in your store and display only the ones that are eligible for coupons. One reason is to encourage your customers to buy those products instead of other products in your store. In my case, a client asks that all products on their store that are eligible for coupons...
Read More
Get Woocommerce Current Product Category In Single Product Page

Get Woocommerce Current Product Category In Single Product Page

First of all, Woocommerce products are stored on WordPress as custom post type (CPT) named 'product'. The product categories are custom taxonomy named 'product_cat'. Let's say you want to show a simple line of text that tells your visitors the shipping flat rate of a product, and you have different rates for different product categories. For an example, you have two different product categories in your shop, which you named them as tshirts and hoodies. Tshirts have shipping flat rate of $10.00 while hoodies have flat rate of $15.00. This is how you check for current product category (either tshirts or hoodies) on a single product page. This is used inside the loop. [crayon-5b72b920dd0bd620564196/] That's it!...
Read More