Categories
Woocommerce

How to display product price using shortcode

Here is the code snippet that you can use to create a shortcode and use it in any of your posts or pages to display the price of a specific product. You just have to specify the woocommerce product ID of that product like the given example. [woo_product_price id=20]

Categories
Woocommerce

How to show or hide ACF field based on Woocommerce order status

You may want to show different Advanced Custom Field group based on status of your Woocommerce order status. Here we discuss the steps you can take to achieve this easily. You should know two basic things before we get started. Woocommerce Order status types : Woocommerce orders are a custom post type and order status

Categories
Woocommerce

How to add text before or after price in WooCommerce

You can use the WooCommerce filter woocommerce_get_price_html and woocommerce_cart_item_price to add a string before or after the price in WooCommerce product and cart pages. Here is the code that you can copy and paste in your active theme’s functions.php file: You can use the above simple code snippet in your active theme, or use the

Categories
Woocommerce

CartFlows overwrites some WooCommerce templates and here is how you can overwrite them

Recently, I got a request to add additional text under the product name on the checkout page. It seemed an easy job. All I had to do was create a file at woocommerce/checkout/review-order.php in, the active theme’s directory. But it didn’t work. Because the CartFlow plugin was overwriting some WooCommerce templates. List of WooCommerce templates

Categories
Woocommerce

How to add, remove or customize any link from My Account menu in woocommerce

When you install Woocommerce on your website, it will automatically create My Account page for you. If you visit the My Account Page, you will see a customer account related menu links in it. Check out the screenshot below : Why change the My Account menu? There are scenarios when you may not need some

Categories
Woocommerce

Remove old items from cart when new items are added in woocommerce

Let’s say you want users to click a buy now button, and it should add a particular product with a certain quantity to the cart by removing all other items. That’s when you will need this code handy. Just paste it into the functions.php file of your currently active theme.