WooCommerce: Duplicate Order @ WordPress Dashboard

In WooCommerce, the ability to quickly duplicate orders can save time when managing repeat purchases or creating similar orders. However, this feature isn’t available by default. While plugins exist to add it, they can be complex or overengineered for simple use cases.

This custom PHP snippet adds a “Duplicate” button to the order actions in the WordPress dashboard. It duplicates the order directly in the database, offering a lightweight solution without unnecessary overhead.

If you need a practical and efficient way to duplicate WooCommerce orders directly from the “Orders” admin page, this approach offers a tailored solution that integrates seamlessly with your existing workflow.

Continue reading WooCommerce: Duplicate Order @ WordPress Dashboard

WooCommerce: Remove “Payments” From WordPress Sidebar Admin Menu

The “Payments” tab in the WordPress admin sidebar menu, introduced in newer versions of WooCommerce, is designed to provide a centralized and streamlined management interface for handling payment-related settings and configurations.

Another significant reason for this tab is to promote WooPayments, the platform’s native payment solution. This service integrates tightly with WooCommerce and offers seamless checkout experiences, built-in subscriptions, and real-time payment tracking.

So, if you’ve always wanted to get rid of it, here’s a quick snippet that will do the trick! Don’t worry — it’s simple, efficient, and won’t require you to install any extra plugins. Let’s dive into the code and clean up the admin sidebar in just a few minutes!

Continue reading WooCommerce: Remove “Payments” From WordPress Sidebar Admin Menu

WooCommerce: Add Custom Badge To Featured Products @ Shop Page

If you’ve ever wanted to customize how WooCommerce featured products appear on your classic product grid (Shop, Category, Tag, archive, search, shortcode pages) or Product Collection block, you’re in the right place!

For example, adding a custom label gives your featured products the attention they deserve and helps them stand out, catching the eye of your shoppers. Amazon does that, for example.

Whether you want to create a sleek, minimalist tag or a bold, colorful banner, a bit of custom code can transform your product display and enhance your store’s design.

In this guide, you’ll discover how to add a fully customizable label specifically for featured products in WooCommerce. With a simple CSS code snippet, you can take control of your shop’s visual identity. Read on to find the solution and start enhancing your store today!

Continue reading WooCommerce: Add Custom Badge To Featured Products @ Shop Page

WooCommerce: How to Split Orders After Purchase

Splitting WooCommerce orders programmatically can be incredibly useful for store owners who need to manage complex workflows.

Whether you’re dealing with pre-orders, dropshipping, or simply organizing items for multiple shipments, dividing an order based on its products ensures smoother operations and a better customer experience.

However, splitting an order isn’t just about separating items; replicating crucial details like payment methods, shipping methods, and totals is equally important to maintain consistency.

In this tutorial, we’ll explore how to programmatically split orders in WooCommerce, ensuring that cloned orders include all relevant details from the original, such as payment method, order status, and billing and shipping addresses.

By the end of this guide, you’ll have a robust solution to automate order splitting directly in your WooCommerce store. Let’s dive into the code and get started!

Continue reading WooCommerce: How to Split Orders After Purchase

WooCommerce: Display Only Products On Sale @ Shop

In my own WooCommerce shop, for Black Friday, I wanted to send customers directly to the Shop page showcasing only items on sale. To my surprise, WooCommerce doesn’t provide a built-in way to sort products by “on sale” out of the box.

This led me to explore a solution that not only solved the problem but also added a new sorting option to the WooCommerce Shop page dropdown.

Now, with a simple code snippet, you can enable a “Sort by On Sale” feature, or even use the “orderby=on_sale” parameter with your Shop page URL to show sale items effortlessly!

Continue reading WooCommerce: Display Only Products On Sale @ Shop

WooCommerce: Edit “x customer reviews” String @ Single Product Page

WooCommerce is a powerful ecommerce platform that offers a robust review system to help businesses build trust and credibility.

While WooCommerce provides a default review display, you may want to customize it to fit your specific needs. This tutorial will guide you through the process of editing the “x customer reviews” text on a single product page.

By following these steps, you can tailor your product review display to match your brand’s aesthetic and provide a more engaging shopping experience for your customers.

Continue reading WooCommerce: Edit “x customer reviews” String @ Single Product Page

WooCommerce: “Last Chance” Category with Expiring Sale Products

When managing a WooCommerce store, your sales strategy can be a powerful way to engage customers and drive urgency.

One cool trick is featuring products with sale prices about to expire (“sale price end date“) in a custom product category. We’ve already seen how to populate a “Sale” category, but this time I’d like to get only the sale products with a sale end date!

