The WooCommerce “ORDER AGAIN” button allows customers to quickly reorder items they have purchased in the past, which can be a valuable tool for both customers and store owners, offering convenience and encouraging repeat purchases.
The “ORDER AGAIN” button shows on the Thank You page after completing an order and on the individual View Order page within the customer’s My Account page, but only for completed orders.
What if we want to enable this feature for processing orders as well? Or maybe for cancelled ones? Well, let’s see how they do it!
Continue reading WooCommerce: “Order Again” Button For Cancelled Status
How to add, under “My Account > Orders”, some order status filters? E.g. pending – processing – completed – failed – all orders?
Is it possible to manage the logic of a company with multiple customers connecting in WooCommerce? Do I have to use a plugin or is there some magic snippet?
Here’s a great customization that all store managers should implement on their WooCommerce website!
For some reason you can refine the backend orders table if you are an admin, but logged in customers can’t filter by order status under My Account > Orders!
This is pretty bad, especially if you run a store where customers place many orders and the My Account Orders tab is full of entries. It may be helpful for customers to search all “Pending” orders for example, or maybe access al their “Completed” ones to download their files again.
So, here’s the fix – you’re welcome!
Continue reading WooCommerce: Filter By Order Status @ My Account Orders
The “Password Changed” email is – actually – a WordPress core notification. It goes to admins when a WordPress user changes their password, and the email body says something along the lines of “Password changed for user: XYZ“.
So, why are we saying this email notification can be stopped if you run a WooCommerce website? Well, because WooCommerce provides us developers with a handy filter, that we can use for this exact reason.
For what concerns my own experience, I use Sendgrid to deliver Business Bloomer WordPress/WooCommerce emails – and on the free plan I have a limit of 100 daily emails. Which means I needed to find a way to reduce the number of email notifications.
Today we’ll cover the “Password Changed” one – let’s see how to stop administrators from getting them!
Continue reading WooCommerce: Disable “Password Changed” Administrator Emails
Here’s my personal attempt to fight against the WooCommerce My Account Page registration spam, without installing yet another captcha plugin.
I’m pretty sure this solution is not perfect, because spam bots are very “smart”, but it can help prevent most fake registrations.
The way I built it, is by adding a custom input field to the My Account Register form with an empty value. Hidden via CSS, this is not visible to the user – but it is visible to spam bots, which will try to post a value. The trick here is the validation check; an error will be generated if the input has a value, and therefore should prevent most fake registration to go through.
Take a look at the code, test it, and enjoy!
Continue reading WooCommerce: My Account Registration Anti-Spam Honeypot
Just so you know, there is no need to hardcode WooCommerce URLs in your custom code! In fact, WooCommerce gives us helpful shortcut functions that we can reuse in our code to get cart, checkout, account and product URLs without wondering if they have been modified by the website owner e.g. example.com/cart to example.com/basket.
In this way, you can always make sure you’re getting the correct URLs without wasting time looking for page/product slugs. Enjoy!
Continue reading WooCommerce: Easily Get Cart, Checkout, Account, Product URLs
Whenever a customer logs out from WooCommerce, they are redirected to the My Account page URL.
But when you use separate Login and Registration pages, or whenever you have custom landing pages you wish your customers to see instead of the default My Account page, we can set a custom URL by code and safely redirect the just-logged-out customer there. Here’s the quick fix – enjoy!
Continue reading WooCommerce: Custom Logout Redirect @ My Account
Especially when you do a lot of custom shipping, showing the shipping method title may not be a good idea. Honestly, the default “via ___” suffix beside the shipping cost doesn’t make much sense anyway.
So, let’s get rid of it. With a 1 liner. Enjoy!
Continue reading WooCommerce: Hide “Shipping Via ___” @ Thank You Page, View Order Page
The WooCommerce My Account register form (when enabled) redirects to… itself once a WooCommerce customer registers. So, what if you want to redirect newly registered users to another page?
Also, when you have a custom Registration page, you may need to redirect users to the… My Account page!
Either way, here’s how to change the default redirect behavior. Enjoy!
Continue reading WooCommerce: Custom Registration Redirect @ My Account
The WooCommerce My Account login form redirects to… itself once a WordPress user logs in. So, what if you want to redirect logged in users to another page or a different My Account endpoint?
Also, when you have a custom Login page, you may need to redirect users to the… My Account page!
Either way, here’s how to change the default redirect behavior. Enjoy!
Continue reading WooCommerce: Custom Login Redirect @ My Account
The WooCommerce My Account > Downloads endpoint features a table which lists the available downloads. This table has 4 default columns: Product, Downloads remaining, Expires, Download (as you can see from the screenshot below).
Now, it’s very likely you may want to rename these headings into something more readable or understandable. On top of that, you may want to change the content of whatever column – you’ll find a workaround for this as well. Enjoy!
Continue reading WooCommerce: Rename Downloads Table Column Title @ My Account
The customer’s WooCommerce My Account Orders page displays all their orders, no matter the “status” (completed, processing, on-hold, pending, etc.).
It may happen that you, as a WooCommerce store manager, need to hide certain orders, for example the “on-hold” ones, or all orders with a custom order status.
Thankfully, this is very easy with a few lines of PHP. Enjoy!
Continue reading WooCommerce: Hide Specific Orders (e.g. On Hold) From My Account Orders Page
What does “completed” really mean in regard to WooCommerce orders? No one knows. Admins and customers included.
For physical products, usually that’s when the order is shipped (unless you add a custom order status in between “processing” and “completed“). For digital stores, that’s when the downloads are delivered.
Now, wouldn’t it be cool if we could rename this “completed” order status label to something else? This would make everyone’s life easier. Well, thankfully with a few lines of code this is definitely possible… enjoy!
Continue reading WooCommerce: Rename “Completed” Order Status
As you know, once you log in and go to My Account, WooCommerce displays the “Dashboard” tab content (also called the Dashboard “endpoint”). The Dashboard tab features the default “Hello Rodolfo Melogli (not Rodolfo Melogli? Log out) From your account dashboard you can view your recent orders, manage your shipping and billing addresses, and edit your password and account details.” message.
Now, what if we want to set another My Account tab as the default one upon login, for example the “Orders” one, or the “Downloads” one for a digital downloads WooCommerce business? Well, there are a couple of quick and not-so-quick solutions, enjoy!
Continue reading WooCommerce: Change Default My Account Tab
The WooCommerce “Order Again” button displays for ‘completed’ orders on the Thank You page and View Order page. That’s a pity, because it would be useful to show it on the My Account > Orders page as well, as a custom “action”, same as the “View”, “Pay” (if pending), “Cancel” (if subscription), “Edit” (custom snippet), “Confirm” (custom snippet) buttons.
The good news is that we can code it ourselves! And just reuse most of the code we already wrote, as well as rely on the WooCommerce “listener” for the existing “Order Again” button. Enjoy!
Continue reading WooCommerce: Order Again Button @ My Account > Orders
When you add a custom My Account tab, or when you’re not happy with the default My Account tabs order (Dashboard – Orders – Downloads – Addresses – Payment methods – Account details – Logout), you may need to change things around.
Here are two super simple snippets to achieve just that: reorder the My Account tabs, so your customers never miss that super important My Account section. Enjoy!
Continue reading WooCommerce: Reorder My Account Tabs
An order can be marked as “completed” only by the WooCommerce store manager – manually. In certain cases, this operation may be automatic i.e. for downloadable orders.
However, what if we want our customers to complete (confirm) their processing order instead? Well, this is quite easy: we display a “CONFIRM ORDER” button under My Account > Orders, and on click some code triggers the status change. Enjoy!
Continue reading WooCommerce: Let Customers Complete a Processing Order
When someone places an order via the WooCommerce checkout, there is a function (process_customer) that saves the checkout first & last name to the customer Billing address (WooCommerce). The same function also overwrites that same WP user first & last name (WordPress).
The same happens when someone updates the Billing address via the My Account edit address tab. There is a WooCommerce function (save_address) that copies Billing first & last name to the WP user first & last name.
You’d think that was sufficient to keep billing names and WP user names in sync – well, nope. You can also update billing first & last name from the user edit profile page (WP dashboard). In such case, WP user first & last name is NOT updated, and billing and user names are not in sync.
Today, we’ll study some code to make that happen, so that you never have to worry again about inconsistencies. Enjoy!
Continue reading WooCommerce: Sync Billing Name & WP User Name
It’s nice to know the stuff I share here is used on my own website! In this case scenario, I have a custom “My Courses” tab under the My Account navigation menu; instead of showing the My Account tab content with a link, I want to save time and immediately redirect users to https://www.businessbloomer.com/woocommerce-online-courses/ instead.
So, how do you redirect My Account tabs to custom URLs? Well, thankfully it’s just a matter of a few lines of code. Enjoy!
Continue reading WooCommerce: Redirect My Account Tab to URL