WooCommerce: Calculate Shipping From Order Admin

WooCommerce offers hundreds of ways to calculate shipping costs at checkout. And until now, there wasn’t a single solution for doing it directly inside the admin order editor.

Your shipping setup may be perfect with zones, rates, conditions, and edge cases, yet when you manually create or edit an order, you still have to enter the shipping cost yourself.

Even worse, as a developer, you often find yourself explaining to store owners why WooCommerce can’t recalculate shipping from the admin.

In this article, we’ll explore why WooCommerce only calculates shipping on the frontend, why recalculating from the admin isn’t as simple as it seems, and the usual workarounds that tend to be painful. Finally, we’ll introduce a plugin that solves all of this frustration—a true game-changer for anyone managing orders.

Continue reading WooCommerce: Calculate Shipping From Order Admin

WooCommerce: Send Email When a Coupon Is Used

Coupons are often more than just discounts. They can represent affiliate partnerships, internal promotions, manual workflows, or campaigns that need tracking beyond basic WooCommerce reports. Yet, by default, WooCommerce doesn’t notify anyone when a coupon is actually redeemed in an order.

This code snippet solves that gap by sending a custom email whenever a specific coupon is used at checkout. You can notify an affiliate that their code was redeemed, alert yourself as the admin for tracking purposes, or inform a store manager that a manual action is required after purchase. The logic is simple, lightweight, and hooks directly into the “order complete” process, so it runs only when it matters.

Because it’s fully customizable, you can target one coupon or multiple coupons, change recipients dynamically, and tailor the email content to your workflow. If you rely on coupons as signals rather than just discounts, this snippet gives you immediate visibility without adding plugins or external services.

Continue reading WooCommerce: Send Email When a Coupon Is Used

WooCommerce: Save Order Currency Exchange Rate

If you run a WooCommerce store with multiple currencies, you know that exchange rates can fluctuate constantly. By default, WooCommerce only stores the order total in the currency used at checkout, which means you might lose track of the actual conversion rate applied at that moment. This can make accounting, reporting, or analyzing profitability across currencies tricky.

A simple solution is to save the exchange rate used for each order directly in the order meta. This way, you can always see the exact rate applied when the customer paid, calculate your earnings in your main store currency, and avoid discrepancies caused by later rate changes.

In this snippet, we’ll show you how to capture the exchange rate at checkout and save it with the order. This is particularly helpful for stores that report in a single currency, do accounting in multiple currencies, or want precise historical financial records.

Continue reading WooCommerce: Save Order Currency Exchange Rate

WooCommerce: Get Orders Containing a Specific Product

In WooCommerce, finding all orders that include a specific product can be trickier than it sounds—especially with the new High-Performance Order Storage (HPOS) system. Since HPOS replaces the old posts and postmeta tables with custom ones, direct database queries are no longer the recommended approach. Instead, we should rely on the official CRUD functions and helpers like wc_get_orders().

Unfortunately, the official documentation doesn’t cover this particular use case at all. There’s no example showing how to fetch orders that contain a given product, which leaves many developers guessing or resorting to outdated SQL queries.

In this snippet, you’ll see a clean, efficient way to retrieve WooCommerce orders based on a product ID using wc_get_orders(). It’s fully compatible with HPOS, safe to use in any environment, and easy to adapt.

Continue reading WooCommerce: Get Orders Containing a Specific Product

WooCommerce: Sort Order Items by Name, SKU, Total, Quantity

By default, WooCommerce displays order items in the same order customers added them to the cart. That might work fine in most cases, but for many store owners, it’s more useful to have a consistent and logical sequence instead — especially when reviewing orders in the admin, generating invoices, or printing packing slips.

With a simple filter, you can change the sorting behavior of order items everywhere — on the Thank You page, in the admin order view, in customer accounts, and in any plugin that uses the same data source.

In this tutorial, we’ll go through a handy snippet that reorders WooCommerce order items using the woocommerce_order_get_items filter. You’ll see how to sort items alphabetically, by SKU, by quantity, by total value, or even by product category, depending on your specific workflow or fulfillment preferences.

