WooCommerce: Add Prefix / Suffix to Product Prices

Sometimes you may want to add a prefix or a suffix to your prices. It could be something like “From…”, “Only…”, “…tax free” and so on.

The first good news is this is very easy to do with a WooCommerce filter (remember, filters change the value of an existing variable, while actions add content). The second good news is that you don’t need to know PHP, just copy/paste my snippet or install a mini-plugin. Enjoy!

Continue reading WooCommerce: Add Prefix / Suffix to Product Prices

WooCommerce: Hide Prices on the Shop & Category Pages

Interesting WooCommerce customization here. A client of mine asked me to hide/remove prices from the shop page and category pages as she wanted to drive more customers to the single product pages (i.e. increasing the click-through rate).

As usual, a simple PHP snippet does the trick. I never recommend to use CSS to “hide” prices, as they would still be visible in the code – PHP stops the prices from loading, so they’re invisible to the user.

Continue reading WooCommerce: Hide Prices on the Shop & Category Pages

WooCommerce: Hide Price & Add to Cart for Logged Out Users

You may want to force users to login in order to see prices and add products to cart. That means you must hide add to cart buttons and prices on the Shop and Single Product pages when a user is logged out.

All you need is pasting the following code in your functions.php (please note: your theme may have overwritten some default WooCommerce functions, hence the code below may not work. Contact me if you need custom code). Enjoy!

Continue reading WooCommerce: Hide Price & Add to Cart for Logged Out Users

WooCommerce: Disable Variable Product Price Range $$$-$$$

You may want to disable the WooCommerce variable product price range which usually looks like $100-$999 when variations have different prices (min $100 and max $999 in this case).

With this snippet you will be able to hide the highest price, and add a “From: ” prefix in front of the minimum price. At the same time, variable products with a single price (i.e. all variations have the same price) will keep their original format, so won’t display the “From: ” prefix.

Simply paste the following code in your child theme’s functions.php and enjoy!

Continue reading WooCommerce: Disable Variable Product Price Range $$$-$$$

WooCommerce: How to Sync Products, Stock and Orders Between Several Stores

Running multiple WooCommerce stores can be a recipe for success, but keeping your products and stock levels synchronized across them can quickly turn into a nightmare.

Imagine the frustration of a customer trying to buy a product that shows “in stock” in one store, only to find it out of stock when they checkout. Yikes.

But fear not! This tutorial is your guide to conquering inventory chaos with product and stock syncing. We’ll dive into the amazing benefits of syncing your WooCommerce stores (e.g. products, stock, orders, etc.) so you can streamline your operations and watch your sales grow.

This multi-store functionality typically requires the use of additional plugins or services designed to manage multiple WooCommerce sites – one such solution is the WooMultistore plugin.

Continue reading WooCommerce: How to Sync Products, Stock and Orders Between Several Stores

WooCommerce: Get All Variations For A Given Product

When you deal with WooCommerce variable products and custom code, you may need to programmatically access all the variations based on a given (parent) product ID.

This post dives into the world of WooCommerce product variations and shows you two powerful PHP methods to retrieve all the variations associated with a specific product ID.

We’ll explore several approaches, and by the end, you’ll be equipped to effortlessly handle variations in your code, based on what exact output you need. Enjoy!

Continue reading WooCommerce: Get All Variations For A Given Product

WooCommerce, Shopify, Wix: A Step-by-Step Guide to Launching Your Ecommerce Business

Almost 25% of retail sales are expected to happen online by 2026, so you should create a web store if you run a small business. With the right tools, any merchant can start selling online. 

A good ecommerce website-building platform will let you list products, process payments, and organize shipping without leaving your home or store. 

But with so many platforms – WooCommerce, Shopify, Wix, and more – choosing the right one can feel overwhelming.

This guide focuses more on the steps that are required to publish your first ecommerce website with any of these solutions, so you can hit the ground running and start selling today!

Continue reading WooCommerce, Shopify, Wix: A Step-by-Step Guide to Launching Your Ecommerce Business

WooCommerce: Remove “incl. tax” “ex. tax” Labels From Cart / Checkout / Order Totals

Do you want to simplify your WooCommerce prices by removing confusing tax labels?

This code tutorial is your guide to removing the “incl. tax” and “ex. tax” labels from your cart, checkout, and order totals in WooCommerce when your “Prices entered with tax” tax option is set to “Yes, I will enter prices inclusive of tax“.

Whether you find them unnecessary or want to create a cleaner pricing display, this tutorial will walk you through two effective snippets to achieve this customization.

Enjoy!

Continue reading WooCommerce: Remove “incl. tax” “ex. tax” Labels From Cart / Checkout / Order Totals

WooCommerce: Hide Sale! Badge If Product Is Out Of Stock

If a product cannot be purchased because it is out of stock, why would you want to tell people that it’s on sale – only because it has a sale price?

That would probably clutter your shop and maybe get the customer to click on the wrong item just because it was standing out, only to find out they can’t purchase it!

So, let’s fix this little “design bug” in WooCommerce – let’s make sure the Sale! badge gets hidden in case the product is out of stock. Enjoy!

Continue reading WooCommerce: Hide Sale! Badge If Product Is Out Of Stock

WooCommerce: Set Different Currency For Manual Orders

