By default, Woocommerce uses a different base permalink structure for product and shop. But suppose you want to be able to use the following URLs Shop: /products Shop category: /products/product-category/ Product: /products/product-category/product-name …then add the following permalinks programmatically to your functions.php
To apply a coupon on a Woocommerce price programmatically use the following function.
To show the wc_price() without formatted HTML use the following function:
For one of my projects I needed the original cart total price without the Cartflows product discounts. I created the following function to achieve this:
One of my clients needed different product prices for their users based on their role. His website included a user role for resellers who have to see lower prices than default customers. To modify the price based on the user role I needed 2 things to know: How to check the current user’s role? What […]
A customer of mine wanted to use the WooCommerce PDF Invoices & Packing Slips plugin, but wanted to make a small adjustment before he could use the plugin. WooCommerce PDF Invoices & Packing Slips plugin This WooCommerce extension automatically adds a PDF invoice to the confirmation email of the order that is sent to your […]