Continue reading WooCommerce: Sort Order Items by Name, SKU, Total, Quantity

WooCommerce Admin Order Creation Has Tax Pitfalls

golf, ball, green, hole, course, sport, play, playing, hole in one, golf course, golf ball, golf green, golf hole, playing golf, golf, golf, golf, golf, golf, golf course, golf hole, golf hole, golf hole

In a recent Business Bloomer Club Slack thread, a member shared their frustrations with manually creating orders in WooCommerce from the backend — and the surprisingly different behavior compared to placing orders through the frontend checkout.

When an administrator creates an order, the tax calculations behave differently. Specifically, the tax is calculated based on the admin’s country (as defined in their profile or the backend session), rather than the buyer’s billing or shipping address.

In one case, this caused incorrect taxes to be applied and required a workaround to ensure buyer-specific rates were calculated properly.

Continue reading WooCommerce Admin Order Creation Has Tax Pitfalls

WooCommerce: Safely Sync Live Orders And Subs To A Dev Site

code, coding, computer, data, developing, development, ethernet, html, programmer, programming, screen, software, technology, work, code, code, coding, coding, coding, coding, coding, computer, computer, computer, computer, data, programming, programming, programming, software, software, technology, technology, technology, technology

In a recent Business Bloomer Club Slack thread, the discussion focused on a common challenge during WooCommerce rebuilds: how to sync a live store with a development version, especially when it comes to orders, customers, and subscriptions.

There are two main scenarios here. One involves rebuilding a WooCommerce store and needing to migrate recent transactional data (e.g. orders placed after a staging site was cloned). The other is syncing a fresh WooCommerce site with a copy of an existing store — without duplicating live payment authorizations or triggering emails.

This can be tricky and risky. Subscriptions in particular are sensitive, as duplicating them could result in revoked payment tokens or even failed renewals. Fortunately, both tools and real-life experiences were shared in the thread, providing a useful reference for developers quoting similar Woo projects.

Continue reading WooCommerce: Safely Sync Live Orders And Subs To A Dev Site

WooCommerce: Move “Orders” to Top-Level Menu @ WP Admin

By default, WooCommerce keeps the “Orders” screen buried under its own top-level “WooCommerce” main menu item, alongside settings and other options. While this makes sense for a tidy admin sidebar, many store managers live inside the Orders page and would benefit from quicker access. Clicking twice every single time you want to check orders can become a small but constant annoyance.

What if “Orders” had its own dedicated spot in the WordPress admin menu? That way, you’d have the most important screen only one click away, and in a much more prominent place.

The good news is you don’t need heavy customization. With a few lines of PHP you can move the Orders link out of the WooCommerce submenu and place it where it belongs — directly below WooCommerce, after Products, and before Payments, Analytics and Marketing.

Also, you can check the free plugin below, where you can set the position dynamically, based on your preferences. But for now, here’s the snippet you can copy into your site.

Continue reading WooCommerce: Move “Orders” to Top-Level Menu @ WP Admin

WooCommerce: Send Payments to Different Bank Accounts

Freshly baked whole wheat bread sliced on a white background, showcasing its homemade texture.

In a recent Business Bloomer Club Slack thread, a member asked whether it’s possible to send payments for specific products to one bank account, and all other payments to a different one.

This came up in the context of WooCommerce and name-your-price donations, but it’s a more general question that has wide relevance for multi-vendor stores, fundraising sites, and complex payment workflows.

The short answer? Not with default WooCommerce functionality. But let’s go over the options and workarounds that were discussed.

Continue reading WooCommerce: Send Payments to Different Bank Accounts

WooCommerce: Order Meta with HPOS and API

code, data, programming code, computer programming, information technology, technology, security, development, php, it, website development, connection, blue data, blue website, blue security, blue code, blue coding, blue programming, php, php, php, php, php

In a recent Business Bloomer Club Slack thread, a member raised an important question about WooCommerce HPOS (High-Performance Order Storage) and API compatibility.

