I’ve put together a visual (yet, you can copy/paste!) hook guide for the WooCommerce Cart Page. If you like this and it is helpful to you, let me know in the comments and I’ll create another one for the checkout, single product page and my account page.
You can find WooCommerce Cart hooks quickly and easily by seeing their actual locations. Great thing is – all you need to do in your functions.php is “add_action(‘place-hook-here’,’your-PHP-function-here’);” and you can place your custom functions anywhere on the WooCommerce Cart Page. Enjoy!
Continue reading WooCommerce Visual Hook Guide: Cart Page
Here’s yet another easy WooCommerce PHP snippet if you wish to completely remove / hide or translate / rename the SALE! badge on the homepage, shop page, category pages and single product pages.
Once again, with a few lines of code (and specifically, the “woocommerce_sale_flash” filter) you can achieve anything you want. Enjoy!
Continue reading WooCommerce: Remove or Rename SALE! Badge
Apparently, since WooCommerce 4.1, there is now an easy way to edit the “You may also like…” WooCommerce string thanks to a brand new “PHP filter”. Kudos to Damien Carbery for reporting this new method.
So, as usual, simply copy/paste the snippet below in your child theme’s functions.php and it will do what it says on the tin. Enjoy!
Continue reading WooCommerce: Translate “You may also like…” Text
I am a big fan of Elegant Themes, but a lot of CSS styles (mainly in Divi) contain “!important” in order to override WooCommerce styles when using the two in a combo. Now, the big problem is that we can’t override !important with another !important. Divi will win. But no matter whether Divi has been developed in a good or not so good way, there is something we can do. (NOTE: using !important is a horrible thing in CSS. Use at your own risk) Continue reading WooCommerce and Divi: how to override !important CSS
Yes, Jetpack Sharing has an option to show the Sharing buttons on the WooCommerce Single Product page. But this does not mean your template is compatible with that! If you have ticked “products” and JetPack Sharing buttons are not showing, you can use this simple snippet. Continue reading WooCommerce: JetPack Sharing Not Showing? [resolved]
Interesting WooCommerce customization here. A client of mine asked me to hide/remove prices from the shop page and category pages as she wanted to drive more customers to the single product pages (i.e. increasing the click-through rate).
As usual, a simple PHP snippet does the trick. I never recommend to use CSS to “hide” prices, as they would still be visible in the code – PHP stops the prices from loading, so they’re invisible to the user.
Continue reading WooCommerce: Hide Prices on the Shop & Category Pages
You may want to force users to login in order to see prices and add products to cart. That means you must hide add to cart buttons and prices on the Shop and Single Product pages when a user is logged out.
All you need is pasting the following code in your functions.php (please note: your theme may have overwritten some default WooCommerce functions, hence the code below may not work. Contact me if you need custom code). Enjoy!
Continue reading WooCommerce: Hide Price & Add to Cart for Logged Out Users
If you use a full page width on your product page you might want to change the number of upsells to 3 (or multiple). Also, a client of mine needed the upsells to be above the tabs, so there you go. Continue reading WooCommerce: Change # of Upsells and Move Them Above Tabs
You’d think WooCommerce had an easy way to get the order tax rate percentage, the same way as you can get almost everything inside the “order object” with a single line of PHP. Well, that’s not the case unfortunately.
The reason is that probably each order can have multiple tax rates, and that tax is not only applied to product prices, but also optionally to shipping, fees and more.
So, how do we get the list of tax rates in a WooCommerce order? Here’s a quick snippet that you can use – enjoy!
Continue reading WooCommerce: Get Order Tax Percentage
We’ve already studied how to display the number of sales for a given product ID via a shortcode – however that solution won’t work for a variation ID, because WooCommerce only counts the “parent product” sales.
We need a different workaround in this case. This will require we either query the orders that contain such variation ID, and then calculate the sum – or that we install a snippet on day 0 so that we can count variation sales from that moment onwards, without having to query and calculate anything.
We will study the latter, and then display the result via a shortcode, so that you can use it anywhere, even inside the variation description.
Continue reading WooCommerce: Count Variation Sales (Shortcode)
WooCommerce websites need to be operational at all times: they must load quickly, be secure, and handle large traffic spikes.
Achieving this can be a daunting task without the right strategy and expertise, particularly when dealing with a high number of visitors, as a single problem can result in hours of downtime and lost sales.
In this article, our special guest Martin Ronfort, founder of Dr Tech, will share an overview of the strategies and processes that you can apply to your WooCommerce store and grow with ease
At Dr Tech, in fact, they manage thousands of WooCommerce stores – ranging from small businesses that are just starting out to stores with millions of requests and significant marketing campaigns – and deal with all the technical aspects such as hosting, loading speed, security, updates, backups, uptime, and scalability.
Let’s go, Martin!
Continue reading WooCommerce: 11 Performance, Security, and Scalability Tips
In today’s competitive ecommerce landscape, email marketing plays a crucial role in connecting with customers and driving business growth.
With WooCommerce, you already have a powerful platform at your disposal to send and manage transactional emails effectively. However, when you need to send targeted marketing emails, additional plugins may be necessary.
In this article, we’ll guide you through the process of optimizing your email marketing strategy using WooCommerce.
Whether you’re a seasoned email marketer or just getting started, we’ll explore actionable tips and practical techniques to help you level up your communication game.
So, let’s jump right in!
Continue reading WooCommerce: How to Level Up Your Email Marketing
Offering promotions is a great way to attract customers and increase sales in your online store. Some promotion strategies that have proven effective are the Buy One Get One Free (BOGO), Buy X Get Y, and WooCommerce dynamic pricing.
Taking this into account, you may want to offer reduced prices to your users in these various circumstances:
- Run a flash sale for a limited time.
- Encourage your customers to buy specific products in a clearance sale.
- Offer product bundles to big spenders.
- Add free shipping when someone makes a bulk purchase.
- Automatically add gift items as part of your store’s loyalty program.
Without dedicated plugins, these strategies might be utterly difficult to conduct. To save yourself from the coding hassle, you should pick a WooCommerce dynamic pricing plugin to quickly get it up and running.
In this blog post, we will discuss how to create a BOGO promotion, Buy X Get Y, and dynamic pricing rules in WooCommerce based on user conditions. And it requires no coding knowledge. Let’s dive in.
Continue reading WooCommerce Dynamic Pricing: BOGO, Buy X Get Y & Conditional Discounts
The WooCommerce plugin allows you to manage stock for each product, but you only have a single stock quantity field!
What if you have two warehouses and, as a store admin, need to manage the inventory for each location? Besides, what if an item is out of stock at location 1, but it’s in stock at location 2, and therefore the customer needs to be able to purchase it?
This amazing workaround will add a second input number in the product settings, redefine stock quantity and status on the frontend by summing up stock 1 + stock 2, and finally decrease stock 1 until it goes to 0, after which it will decrease stock 2.
This default behavior can be changed of course e.g. it’s possible to define from where the stock is reduced (by distance?) via additional code. Also, additional code can be written to make it compatible with variable products or custom product types, as well as make it work with refunds. Either way, enjoy!
Continue reading WooCommerce: Additional Stock Inventory Location
We all want to grow our WooCommerce store sales but creating offers for thousands of products is a nightmare.
What if I said you can grow sales on autopilot and without pouring sweat and money into your business?
This post covers how you can set up automated WooCommerce upsells, discounts, order bumps and other offers – so that you can focus on other aspects of your business while your website does its magic.
Select from ready-made offers, run them on your sites, count your sales, relax.
Without further delays, let’s get started.
Continue reading WooCommerce: How to Automate Upsells and Discounts?
You may wondering – “but I can already do that from the WooCommerce settings!“. Yes, that’s correct; go to WooCommerce Settings > Products > Inventory and set the “Hold Stock Minutes” value. After that period, unpaid orders will be marked as cancelled to make sure the stock goes back to the initial value.
The problem is – what if you don’t want to use the “Hold Stock Minutes” thing, and even better, what if you don’t use stock management at all? In that case, orders won’t be marked as cancelled automatically.
Also, what if you need to do conditional work e.g. you only want to cancel “failed” orders, while you want to keep “pending” ones as they are? Even in this case, the “hold stock” option won’t work, as you need to specify which order status you want to target and then run the cancel function.
Either way, enjoy!
Continue reading WooCommerce: Automatically Cancel Orders
Are you looking for ways to raise funds for a charity event or a non-profit organization? There are a multitude number of ways to go about it.
You can host an exclusive or virtual fundraising event, run email campaigns to collect funds, or even encourage friends and families to contribute their parts to the fund. However, these ways require a lot of legwork, including finding a place to host fundraising events, inviting guests, or hiring an email strategist to run marketing campaigns – which is time-consuming and expensive.
The solution? Collecting online donations via WordPress or WooCommerce plugins to effectively raise funds for special causes, such as charities, non-profits, or relief funds.
This article shares the best, easy-to-use, affordable WooCommerce fundraising and donations plugins you can use. Let’s get started!
Continue reading WooCommerce: Donation / Fundraising Plugins
On top of adding products to cart via URL and redirect to checkout, there is a way to also fill out the Checkout page input fields within the same link.
This could be super handy when you know the billing/shipping details of a registered or guest customer and want to speed up the order process.
It’s important to note that the URL will need to contain personal data e.g. email address, billing address, phone number, and so on; you need to make sure the URL is only shared with the specific customer (in an email, for example, as content is tailored to the subscriber; or only when the WooCommerce customer is logged in if you’re using the URL behind a website button).
Once that’s clear, let’s go ahead, and let’s see how my WooCommerce snippet works. Enjoy!
Continue reading WooCommerce: Populate Checkout Fields From URL
You launched a new feature on your WooCommerce store or added a subscription functionality for your customers but aren’t sure how your customers will take it, if it’ll help them, and wish to review the functionality yourself first?
Or, do you take remote orders over the phone and need a solution that lets you place orders on your WooCommerce store on behalf of your customers?
Well, there’s a solution. Several “Shop As A Customer” plugins are available in the market today for distinct WooCommerce use cases. They help you review your WooCommerce store’s functionalities for optimal performance.
So, in this article, we’ll review the top Shop As A Customer WooCommerce plugins and their main features. But first, let’s see how shopping as a customer can benefit your business.
Continue reading WooCommerce: How to Shop As a Customer
We’ve already seen how to only display products from a single category on the Shop page. Today, we’ll do something similar, but we’ll target the search result.
Code is somewhat similar to the example I linked to above, so it will use once again the “pre_get_posts” filter in order to modify the query before products are returned on the screen. Enjoy!
Continue reading WooCommerce: Exclude Category from Search Results