Here is a collection of tips, snippets, customizations, plugin reviews and how-to tutorials to answer your biggest WooCommerce questions, curated by Rodolfo Melogli.
Please remember feedback is vital and that your social media shares, blog comments and WooCommerce Weekly newsletter sign ups help me understand which WooCommerce content works and which not, so that I can fine-tune my writing :)
Basically, in this article, you will see how to write custom content for your WooCommerce Thank You page as a separate WordPress Page, so that you can use WYSIWYG, Gutenberg or a page builder to create something unique, and then ask WooCommerce to “get it” and “include” such page inside the default order-received endpoint.
If you’re not sure what I mean, try taking a look at the two screenshots below. Then, copy the simple snippet and see the result!
Maybe you don’t have staging, and you need to clone your WooCommerce website elsewhere to test updates or new functionality (because you’re not doing that on a live website, right?). Maybe you need to migrate an existing WooCommerce website to another server. Or, like me, maybe you need to copy an entire WooCommerce website on a fresh subdomain in order to write this step-by-step tutorial!
Either way, the free Duplicator plugin, available on the official WordPress.org repository, is your best friend. Whether you need to duplicate, clone, migrate, copy or even backup your WooCommerce website, Duplicator is the most straight forward system to achieve that.
Of course, is not super simple and this is why you’re reading this step-by-step tutorial about duplicating WooCommerce websites (including helpful screenshots). Hope this is helpful to those of you who need to achieve a complex and delicate operation (cloning/migrating is ALWAYS a delicate thing) within few steps.
All you need is an existing WooCommerce website, the Duplicator plugin, an FTP client (or File Manager) and access to the server where you will create the new subdomain and blank database. All the rest is handled by the plugin, so here’s the tutorial you were waiting for.
When it comes to saving time, the out-of-the-box WooCommerce plugin doesn’t give you many options and features. For example, searching through your WooCommerce orders is not straight forward enough because the search options are fairly limited.
By default, you can go to the WooCommerce Orders admin page (wp-admin/edit.php?post_type=shop_order) and use the basic search bar.
You can look for a customer name, a customer billing email and a few more, but that’s pretty much all you can do. You can’t look for multiple fields, you can sort, you can’t filter by order total, and so on.
You get the picture – for a store manager this Orders dashboard is not handy at all. Each extra minute wasted in trying to find something could be better invested – in marketing spend for example.
That’s why we want to show you a quick alternative in order to do advanced searches in seconds. You won’t need any PHP snippets – just a quick plugin that turns your order list into an intuitive and easy-to-use spreadsheet so that you can do all the filtering and manipulation you desire.
If you wish to mark paid orders as “Completed” automatically (i.e. without having to manually login to the site and “check” processing orders one by one), you can use the code below.
What is more, this snippet will completely skip the “Processing” order status transition, which means no “Order Processing” email notification will trigger either. Once again, these 4 lines of code could save you millions of hours… hope this helps!
By now, you probably know that you should never run WooCommerce with a single payment gateway. We’ve already seen in the “PayPal or Stripe?” article that (spoiler alert!), the best solution is “PayPal AND Stripe”. Which means you need to understand that different customers prefer different kinds of payment methods (and this could increase your conversion rate dramatically).
Now we move to the next step: the chargebacks issue, and the risk of having your payment gateways banned by their providers.
A user recently told us that he has a WooCommerce subscription-based business, which is great. The problem is that sometimes customers don’t read that part and think they’re making a one-time purchase. And sometimes, when they realize they purchased something different than what they had in mind, they ask their bank or credit card company to issue a chargeback.
A chargeback happens when a cardholder makes a claim to their bank or credit card company that a payment made on their card was fraudulent. When a chargeback occurs, the business to which the payment was originally made is required to repay the full purchase amount, plus a chargeback fee.
While you can really do your best to avoid chargebacks by being transparent on your website and order receipts, sometimes – especially for WooCommerce Subscriptions – that’s not enough. Investors say: “Don’t Put All Your Eggs in One Basket” and the same applies here: you’d better record your active subscriptions under PayPal, Stripe, Authorize, and so on, so that all your recurring revenue is not in the same account.
We already studied how to set min/max WooCommerce add to cart quantity programmatically. That was an easy one. This time, I want to expand on the topic, and define a “minimum order amount on a per-product basis”.
Which, translated in plain English, would be something along the lines of “set the minimum purchase amount for product XYZ to $50”. And once we do that, I expect that the add to cart quantity does non start from 1 – instead it defaults to “$50 divided by product price”. If product price is $10, I would want to set the minimum add to cart quantity to “5” on the single product and cart pages.
SKU, Category list and Tag list on the WooCommerce single product page are called “product meta”. We already saw how to hide just the SKU (while leaving Cats and Tags there), so in this “episode” we will study how to do the opposite i.e. keeping the SKU there while hiding Cats and/or Tags.
If you are a developer, you’d think there were a specific WooCommerce “filter” for this, but there is not. So, we have to first remove the whole “product meta” block and then add back the info we want (just the Cats, for example). If you’re not a dev – not to worry – just copy paste one of the snippets below in your functions.php and magic will happen. Enjoy!
The WooCommerce Email Settings allow you to add custom recipients only for New Order, Cancelled Order, Failed Order and all admin-only emails.
But what if you want to add an email recipient to a customer email e.g. the Completed Order one? For example, you need to send it to your dropshipper. Also, you might want to add a To: recipient, or instead a cleaner Cc: or safer Bcc:.
Either way, a simple snippet allows you to achieve that (and more, if you consider WooCommerce conditional logic). Enjoy!
It happened to me today while updating to WordPress 5.3, so I thought of sharing the fix with all the people who are going to have this problem now and in the future.
Honestly, I should have thought about this better – but it’s an early Saturday morning and maybe my brain is still asleep.
I kept getting always the same error, even after 10 refreshes and attempts, even while trying to use /wp-login.php or /my-account to login as opposed to /wp-admin. And when you get the same behavior no matter how many times you refresh or try again… well, it should be easy to understand why!
You could install a free WordPress plugin to enable “LOGIN / LOGOUT” menu links – or you could use a super simple snippet. Once again, the less plugins you use the better, especially if you can substitute them with a few lines of code.
In this case study, I have added the “My Account” page to the navigation menu and renamed it to “ACCOUNT” in the menu settings. However, I want that label to change to “LOGIN” if the user is logged out. Enjoy!
WooCommerce, with 25% market share for website eCommerce solutions as of November 2019, is the most popular platform for building online stores. It’s easy to get a basic setup running and start selling your products online.
WooCommerce also offers a lot of hooks and filters for further customization – the only problem is you need to understand a bit of PHP programming.
This is where the WooCustomizer WordPress plugin comes in. WooCustomizer offers all of these filters and more, all neatly built into one WordPress plugin so you can visually customize your WooCommerce store in an ‘easy to use’ and intuitive interface within the WordPress Customizer.
No more creating a child theme to manually add code snippets to your WordPress website, no more adding multiple plugins and increasing the chance of bugs coming up… Just a simple, one plugin solution.
In this example, I will demonstrate how to hide the “billing phone” if “billing company” is empty or no information is entered. Of course, you also have to disable the mandatory attribute for the billing phone from the Customizer settings, otherwise checkout validation will fail. You can readapt this snippet to any other checkout field combo – just identify the IDs and change jQuery accordingly. Enjoy!
There are many plugins that would allow you to do this in bulk or that would give you advanced features… but what if you just need to hide one product ID for users who are visiting your WooCommerce website from a specific country code?
This is also called “geolocation” – remember this won’t work unless you’ve enabled geolocation inside the WooCommerce general settings. Other than that, get your product ID, find out the target country 2-letter code, and this snippet will do the trick. Enjoy!
If just the thought of tax season gives you a headache, you’re not alone. In fact, 60 percent of small-business owners don’t feel confident about their accounting knowledge (Small Business Report – Accounting).
We understand the feeling – tax season is approaching and you’re frantically trying to add up and categorize all of those shoe boxes full of receipts. Or maybe you’re not even completely sure of your business’ financial position as you haven’t accurately tracked your orders/sales.
Whether you’re behind on your accounting, unsure of what your business income is, or simply want to save yourself the time and headaches that tax season entails, this guide is for you.
We have compiled our top WooCommerce accounting tips to save you time this tax season (and every year there after…)
A nice way to avoid user frustration is to never let them pick a product / variation that is out of stock, only to realize later they can’t purchase it.
A variable product comes with a “select dropdown” on the single product page, from which customers can pick their favorite variation. Problem is that ONLY after selecting this they will find out about price, stock status and may be able to add to cart.
Today, we’ll completely disable (grey-out) those select dropdown options (variations) that are out of stock, so that users don’t waste time and only pick one of those that are in stock. Enjoy!
Product recommendations is an efficient and proven way to boost your WooCommerce sales.
The downside is that it could be a very time-consuming activity to bundle products manually, as well as the fact that it is not always the logical “pairing” that will generate the most sales.
The way forward is to utilize AI (Artificial Intelligence) and let analytical data models do the work for you.
Meet Engage, an AI-powered product recommendation engine. The type of recommendation vary a bit depending on the page your visitor is viewing. This is mainly because the recommendation model needs input to function properly (e.g. the first time a new visitor lands on your homepage, the model doesn’t know anything about their behavior and therefore it can’t provide recommendations.
But as the user interacts with the website the model picks up on behavioral patterns and is then able to provide better recommendations.
You can apply this simple jQuery snippet to any piece of WooCommerce content.
In this example we’ll see how to truncate the WooCommerce single product short description and place a “read more” link to reveal the hidden content… however you can also apply this to the long description, a custom product tab, the product gallery, and whatever can be truncated.
You could use a popular plugin called Widget Logic, or instead you could keep it simple with a few lines of PHP. Here’s a snippet for you in case you need to conditionally hide a certain sidebar widget given a condition e.g. if you’re on the Cart page.
Of course, you can use any of the available WooCommerce conditional tags and make this more complex, but in this example we’ll keep it simple and check if we’re looking at the Cart page (thanks to the is_cart() conditional). Enjoy!
Because “split” might not be the correct term, let me explain this better.
Let’s imagine your WooCommerce cart table is sorted by A>Z (with my WooCommerce cart sorting snippet for example). If your business model and/or UX requires it, then you might need to “add a cart table row” to communicate the fact those items belong to that letter:
Item 1 Title: “AAA”
Item 2 Title: “ACC”
Item 3 Title: “BDD”
Item 4 Title: “BEE”
Once again, this might sound incomprehensible so you’d better look at the screenshot below. Enjoy!