Their developer had built a custom integration using the legacy WooCommerce API, and one of the key operations was saving metadata to orders. This metadata was used to associate internal order numbers from a third-party system.

With WooCommerce shifting toward HPOS for order management, the member wanted to confirm if their integration would require changes — especially when saving order meta. If the current implementation uses functions like $order->update_meta_data(), would that still work seamlessly with HPOS?

This is a common concern for developers who rely on programmatic access to orders, especially when orders are linked to external systems. The good news is that HPOS is designed with backward compatibility in mind, but certain practices need a closer look. Let’s go through what changes, what stays the same, and how to future-proof your API integrations.

Continue reading WooCommerce: Order Meta with HPOS and API

WooCommerce Orders With No Customer and Zero Value

A sleek laptop with a white screen on a desk with green plants in the background.

In a Business Bloomer Club Slack thread, a developer ran into a puzzling WooCommerce issue: orders were appearing in the system with no customer information and a total value of zero.

Even stranger, they were not being spammed in bulk—only one appeared roughly every two weeks, at different times of day. The concern?

These phantom orders were affecting stock levels in a physical store, and the shop owner feared customers might show up with “completed” orders that were never paid for.

Continue reading WooCommerce Orders With No Customer and Zero Value

WooCommerce: Efficient Purchase Order Processing

Three cardboard boxes on a dolly, ready for shipping outside a warehouse.

For businesses that handle a large volume of purchase orders (POs), manually entering order information into WooCommerce can be a significant bottleneck. Repetitive data entry, especially for repeat customers, is not only time-consuming but also prone to errors.

This post explores strategies for automating the process of creating WooCommerce orders from POs, focusing on how to capture all relevant customer data, including billing and shipping addresses, and associate it with a customer account for future use.

We’ll examine various approaches, from leveraging order duplication features to exploring custom development options and integrating with CRM systems. The goal is to help businesses streamline their order processing workflow, reduce manual effort, and improve accuracy, ultimately freeing up valuable time and resources to focus on other critical aspects of the business.

This involves not only efficiently creating orders but also ensuring that customer data is captured and managed effectively for repeat business.

Continue reading WooCommerce: Efficient Purchase Order Processing

WooCommerce: How to Stop Spam Orders on Free Products

I’ve been hit once again by a bot attack.

This time, I woke up to dozens of fake orders for my best-selling free mini plugin: the WooCommerce Autocomplete Orders Mini-Plugin. All of them placed overnight, all using obviously fake email addresses, and all totally useless.

Besides clogging up my order list and analytics, these spam orders also triggered multiple admin emails and slowed down my workflow.

Free products are a great way to provide value and attract users — but they also open the door to abuse.

That’s why I decided to implement a simple solution: limit how many times each free product can be ordered per day. Once the daily limit is hit, the product becomes temporarily unavailable with a “come back tomorrow” message.

In this post (and the video below), I’ll show you exactly how I did it, with a custom snippet that targets all free products in a specific category.

Continue reading WooCommerce: How to Stop Spam Orders on Free Products

WooCommerce: Minimum Order Amount on Blocks

cash register, printer, receipt, store, sale, bookkeeping, hotel, restaurant, order, vat, clean, sum, tax office, control, computer, accountancy, cash register, printer, receipt, receipt, receipt, receipt, receipt, vat

In a recent Business Bloomer Club Slack thread, a question arose about integrating the “Minimum Order Amount” functionality with WooCommerce Blocks.

The original code provided an error notification on the Cart and Checkout pages if the order subtotal was below a specified threshold, but only worked with legacy Cart and Checkout shortcodes. However, with the rise of WooCommerce Blocks, ensuring compatibility with the block-based checkout flow is becoming increasingly important.

This article discusses how the minimum order amount logic can be adapted for blocks and includes a custom function that uses WooCommerce’s woocommerce_store_api_cart_errors hook. Keep reading to explore how this solution works for both traditional and block-based checkouts.

Continue reading WooCommerce: Minimum Order Amount on Blocks