Case scenario: if you add a product ID to cart with a specific, you want another product automatically added to cart (Buy One Get One, or “BOGO”).
This second product should have price = 0 if you wish to completely give it away, or maybe a set sale price. It should also be set to “hidden” because maybe you want to hide this free product from the shop and only gift it when the first one is added to Cart.
Also, if you remove product 1, the gifted product should go away from the Cart too. So here follows the PHP snippet of course!
Continue reading WooCommerce: “Buy One Get One” (BOGO)
A client asked to show a “Product Inquiry” button on the Single Product Page which would display, upon click, a Contact Form with an automatically populated subject (Contact Form 7 plugin must be installed of course). Here’s how I did it!
Continue reading WooCommerce: Product Enquiry Form @ Single Product Page (CF7)
With WooCommerce you get 3 default shipping methods: Flat Rate, Free Shipping, Local Pickup. For each one you can define a cost, however there is no way to set up some “weight” restrictions.
So, what if you want to display a rate for orders below 10 kg, and another shipping rate for orders above that weight?
Well, you can use simple PHP to accomplish lots of “advanced” shipping rules, such as shipping by weight.
As long as all your products have their weight information filled in, you can create some simple rules to conditionally hide/show certain shipping methods based on cart weight. Enjoy!
Continue reading WooCommerce: Weight-Based Shipping Methods
WooCommerce is a free software that allows WordPress users to sell products or services directly from their own website.
It is one of the best WordPress ecommerce solutions for building and growing an online business.
It became hugely popular due to its flexibility and simplicity, as well as the variety of free and premium add-ons and a massive developer community. It is a dominating force in the global ecommerce world and accounts for over 20% of the total market share as of 2023.
In this post, we’ll take a look at the WooCommerce history, as well as its pros and cons as an ecommerce software.
Continue reading WooCommerce: What is it? Is it Free?
The new shipping zone management that was introduced with Woo 2.6 gives us the chance to add flat rate, free shipping and local pick-up methods by default.
But what if a client requires 3 different rates depending on the order amount (tiered shipping)? For example: “For orders up to $100, shipping = $5; for orders up to $250, shipping = $2; for orders above $500, shipping = free”.
Is this possible without using a plugin? Well, the answer, as usual, is absolutely yes! Enjoy!
Continue reading WooCommerce: Shipping Rates by Order Amount
I invoice clients via WooCommerce, and then send them the “Invoice Email”, which takes them to the “Order Pay” page. Of course, I want to give them the option to pay via “Bank Transfer” (bacs), but I don’t want this to be visible on the default checkout page.
We’ve seen in the past how to disable payment gateways given certain conditions… but how do we “enable” one? Here’s a snippet for that – enjoy!
Continue reading WooCommerce: Enable Payment Gateway Only for “Order Pay Checkout”
WooCommerce is one of the most popular WordPress plugin for adding eCommerce or cart functionality to a WordPress website. According to recent research by aheadWorks, WooCommerce now accounts for 26.5% of the total eCommerce market share. And recent acquisition by Automattic indicates that it has a great future ahead.
WooCommerce is well known for its huge flexibility and vast customization options. There are hundreds of WooCommerce plugins or Extensions available for extending the functionality. If you want some recommendations in this direction, check out some of the best free WooCommerce plugins (sorted by number of active install).
Continue reading WooCommerce: 85 Free Plugins for Every Challenge
Sometimes, just like physical stores, your WooCommerce website may need a few days off!
Nothing special there, as long as online customers are aware of the fact you will be reopening soon.
In WooCommerce words, this means hiding the add to cart buttons (one line of code) and also show a little notice on every WooCommerce page (one simple setting).
Continue reading WooCommerce: Enable Holiday / Pause / Vacation Mode
The WooCommerce and WordPress conditional tags (“WooCommerce and WordPress Conditional Logic”) can be used in your functions.php to display content based on certain conditions. For example, you could display different content for different categories within a single PHP function.
Continue reading WooCommerce Conditional Logic – Tags, Examples & PHP
We’ve all been there… WooPanic! What do I need to do? What on earth is happening? Is my website going to break?
First of all, relax 🙂 Not much to worry about.
In this post, we’ll see why that notice appears, what problems it could cause and what you can do to fix it. Continue reading WooCommerce: Fixing “Outdated Copies of WooCommerce Templates”
WooCommerce customizers: the Visual Hook Guide is back!
Here’s a visual HTML hook guide for the WooCommerce Emails. This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations.
Let me know in the comments if this resource is helpful and how. Enjoy!
Continue reading WooCommerce Visual Hook Guide: Emails
Today’s snippet has been widely requested by many readers, clients and WooCommerce fans. We already saw in the past how to Limit State Dropdowns to One State Only (for both Shipping & Billing) and How to Sell to one State only (Billing).
However, we never covered a much more common setting: what happens when Billing is allowed to every state but Shipping is limited?
In order to get a little help, I’ve reached out to Diego Zanella, a WooCommerce genius who is also the author of the Aelia Currency Switcher plugin for WooCommerce.
Continue reading WooCommerce: Limit Shipping to Only One State
Here’s a visual hook guide for Storefront Theme by WooCommerce.
This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations. Also, you can copy & paste in seconds and speed up your customization time.
Let me know in the comments what you think about this resource! Enjoy!
Continue reading Storefront Theme Visual Hook Guide
Hey WooCustomizers, the Visual Hook Guide is back 🙂
In this episode, I’ve created a visual HTML hook guide for the WooCommerce Account Pages (there are multiple pages such as the My Account as logged in user, My Account as logged out, etc). This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations – and you can also copy & paste in seconds unlike other “hook sniffer plugins” out there. Let me know in the comments what you think about this resource!
Continue reading WooCommerce Visual Hook Guide: My Account Pages
It’s live. And it’s alive and kicking.
#CustomizeWoo, my flagship Advanced WooCommerce Online Course for designers and DIY store owners, is now live.
In this post, I’m about to show you why I invested 151hrs 39mins 1secs of my time to build #CustomizeWoo and another 50+ hours to publish the updated version in June 2019, who I’m willing to help, and what the course looks like from the “inside”.
So, here’s the story. Here’s why #CustomizeWoo was born. Continue reading CustomizeWoo: a WooCommerce Online Course for Aspiring Developers
Today we take a look at the WooCommerce Checkout page and specifically at how to add a Custom Extra Fee for Non-Continental US States.
You can do the exact same thing for a non-US State, as long as customers will feel comfortable in paying extra!
Continue reading WooCommerce: Add Shipping Fee for Non-Continental States
Today we take a look at the WooCommerce Minimum Order Amount. This snippet displays an error notification on the Cart Page and an error message on the Checkout Page if the order is below a set threshold.
Of course, it’s also up to you to let customers know there is a minimum before reaching the Cart/Checkout, so this could come as a notification in the single product page, shop page or even the header if it’s a strict business requirement.
Continue reading WooCommerce: Define a Minimum Order Amount
Today we take a look at the WooCommerce Loop / Shop Page and specifically at how to disable the link to the single products.
Some store owners prefer to skip the single product page, and simply have customers add to cart from the shop page. Enjoy!
Continue reading WooCommerce: Disable Link to Single Product @ Shop
Today we take a look at the WooCommerce Checkout Page and specifically at how to disable a payment gateway (for example PayPal) when a specific shipping method is selected (e.g. “local_pickup”).
Specifically, you will learn how to “get” the selected shipping method on the go (thanks to “sessions”), and also how to “unset” a payment gateway. Enjoy!
Continue reading WooCommerce: Disable Payment Gateway For Specific Shipping Method
In this blog I’ve put together a series of WooCommerce links, tutorials, videos, blogs and resources so that you can find what you’re looking for. Enjoy! Continue reading WooCommerce Resource Library