WooCommerce: Hide Shipping Rates if Free Shipping Available

If Free Shipping is available, you possibly don’t want to show the other premium shipping options. WooCommerce shows by default all shipping rates that match a given shipping zone, so it’s not possible to achieve this from the settings alone.

Thankfully, the “woocommerce_package_rates” filter allows us to manipulate the shipping rates before they are returned to the frontend. In this example, we will disable all shipping methods but “Free Shipping” so that free shipping remains the only possible choice.

Here’s the code to add to your functions.php. Enjoy!

Continue reading WooCommerce: Hide Shipping Rates if Free Shipping Available

WooCommerce: Add Checkout Payment Section Heading

There are a couple of reasons why the default WooCommerce checkout page doesn’t have a separate heading for the payment section.

One is about design; WooCommerce might be aiming for a clean and uncluttered checkout process. A dedicated heading might add visual weight to the page, potentially making it feel more complex. By omitting the heading, they keep the focus on the actual payment fields.

The other is about logic: the order of information on the checkout page is designed to be logical. Shipping information naturally follows the billing address section, and most users inherently understand this as the payment section.

However, the lack of a heading can be a point of contention. Some users might prefer a clearer distinction between sections. And a call to action above the payment options can maybe help you convert better.

Let’s do it.

Continue reading WooCommerce: Add Checkout Payment Section Heading

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: Send Pending Order Email Automatically

The “Customer invoice / Order details” WooCommerce email notification is often used for manually sending payment requests to customers – it’s not automatically triggered like other WooCommerce emails. You can access it from the individual order screen under the “Order Actions” section.

In certain cases, however, you’d want to make it automatic. And I don’t know why it’s not like that by default. So, let’s fix it: if you create a manual order from the backend, set it as pending, add some products to it and “Save”, the email notification will trigger on its own thanks to the snippet below. Enjoy!

Continue reading WooCommerce: Send Pending Order Email Automatically

WooCommerce: Read-only Checkout Fields

Especially for B2B sites, it’s likely that customers are managed by the store admin and are not allowed to change their billing/shipping address unless they request to update it.

But even if you’re simply curious, there is a way to turn each checkout field into read-only inputs. In this way, the saved billing and shipping address will load, and the logged in customer won’t be able to change any data before checkout.

A little note: country and state are dropdowns, and this means adding the “readonly” attribute won’t stop you from changing the selected value. However, if we turn all fields to input type “text”, this problem will go away. And this is why you find two statements in the snippet below; first we turn the field into a text input, and then we make it read-only.

Enjoy!

Continue reading WooCommerce: Read-only Checkout Fields

WooCommerce: Split Cart Into Packages

There are a million plugins out there that allow you to make the most of WooCommerce “cart packages” – this is a short way to say that you have the chance to assign cart items to multiple “packages“, so that the customer can pick different shipping methods for each package.

For example, imagine you sell products that are only available for “pick up in store“, and others that are shippable. By splitting the cart into 2 packages, the customer can place both product types in the same cart, but will be able to choose “Local pickup” for package 1 only, while for package 2 they’ll select one of the available delivery rates.

Splitting the cart into multiple packages is as easy as looping through the cart items, and assigning them to its own package array based on shipping class. Enjoy!

Continue reading WooCommerce: Split Cart Into Packages

WooCommerce: The Importance of Personalization in Corporate Gifting

For businesses to thrive in the modern marketplace, fostering meaningful relationships is crucial. One strategy that stands out decidedly among others within the corporate communication domain is personalization, especially when it relates to gifting.

Corporate gifting with a personalized touch speaks volume about how deeply you value your associations. It’s not just about remembering their names or roles, and in fact it goes beyond that. Knowing their preferences and choosing gifts accordingly make each recipient feel genuinely valued and thereby strengthens bonds even further.

This level of meticulous attention demonstrates thoughtful professionalism, leaving a long-lasting impression on recipients’ minds.

So an endeavor as simple as personalized corporate gifting done effectively has the potential to positively impact both professional relationships and your business identity as well. Let’s look at how WooCommerce store owners can cater to this market successfully.

Continue reading WooCommerce: The Importance of Personalization in Corporate Gifting

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: 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 Development: 8 Trends & Advancements

In the sphere of WooCommerce development, innovation continues at a breakneck pace, so it’s important for businesses to stay updated on current trends and advancements.

From enhancing in-app customer support solutions to embracing AI (Artificial Intelligence), sustainability practices, and voice search optimization, the future is packed with possibilities. 

To improve your understanding of what lies ahead, read on as we provide you with insightful knowledge about significant trends shaping this field.

Our goal is to make you learn at least one new thing about the future of WooCommerce and the ecommerce ecosystem – feel free to share what that is in the comments!

Continue reading WooCommerce Development: 8 Trends & Advancements

WooCommerce: How to Generate a Proof of Income When Self-Employed

If you’re self-employed, proving your income can seem like an impossible task. Traditional employees have their pay stubs and W2 forms to easily verify their earnings, but what about those treading the path of independent work or owning a business?

By understanding how to generate proof of income effectively, you maintain optimal financial transparency and increase your chances of securing partnerships, loans, or leases with ease. 

And when your own business runs on WooCommerce, tools like the WooCommerce Analytics dashboard can be very beneficial in regard to income tax calculations. 

In this guide, we explore various means at your disposal for generating reliable proof of self-employment income bolstered by insights provided by WooCommerce Analytics.

Continue reading WooCommerce: How to Generate a Proof of Income When Self-Employed

