Here is a collection of tips, snippets, customizations and how-to tutorials to answer your biggest WooCommerce questions, curated by Rodolfo Melogli.
Please remember feedback is vital and that your social media shares, blog comments and WooWeekly newsletter sign ups help me understand which WooCommerce content works and which not, so that I can fine-tune my writing :)
Thank you in advance and enjoy!

While working for a freelance client I had to “detect” the cart item categories in order to apply some PHP customization.
So I thought – why not share with you how to display product categories in the Cart and Checkout? This adds a nice touch to those two vital pages, and prints a list of product categories under each cart item.
Also, I’m glad to introduce you to the amazing world of “wc_get_product_category_list“, a very handy WooCommerce PHP function!
Continue reading WooCommerce: Display Product Categories @ Cart & Checkout Pages

A freelance client sells two distinct products on the same website: a membership and an online course. Two different audiences, different formats and… different Terms & Conditions.
The goal was therefore to display the “Terms & Conditions” checkbox on the Checkout page based on the product in the cart. Once again, we’re going to use Conditional Logic. With that, the snippet is pretty easy to code!
Continue reading WooCommerce: Per-Product Terms & Conditions @ Checkout

You may need to add some “personalization” to your WooCommerce website homepage. For example, you could print a custom greeting based on the user’s IP address.
For that, you can use PHP and WooCommerce inbuilt MaxMind Geolocation integration (when enabled from the General Settings Tab, of course).
Detecting the current user country could be very useful for other tasks, such as disabling payment gateways and shipping methods, printing country-specific content and so on. Enjoy!
Continue reading WooCommerce: Detecting Current User Country (Geolocation)

Recently I was on a coaching call with a client and the “Free Sample” challenge came up. Client has 400+ products on the website and had no intention of adding a free variation to each product manually.
So, I promised to myself I was going to study a different approach. And today you get it for free – nice! Needless to say, a comment and a social media share are much appreciated. Enjoy!
Continue reading WooCommerce: Order a “Free Sample” @ Single Product Page

A freelance client hired me a while ago to display a “Continue Shopping” button on the Single Product Page, next to the Add to Cart. A simple way to send their users back to where they were coming from without clicking the “previous” button on the browser 🙂
Here’s how it’s done, featuring an awesome WordPress function called “wp_get_referer()”! Continue reading WooCommerce: “Continue Shopping” Button @ Single Product Page

The default WooCommerce Add to Cart “Quantity Input” is a simple input field where you can enter the number of items or click on the “+” and “-” to increase/reduce the quantity.
A freelance client hired me to turn that input into a “Select” drop-down. For their audience and UX requirements, it makes sense to let their customers choose the quantity from a drop-down instead of having to manually input the number.
Online there are complex snippets, but I decided to make things easier. The WooCommerce function responsible to generate the quantity input is called “woocommerce_quantity_input“.
Luckily, it’s a pluggable function – which means we can simply add this exact same function name to our child theme’s functions.php to completely override it. Enjoy!
Continue reading WooCommerce: Change Add to Cart Quantity into a Select Drop-down

Here’s the story: I’m working with one of my freelance clients and I need to show certain content in the Checkout (a product-specific “Terms and Conditions”) if such product is in the Cart.
Now, I’ve always looked for products in the Cart by “looping” through the Cart with a foreach (here, for example: Apply a Coupon Programmatically if a Product is in the Cart). But as I said, after some random research, I found out about another magic WooCommerce function: “find_product_in_cart()“. Which means finding a product in the Cart doesn’t require custom loops or complex PHP… it’s just a “one liner”. Enjoy!
Continue reading WooCommerce: Check if Product ID is in the Cart

This week’s snippet is a very easy – yet helpful – one. Many ecommerce entrepreneurs prefer to display a YouTube video instead of a static, boring, featured image and product gallery.
Of course, not all products are created equal. So, let’s see how to make this work for a specific product ID only. Enjoy!
Continue reading WooCommerce: Show Video Instead of Product Images

Efficient shipping options are a vital part of any successful WooCommerce store, but sometimes simplifying the checkout experience can significantly improve user satisfaction.
By hiding the shipping address form when local pickup is selected, you provide a cleaner, more intuitive checkout flow, reducing the risk of customers making incorrect selections or abandoning their carts altogether.
In this guide, I’ll show you how to use a simple PHP snippet to dynamically hide the shipping address on the WooCommerce legacy checkout when local pickup is chosen as the preferred option.
This approach not only enhances the user experience but also minimizes potential fulfillment errors. Whether you’re a store owner or developer working on custom WooCommerce solutions, mastering this tweak will help you offer a smoother, smarter checkout.
Let’s dive into the code that makes it happen!
Continue reading WooCommerce: Hide Shipping If Local Pickup Is Selected

Here’s a very simple snippet that achieves a very complex task – what if you wanted to force your Cart to charge a deposit or a fixed fee, no matter the cart total?
Well, thankfully WooCommerce is pretty flexible and a lot of workarounds can be found.
In this case, we will study two possible solutions: (1) a negative “cart fee” to make the total become e.g. $100 and (2) a filter to completely override the calculated cart total e.g. $100.
Sounds like Japanese? Great – here’s why you’re on Business Bloomer. Copy the snippet, apply it to your test WooCommerce site and see the magic happen – without knowing anything about coding!
Continue reading WooCommerce: Force Cart to Specific Amount (Deposit)

A correct email address is worth a thousand dollars, some ecommerce expert would say 🙂 So, you don’t want your WooCommerce checkout visitors to mess up with that, do you?
What about adding an “Email Verification” field? In this way, we can make sure they double check their entry – and also show an error message in case they don’t match!
Let’s see how I implemented this for a freelancing client of mine – I’m sure you will be grateful!
Continue reading WooCommerce: Add “Confirm Email Address” Field @ Checkout

A BloomerArmada fan had a nice challenge with a client – how to display the total amount of sales generated by a given coupon code?
So I managed to create this snippet, which adds a brand new column to the WooCommerce Coupon table view with “total sales” value in it for each coupon code – enjoy!
Continue reading WooCommerce: Calculate Sales by Coupon Code

Quite an interesting snippet this is! A client needed to show EACH quantity of the SAME product as separate lines (cart items) in the WooCommerce Cart & Checkout page.
At some stage, you might need that too – for different reasons maybe. So, let’s see how this is coded 🙂 Continue reading WooCommerce: Split Cart Items When Product Quantity > 1

Yes, there are many plugins that already achieve this. But my goal at Business Bloomer is to save you from plugin conflicts, delicate updates and to make you learn some PHP.
So, here’s how you can add, with a few lines of PHP, a minimum, maximum, increment and default value to your Add to Cart quantity input field on the single product and cart pages. Who knew it was this easy?
Continue reading WooCommerce: Edit Add to Cart Default, Min, Max & Step Product Quantity

We’ve already seen how to add First & Last Name to the “My Account” register form. Today, I want to expand a bit and show you how to add and save a select box.
Continue reading WooCommerce: Add Select Field to “My Account” Register Form