WooCommerce: How to Configure Product and Order Sync

Overhead view of black modern electronics including smartphone, headphones, speaker, and controller on a table.

This is a guest post by Misha Rudrastyh of rudrastyh.com. If you like the content, make sure to thank him in the comments!

In this article, I’d like to talk about syncing products and orders between different standalone WooCommerce stores. More specifically, I am going to uncover the following topics:

  • What WordPress/WooCommerce hooks do we need to use to trigger the sync?
  • How to create the WooCommerce REST API requests inside the callback functions for the above-mentioned hooks.
  • How to do it without coding at all, just using a plugin.

Of course, for products, we are going to sync all the product information, like gallery images, attributes, variations, etc. For orders: billing, shipping addresses, custom metadata, customers, etc. But we will come back to this moment a little bit later as well.

Continue reading WooCommerce: How to Configure Product and Order Sync

WooCommerce: “Beautify” Item Meta in Order Emails

Since the latest WooCommerce releases, the transactional emails have received a fresh update thanks to the “Enable modern email design for transactional emails” option—also called email_improvements_enabled—which you can activate under Advanced > Features settings.

This new email layout offers a cleaner and more modern look, improving the overall customer experience. However, one side effect is that the order item meta information in emails can sometimes appear cluttered or less readable. To help you fix this, today we’re sharing a straightforward code snippet that will beautify the order item meta displayed in WooCommerce transactional emails.

This tweak improves how extra product details are shown, making them clearer and more appealing for your customers. Let’s get right to the snippet and enhance your WooCommerce emails!

Continue reading WooCommerce: “Beautify” Item Meta in Order Emails

WooCommerce: Per-Product Checkout Fees / Tariffs

If your WooCommerce store sells products that require extra charges — think tariffs, recycling fees, or packaging costs — you may want to apply those fees only to specific products or variations. Instead of using blanket fees at the cart level, this snippet gives you granular control by letting you toggle the fee on or off for each product directly from the edit screen.

Once enabled, the fee is calculated as a fixed percentage (e.g. 20%) and automatically added at checkout. This works for simple and variable products.

Whether you need to meet regulatory requirements or recover specific costs, this solution offers a flexible, admin-friendly way to charge per-product fees.

Continue reading WooCommerce: Per-Product Checkout Fees / Tariffs

WooCommerce: Auto-Cancel Orders After 3 Failed Payments

You’re under a carding attack, and the bot tries to submit the payment for a given order 300 times… Which means 300 failed order emails, and a database mess.

WooCommerce doesn’t limit how many times a customer (or bot) can attempt to pay for a failed order via the “Order Pay” page. This opens the door to abuse, unnecessary clutter in the order table, and frustration for both store owners and customers.

One way to mitigate this is by tracking how many times a failed order has been retried and automatically cancelling it after the third attempt. This solution keeps things clean, secure, and under control.

Continue reading WooCommerce: Auto-Cancel Orders After 3 Failed Payments

WooCommerce: Bulk Delete Pending / Failed Scheduled Actions

In a recent project, I needed a quick way to bulk delete pending and failed Action Scheduler jobs directly from the WordPress dashboard—so I built a custom tool for it.

The WooCommerce > Status > Tools section is packed with useful features for debugging and maintenance, but did you know you can add your own custom tools there?

This is especially useful when your site has thousands of queued actions that are no longer needed, or if a plugin malfunction leaves behind a large number of stuck jobs. Instead of running manual SQL queries or using WP CLI, this approach gives you a simple one-click button inside your WooCommerce admin.

In this tutorial, I’ll show you how to register your own custom tool using WooCommerce’s built-in API, and how to trigger and delete all pending or failed actions.

Here’s the full snippet to get you started!

Continue reading WooCommerce: Bulk Delete Pending / Failed Scheduled Actions

WooCommerce: Redirect Empty Paginated Category Pages (404)

When managing a WooCommerce store, it’s common to rearrange products or remove them from certain categories. However, this can lead to an unexpected issue: paginated product category URLs (e.g., /product-category/shirts/page/3/) may still be accessible even when that specific page no longer contains any products.

Instead of displaying a 404 error, it’s often better to redirect users back to the main category page to avoid confusion and improve user experience.

This is especially important for SEO, as you don’t want search engines indexing irrelevant or broken pages. The solution is to detect when a paginated product category archive is empty or invalid and redirect to the base category URL instead.

Below is a simple snippet you can add to your theme’s functions.php or a custom plugin. It handles the redirect only when necessary, ensuring users and bots land on meaningful content.

Continue reading WooCommerce: Redirect Empty Paginated Category Pages (404)

WooCommerce: Complete Button @ Order Admin

When managing WooCommerce orders manually, efficiency is everything—especially if you’re dealing with high volumes or handling custom fulfillment workflows.

Typically, to mark an order as “Completed,” you’d have to open the order, change the status from the dropdown, and then click “Update”. That’s an extra step that can feel repetitive if you’re doing it often.

In this quick developer tutorial, I’ll show you how to add a “Complete Order” button directly to the single order edit page in the WooCommerce admin. This button appears alongside the existing “Update” action and lets you instantly complete the order with one click—no need to manually change the status first.