Highlighting expiring sale items allows store owners to showcase time-sensitive deals, enticing shoppers to act fast before discounts disappear. This approach not only enhances the shopping experience but can also boost conversions during critical sales periods.

In this tutorial, we’ll explore how to dynamically populate a custom WooCommerce category with products whose sale end dates are approaching. Using a PHP code snippet, you’ll learn how to identify expiring sale items and assign them to a dedicated category automatically.

Whether you’re a store owner looking to create a “Last Chance” section or a developer helping clients achieve similar functionality, this guide will walk you through the steps. Let’s dive in!

Continue reading WooCommerce: “Last Chance” Category with Expiring Sale Products

WooCommerce: View Customer Order History on Single Order Admin Page

Viewing the WooCommerce customer’s order history directly on the single order admin page can be incredibly useful when you need quick access to a customer’s past purchases without navigating away from the current order screen.

With a simple PHP snippet, you can add this functionality, enabling you to view previous orders and better understand customer behavior in real time.

This customization not only enhances your workflow but also improves customer service, allowing you to address inquiries more efficiently.

Below, I’ll walk through the steps needed to implement this feature, providing you with the PHP code necessary to display order history details on the order admin page itself.

As always, remember to test customizations in a staging environment to ensure compatibility with your setup!

Continue reading WooCommerce: View Customer Order History on Single Order Admin Page

WooCommerce: Display Featured Products First @ Shop, Cat, Tag, Search Pages

What’s the point of having the chance to “star” some products in your WooCommerce backend, if you can’t really use these featured products properly on the frontend? Yes, you can use a shortcode or a block to return the featured products only… or maybe you want to keep reading for a better (imho) solution!

Highlighting key products can significantly enhance user experience, driving sales by capturing the attention of potential buyers right from the start.

So, if you’re managing a WooCommerce shop, prioritizing featured products can help create a curated shopping experience that emphasizes your best offerings. In this tutorial, I’ll walk you through a simple yet effective code snippet that will help you display featured products first on various pages of your WooCommerce store.

This customization not only boosts visibility for selected items but also encourages shoppers to explore and engage with your inventory. Follow along to optimize your product display and maximize your store’s potential!

Continue reading WooCommerce: Display Featured Products First @ Shop, Cat, Tag, Search Pages

WooCommerce: Apply Coupon @ Single Product Page

In WooCommerce, applying a coupon code is often part of the checkout flow, but wouldn’t it be convenient for customers to select a coupon directly on the product page before adding items to their cart?

By letting users apply discounts right at the start, you’re streamlining the shopping experience and increasing the likelihood of conversions.

In this post, we’ll show you a quick and effective code snippet to add this functionality to your WooCommerce store. With just a few lines, you’ll empower customers to apply their favorite discount on the product page itself, making the shopping process faster and more engaging.

This guide is perfect for store owners looking to improve user experience and simplify coupon management. Let’s dive in and get this feature running on your product pages!

Continue reading WooCommerce: Apply Coupon @ Single Product Page

WooCommerce: Enable Product Reviews for Logged Out Verified Customers

In WooCommerce, product reviews are a powerful way to build trust and encourage future purchases.

If you want to avoid spam, you’d usually select the “Reviews can only be left by verified owners” option, so that only logged in customers can leave reviews.

This can be limiting, especially if you want to allow verified buyers who are not logged in to share their feedback, without forcing them to log in first.

In this tutorial, I’ll show you how to customize WooCommerce to allow logged-out verified customers to leave product reviews.

With a simple PHP snippet, we’ll adjust WooCommerce review settings to accept reviews from users who have purchased a product, regardless of their login status. This way, you can enhance the customer experience while maintaining authenticity and security for product feedback.

Let’s dive into the code and get started!

Continue reading WooCommerce: Enable Product Reviews for Logged Out Verified Customers

WooCommerce: Automatically Apply Coupon Via URL

Recently, I decided to hide the “Apply coupon” form on the cart and checkout page. A coupon form can “distract” potential customers and have them to abandon the checkout to go looking for discount codes.

However, offering discounts is still a crucial strategy to encourage purchases and reward loyal customers. For example, the Business Bloomer Club lifetime membership is subject to Purchasing Power Parity discounts, and customers can get from 5% to 75% off based on their billing country – via a coupon.

The best compromise here is to apply coupons when customers visit specific URLs. In this way, you can simplify the checkout process, reduce friction, and potentially increase conversion rates.

In this blog post, I’ll guide you through the steps to set up automatic coupon application in WooCommerce, ensuring a seamless and efficient experience for both you and your customers. Enjoy!

Continue reading WooCommerce: Automatically Apply Coupon Via URL