WooCommerce: Anonymize All Users & Orders

Especially when you need to let other people (such as developers) log in to your WooCommerce website, you may want to protect the identity of your customers and your order details.

Of course, anonymizing your WooCommerce backend requires a complete database override – this change is 100% irreversible! Only run this code if you know what you’re doing.

The ideal workflow is the following: you give developers access to a staging/clone website version, you run this custom code to anonymize customers and orders, and have them do the changes. This is good for GDPR, CRPA and PIPEDA as well: third party people won’t see sensitive data.

One more note: I haven’t tested the code with thousands of customers and orders – feel free to leave a comment in case your (staging) website crashes. Enjoy!

Continue reading WooCommerce: Anonymize All Users & Orders

WooCommerce: How To Make Your Site Legally Compliant

Ensuring legal compliance is essential for WooCommerce businesses since it safeguards both the company and its customers.

Compliance with appropriate laws and regulations helps to avert penalties, legal disputes, and poor customer experiences – while establishing a strong reputation in the market. 

Moreover, legal compliance demonstrates professionalism and trustworthiness to your customers, fostering a trustworthy shopping environment. 

Therefore, investing the time and effort into making your WooCommerce site legally compliant is not only essential but also highly beneficial for your long-term success.

Continue reading WooCommerce: How To Make Your Site Legally Compliant

WooCommerce: Allow Order Editing For Custom Order Status

WooCommerce admins are allowed to “edit” an order only when this is in the “on hold” or “pending payment” status. By “edit” I mean having the chance of modifying or adding products, fees, shipping and recalculating the totals, which are not allowed once the order has been placed (“processing“, “completed“, etc.).

However, there are many reasons why you’d want to have the right to edit a processing, completed, or custom status order – of course as long as you don’t end up changing the total, as customers already paid at that stage.

Think about the following scenarios:

  • you customized the items table and added a custom field, and you want to set the custom field value when the order is “processing
  • you need to edit the shipping method name AFTER checkout, and you want to be able to rename it when the order is “completed
  • you need to add a fee and a discount of equal amounts (so that the total stays the same) before completing the order

Either way, let’s enable the little “pencil icon” on a custom order status, so that the admin can customize the order whenever they wish!

Continue reading WooCommerce: Allow Order Editing For Custom Order Status

WooCommerce: How to Level Up Your Email Marketing

In today’s competitive ecommerce landscape, email marketing plays a crucial role in connecting with customers and driving business growth.

With WooCommerce, you already have a powerful platform at your disposal to send and manage transactional emails effectively. However, when you need to send targeted marketing emails, additional plugins may be necessary. 

In this article, we’ll guide you through the process of optimizing your email marketing strategy using WooCommerce.

Whether you’re a seasoned email marketer or just getting started, we’ll explore actionable tips and practical techniques to help you level up your communication game.

So, let’s jump right in!

Continue reading WooCommerce: How to Level Up Your Email Marketing

WooCommerce: Disable Checkout Field Autocomplete

By default, WooCommerce adds the “autocomplete” attribute to almost all checkout fields. For example, “billing_phone” has “autocomplete=tel”, “billing_country” has “autocomplete=country” and so on.

When logged out or if the logged in user has never done a purchase before, the WooCommerce Checkout page fields are possibly autofilled by the browser based on saved data / addresses.

Today, we’ll take a look at how to disable this autofill behavior, so that the customer is forced to enter data inside an empty input, and maybe in this way you can apply your custom validation or pattern, such as a specific phone number format. Enjoy!

Continue reading WooCommerce: Disable Checkout Field Autocomplete

WooCommerce: Disable Orders Table Row Hyperlink @ Admin

If you access the WordPress dashboard and go to WooCommerce > Orders, you will be presented with the WooCommerce “Orders Table” i.e. the list of customer orders. Each row comes with several columns, such as the order number, order date, order status, order billing and shipping addresses and more.

What’s annoying sometimes is that the whole row is a clickable link, so if you need to copy and paste some information you will end up actually clicking on it, and being redirected to the single order page.

There is a way to add a specific “class” to each table row, so that it becomes not clickable, and the only link that remains is the very first column table cell – the order number (as it should be by default!).

So, let’s see how easy it is to alter this default behaviour. Enjoy!

Continue reading WooCommerce: Disable Orders Table Row Hyperlink @ Admin

WooCommerce: Change Address Format For a Specific Country

We’ve already covered a little about address formats when we added a custom House Number field to the WooCommerce Checkout page.

Address formats define the way Billing and Shipping addresses are formatted for the end user. Addresses show on the order received / thank you page, on transactional emails and on some My Account pages, and look like this:

{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}

Now, what if you wanted to move the “company” before the customer name, or maybe have “address 1” and “address 2” on the same line, or move “postcode” to the last line? Well, thankfully there is a neat WooCommerce filter called “woocommerce_localisation_address_formats” that allows us to do just that – reformat any address for any country we wish. Enjoy!

Continue reading WooCommerce: Change Address Format For a Specific Country

WooCommerce: Refresh Checkout Upon Any Input Field Change

You may be aware that the WooCommerce Checkout page “order review” section reloads/refreshes every time there is a change of address – in this way shipping, taxes and optional fees are properly recalculated and customers are returned with the correct total.

But in case you add custom checkout fields that may cause a difference in pricing, or you want to keep the checkout UX consistent, or you have some other kinds of logic, it may be useful to refresh the order review section after a change on any checkout field. Enjoy!

Continue reading WooCommerce: Refresh Checkout Upon Any Input Field Change