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: Simplify Your Store Management with the Hippoo App

Running an online store can feel overwhelming, but Hippoo! makes it simple. This powerful mobile app for Android and iOS is tailored to help you manage your WooCommerce orders, products, and inventory with ease.

With a user-friendly interface and robust features, Hippoo! simplifies operations, keeps you organized, and helps your business thrive.

With the Hippoo WooCommerce app you can effortlessly monitor your stock levels and receive alerts when items are running low. This ensures that you never run out of popular products and can restock in time to meet customer demand.

Additionally, Hippoo! allows you to create and manage coupons to boost your sales and attract new customers. You can also track and manage customer reviews, which helps improve your store’s reputation.

Continue reading WooCommerce: Simplify Your Store Management with the Hippoo App

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’s “Live” Button In the WordPress Dashboard: A Conversation on Usability

In a recent Business Bloomer Club discussion, members shared their thoughts on WooCommerce’s latest addition to the admin interface: a “Live” button in the top bar, signaling the website’s environment status.

The feature’s placement, styling, and purpose have raised several questions, especially about its usability for store owners and its potential to create confusion.

This article explores the feedback on this feature, its intended purpose, and how to disable it if it doesn’t suit your needs.

Continue reading WooCommerce’s “Live” Button In the WordPress Dashboard: A Conversation on Usability

WooCommerce: Remove “Create shipping label” Ad @ Single Order Admin Page

Here we go again. It feels like the WooCommerce plugin has become the same as some of those free extensions you get from the repo that fill up the WordPress dashboard with ads, notices and banners.

This time around, let’s get rid of the “Print discounted shipping labels with a click. By clicking “Create shipping label”, WooCommerce Shipping will be installed and you agree to its Terms of Service. Create shipping label” banner that displays at the top (!) of the single order admin page when the status is processing or completed and shipping is required (see screenshot below).

Long live a world without ads!

Continue reading WooCommerce: Remove “Create shipping label” Ad @ Single Order Admin Page

WooCommerce: Fit All Settings In One Page

In the world of WooCommerce, customization is crucial for creating a unique online store. However, juggling numerous WooCommerce settings across multiple pages can be tedious.

Imagine a solution that simplifies this process by consolidating all your WooCommerce options into a single, easy-to-use interface.

This tutorial will give you a possible approach and try to fit all WooCommerce Settings into a single screen (so, on the same page, you can edit the general, products, shipping, payments, advanced, etc. options).

Enjoy!

Continue reading WooCommerce: Fit All Settings In One Page

WooCommerce: Add Custom Tab @ WooCommerce Settings Page

WooCommerce offers a comprehensive set of settings organized into several tabs within the WordPress admin dashboard: General, Products, Shipping, Taxes, Payments, Accounts & Privacy, Emails, Integration, Advanced.

These are the core WooCommerce settings tabs. Depending on your specific setup and any additional plugins you might be using, you might see additional custom tabs as well.

Which is exactly what we’re doing today – creating a custom tab!

By adding a dedicated section within the WooCommerce settings, you can organize your custom settings and keep everything neatly categorized and consistent. This not only improves your own workflow but also makes it easier for any future collaborators to manage your custom options.

This tutorial will guide you step-by-step through the process of creating a custom tab in your WooCommerce settings. We’ll cover everything from setting up the basic structure to implementing functionalities like saving your custom options.

Enjoy!

Continue reading WooCommerce: Add Custom Tab @ WooCommerce Settings Page

WooCommerce: Filter By Featured @ Products Admin

Unfortunately, if you still use the “star icon” to feature your WooCommerce products in the admin dashboard, there is no way to “sort by featured” or “filter by featured” in the Products table. If you’ve featured many products, it’s basically impossible to see them all at once, unless you scroll through many pages of products.

Today, we will study how to add a new filter beside the existing ones (“Select a category“, “Filter by product type“, “Filter by stock status“) so that you are able to see all your WooCommerce featured products or – in alternative – all products that are not featured.

In the snippet below, we first add a new select dropdown with the two options, and then we modify the query so that it can listen to the custom GET parameter, and return all featured products or all non-featured products. Enjoy!

Continue reading WooCommerce: Filter By Featured @ Products Admin

WooCommerce: Hide “Private” Products From The Shop Page

WooCommerce admins and store managers can set the product visibility to “Private“. This is helpful if they need to hide certain products from the public, while keeping them available for manual invoicing or other purposes.

The problem, however, is that if admins or store managers are logged in, private WooCommerce products (as well as private WordPress posts, private WordPress pages, etc.) are actually visible on the Shop, Category and product loop pages.

The “Private: ” prefix is added to the product title (see screenshot), but there is usually no need to alter the frontend with products that are not going to be added to the cart anyway!

So, let’s hide private products for WooCommerce administrators from the frontend. Enjoy!

Continue reading WooCommerce: Hide “Private” Products From The Shop Page

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: Search Products By Custom Field (Backend)

In WooCommerce, there are two kinds of search: the customer one (frontend) and the admin one (backend). We’ve already covered how to let customers search into custom field values on top of the default product title and description, so this time we’ll talk about the backend search.

Let’s say, as a WooCommerce store admin, that you’ve added a product custom field (e.g. “gtin“), and you want to make sure the backend search also returns products where “gtin” is equal to the search term. The snippet below will help you do that. Enjoy!

Continue reading WooCommerce: Search Products By Custom Field (Backend)

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: Update Self-Hosted Plugin @ WP Dashboard

In this million-dollar tutorial you will learn how to update a custom (WooCommerce) plugin that you host somewhere, directly from the WordPress dashboard.

I thought the WordPress dashboard could only notify you of plugin updates and let you exclusively update plugins that are on the WordPress repository, but I was wrong!

Since I started selling WooCommerce plugins here on Business Bloomer, I had to find a way to let customers update them automatically right from their WP admin.

Thankfully, there are 2 hooks that come to the rescue: pre_set_site_transient_update_plugins update_plugins_{$hostname} and plugins_api. With these two filters, you can tell WordPress that your custom plugin ZIP file is downloadable at a given public URL, show a notification to the customer that a plugin update is available, let them update with 1 click, and optionally let them enable auto-updates.

So, let’s see how I run my plugin business. Enjoy!

Continue reading WooCommerce: Update Self-Hosted Plugin @ WP Dashboard

WooCommerce: Email Admin Upon Fatal Error

WooCommerce has a nice feature when it comes to WordPress Error 500 / Fatal Error – it logs the error and all the information regarding it inside the WooCommerce Status > Logs > Fatal Errors area.

My problem is that sometimes these errors occur in the backend, so they may not trigger the WordPress built-in email that notifies the admin about the problem.

What I want to try (please test it on your development website first, and not on your live website), is a way to get an email each time WooCommerce logs an error, so that I can go in and fix it immediately. Enjoy!

Continue reading WooCommerce: Email Admin Upon Fatal Error