It’s a small UI enhancement, but one that can save time and reduce friction in your daily order management tasks. Best of all, the solution only requires a lightweight PHP snippet you can add to your theme or custom plugin. Enjoy!

Continue reading WooCommerce: Complete Button @ Order Admin

WooCommerce: Allow Guest Checkout For Existing Customers

In a typical WooCommerce setup, if you disable Guest Checkout via the settings, all customers are required to either log into an existing account or register a new one during checkout. This ensures every order is tied to a user account – great for store management, but not always ideal for user experience.

The problem? Returning customers who aren’t logged in will be forced to remember their credentials or manually reset their password, just to place another order. And if they skip login and try to check out with their email, they’ll get the dreaded “An account is already registered with your email address” error – and the order won’t go through.

Thankfully, there’s a way to bypass all that. With a simple PHP snippet, you can allow users to check out as guests if their billing email matches an existing customer. WooCommerce will assign the order to their account – no login required!

Continue reading WooCommerce: Allow Guest Checkout For Existing Customers

WooCommerce: Simplify Free Checkout

If your WooCommerce store occasionally offers free products—whether as part of a promotion, a free trial, or a lead magnet—you may have noticed that the default checkout still displays all billing (and shipping) fields. This creates unnecessary friction for customers who don’t need to enter full address or payment information just to get something for free.

Thankfully, there’s a simple way to customize this behavior and show only the checkout fields you truly need. With a few lines of code, you can conditionally reduce the checkout form when there’s no payment required. This improves the user experience, boosts conversions, and keeps things clean and relevant.

I actually use this exact snippet on Business Bloomer whenever someone “purchases” one of my free WooCommerce mini plugins—just a name and email, no extra hassle.

In this example, we’ll indeed keep just the billing email and billing first name fields when the cart total is zero. You can easily tweak the snippet to include any other fields depending on your needs.

Here’s how to make it happen.

Continue reading WooCommerce: Simplify Free Checkout

WooCommerce: Inject Ad After the nth Product @ Shop Page

Is it possible to insert a custom loop item, such as a promotional banner or a “fake” product, into the WooCommerce shop page after a specific number of real products – for example, after the third one?

Spoiler alert: yes, it is!

This won’t alter the results counter though (“Showing 1–12 of 10138 results“), and only works on the “classic” Shop Page, but we can live with that.

In this post, we’ll explore a simple way to inject custom HTML into the shop loop at a specific position, without affecting pagination or breaking layout. This solution is ideal for inserting ads, upsells, or custom notices directly in the WooCommerce product grid. Enjoy!

Continue reading WooCommerce: Inject Ad After the nth Product @ Shop Page

WooCommerce: Prevent Duplicate Orders

Sometimes customers accidentally submit the same order twice, or there may be a temporary issue with a WooCommerce payment gateway or a plugin conflict—such as the Sucuri Firewall problem in March 2025.

This can result in duplicate charges, refunds, chargebacks, admin costs and a poor user experience.

I recently ran into this issue myself and decided to create a simple solution. By checking if the same customer placed an identical paid order within the last 2 minutes, we can block the second attempt and show a helpful message.

If you’ve experienced something similar or want to proactively prevent it, here’s a quick snippet you can add to your site to avoid duplicate WooCommerce orders.

Continue reading WooCommerce: Prevent Duplicate Orders

WooCommerce: Auto-Hide Products Without a Featured Image

In WooCommerce, having a well-organized product catalog is essential for user experience and conversions. However, some store owners may forget to add featured images to products, leading to empty placeholders that can make the shop look incomplete or unprofessional.

If you want to ensure that only products with a featured image are displayed, you need a way to automatically hide those without one.

Instead of manually checking and updating each product, you can use a simple PHP snippet to exclude products missing a featured image from your shop, category, and search pages. This approach keeps your store looking polished while preventing customers from encountering blank product thumbnails. The best part? It only takes a few lines of code to implement.

Below, I’ll show you how to add this snippet to your theme’s functions.php file or a custom plugin, ensuring that only properly set up products appear in your WooCommerce store.

Continue reading WooCommerce: Auto-Hide Products Without a Featured Image

WooCommerce: Failed Orders Monitor & Temporary Lockdown

Sooner or later, every WooCommerce store will face a carding attack. It’s a matter of when, not if. We covered the ins and outs of this in a recent class (Preventing WooCommerce Checkout Carding Attacks), and now this post provides the code solution you’ve all been waiting for.

Want to temporarily lock down your WooCommerce site when too many failed orders happen?

This snippet does just that! When the 3rd order in a row fails, it triggers a 10-minute lockdown, disabling a specific payment gateway, and preventing purchases of low-ticket products. Plus, you’ll get an email notification when the lockdown is active.

It works by setting a temporary flag (a WordPress “transient“) and checking it before allowing payments and purchases.

This is a great way to prevent repeated failures, investigate payment issues, mitigate carding attacks, and ensure a smooth customer experience. Enjoy!

Continue reading WooCommerce: Failed Orders Monitor & Temporary Lockdown