Business Bloomer website sells in USD only for the time being, as that seems to be the standard for WordPress plugin / products stores.

However, I prefer to invoice clients in EUR (I also switch PayPal and Stripe keys on the go). Which means, I needed to find a way to “set” a different currency whenever I create a manual order (which, by default, is in USD). So, here’s the fix!

Continue reading WooCommerce: Set Different Currency For Manual Orders

Tax display by customer role?

In a WooCommerce store, I have two roles: Customer and Professional. In the WooCommerce options, I have selected to display prices in the cart and checkout with taxes included.

Now, I need for the Professional role to have the opposite setting, that in the cart and checkout the prices are displayed without taxes included.

Is there a way to modify that option depending on the role? If it is possible to do so, is there a filter or a clue from which I can start researching?

WooCommerce: Preparing Your Site for Black Friday / Cyber Monday

Black Friday and Cyber Monday (BFCM) are just around the corner. Is your WooCommerce site prepared? I hope so!

While time is running out, there are a number of things you can do to get ready. In this post, we’ll cover eight of the most important ones.

The potential of a Black Friday / Cyber Monday deal shouldn’t be underestimated. Indeed, many eCommerce sites report that a significant percentage of their annual revenue comes from sales during this brief period of time. 

Additionally, it’s important to remember that nearly all businesses run a BFCM sale, which means that anyone who doesn’t have an offer is missing out.

Before we jump into the eight important things you can do, a final note: failing to prepare may cost you a serious amount of missed revenue. Amazon, for example, stands to lose $13.22 million per hour of downtime! While that’s an extreme example, it is a reminder that downtime should be avoided as much as possible during once-a-year sales events.

Continue reading WooCommerce: Preparing Your Site for Black Friday / Cyber Monday

WooCommerce: How Hosting Impacts Scalability

Scalability is a vital factor to consider when setting up your WooCommerce store. It refers to the ability of your website to handle increased traffic and transactions as your business grows.

Essentially, it’s about accommodating growth without hampering site performance or user experience. If you foresee significant growth for your online store, scalability has to be one of your primary considerations from day one.

Hosting plays an integral part in ensuring scalability because as demand surges, server capabilities must keep up too. A scalable hosting solution will mitigate potential problems related to heavy traffic, and can upgrade resources accordingly to ensure smooth operation at all times.

If you’re a WooCommerce site owner and you are concerned about how well your setup can scale, read on for a rundown of the main aspects that matter when it comes to hosting, and the choices you have available.

Continue reading WooCommerce: How Hosting Impacts Scalability

WooCommerce: Getting Started As An Expert – A Complete Guide

If you’re looking to start your own ecommerce store, no platform does it better than WooCommerce.

WooCommerce is your path to online selling success. It’s a flexible, open-source e-commerce plugin specifically built for WordPress websites. 

From setting up and customizing your shop, to mastering orders and sales tracking, this complete guide will walk you through becoming an accomplished WooCommerce expert.

Read on for all the info you need to get the ball rolling!

Continue reading WooCommerce: Getting Started As An Expert – A Complete Guide

WooCommerce: “Bulk Edit” > Remove Categories @ Admin Products List

Go to WordPress Dashboard > Products, select more than one product, and then go to the Bulk Actions dropdown and choose “Edit“.

You’re now presented with a simple yet effective bulk edit window, where you can do basic product fields editing such as changing the price in bulk, assign the same tag in bulk, set a sale price percentage in bulk, and so on. You can even assign one or more categories to the selected products.

But wait – it seems you cannot remove product categories from all selected products, which is a bummer! Well, I’m not sure if this is a WooCommerce choice, but honestly it’s such a basic thing that I’m surprised there is no bulk edit option for that.

So, let’s fix this. Let’s add a custom select dropdown with a list of product categories – whenever a category is selected, this will be removed from all checked products. Enjoy!

Continue reading WooCommerce: “Bulk Edit” > Remove Categories @ Admin Products List

“Inconsistent tax settings” error

Entering prices exclusive of tax while displaying the shop price inclusive of price brings on this notification “Inconsistent tax settings”. Is this really a problem if a shop mostly sells in their own country? Okay, there could be some very small rounding problems, i guess. But i guess it’s mostly safe to enter prices exclusive tax to avoid tax changes. How do you handle this?

WooCommerce: Get Order Tax Percentage

You’d think WooCommerce had an easy way to get the order tax rate percentage, the same way as you can get almost everything inside the “order object” with a single line of PHP. Well, that’s not the case unfortunately.

The reason is that probably each order can have multiple tax rates, and that tax is not only applied to product prices, but also optionally to shipping, fees and more.

So, how do we get the list of tax rates in a WooCommerce order? Here’s a quick snippet that you can use – enjoy!

Continue reading WooCommerce: Get Order Tax Percentage

WooCommerce: Apply Discount to Cheapest Cart Item

If you run WooCommerce store promotions, this little snippet will help you with that. For example, how to run a “Buy 2 products, get one half off” or a “Buy 3 products, get the cheapest one for free” campaign?

The trick behind this workaround is to find the cheapest item by looping through the cart, and then to set its price so that it’s lower than the regular price. Enjoy!

Continue reading WooCommerce: Apply Discount to Cheapest Cart Item