A freelance client sells two distinct products on the same website: a membership and an online course. Two different audiences, different formats and… different Terms & Conditions.
The goal was therefore to display the “Terms & Conditions” checkbox on the Checkout page based on the product in the cart. Once again, we’re going to use Conditional Logic. With that, the snippet is pretty easy to code! Continue reading WooCommerce: Display Product-Specific T&C @ Checkout
You’re going to thank me in the comments, I know 🙂
Let’s talk about checkout UX: if a user is willing to pick up the item in store, why should there be a shipping form on the checkout?
Well, let’s see how we can hide this dynamically with a bit of PHP and JS! Continue reading WooCommerce: Hide Shipping If Local Pickup Is Selected
A correct email address is worth a thousand dollars, some ecommerce expert would say 🙂 So, you don’t want your WooCommerce checkout visitors to mess up with that, do you?
What about adding an “Email Verification” field? In this way, we can make sure they double check their entry – and also show an error message in case they don’t match!
Let’s see how I implemented this for a freelancing client of mine – I’m sure you will be grateful! Continue reading WooCommerce: Add “Confirm Email Address” Field @ Checkout
As WooCommerce snippet requests by #BloomerArmada fans keep coming to my inbox, it’s time to publish a very useful functionality.
Today, we’ll see how to deny purchasing to a given billing email address, if this is a user and happens to have a pending order already! Continue reading WooCommerce: Deny Checkout if User Has Pending Orders
When an order is placed in WooCommerce, you might want to change/add something in the User Meta programmatically.
For example, you could “check” a custom checkbox in the User Profile. Or maybe assign the User Twitter username. And so on 🙂 Continue reading WooCommerce: Update User Meta After a Successful Order
This snippet could come really handy for several reasons. When you’ll need to do advanced customization of the checkout and its fields, hopefully you’ll thank me then 🙂
In today’s snippet, we will add a new checkbox and another new “hidden” field – then, if the checkbox is ticked, the field will show, otherwise it will disappear again. Continue reading WooCommerce: Add a Checkbox to Hide/Show Checkout Field
You can use to exempt someone from Tax/VAT if they enter a Tax/VAT number, or maybe if they specify a given ZIP code.
When I discovered the WooCommerce function set_is_vat_exempt(), together with a little trick to “get” a checkout field programmatically, the snippet was pretty simple to build and test. Here’s the lovely piece of code 🙂 Continue reading WooCommerce: Remove Tax if Checkout Field Value Exists
Following up from the other day’s snippet (deny checkout based on cart weight), you might want to show what is the current Cart Weight on the cart and checkout page. So here you go! Continue reading WooCommerce: Display Weight @ Cart & Checkout
A WooCommerca fan asked this question on a Facebook group, so I had to write a snippet about it: “How do you deny checkout if the cart weight is above a certain threshold?“. Well, this is straight forward, so there you go! Continue reading WooCommerce: Deny Checkout Based on Cart Weight
When it comes to “editing” stuff, chances are WooCommerce gives us a “filter” we can use without overriding core. The more filters, the more customization we can do. In this case, I wanted to change the “Returning Customer?” message on my own checkout. Continue reading WooCommerce: Edit “Returning Customer?” Message @ Checkout
I’m curious to know how many had the same problem. At WooCommerce checkout, some user fields such as billing_name, shipping_address_1, etc. are automatically saved into the “WordPress User Profile” upon processing.
But what if we also wanted to display and save another existing user field, such as “user_twitter”, or “user_url”, which you can find in the WP User Profile by default? Well, this is very easy: first, we add a custom checkout field; then, we make sure that when the checkout is processed we save that field correctly! Continue reading WooCommerce: Display & Save WP User Field (e.g. user_url) @ Checkout
A Business Bloomer fan asked me a specific question via the blog comments, so I had to make a new snippet of course 🙂
Here’s how you force redirection to the checkout every time a product is added to cart, no matter if you do so from the loop/shop pages or the single product page. Continue reading WooCommerce: Redirect to Checkout on Add to Cart
Woo 2.6 introduced Shipping Zones – and with that we can play with simple PHP (and JQuery) to accomplish lots of “advanced” shipping rules, such as local pickup.
This time, I’ve tested a snippet to add a dropdown to the billing section where users go choose the pickup destination. As a result, the shipping address is automatically populated, and so is the shipping method. What do you think? Continue reading WooCommerce: Only Ship to Predefined “Local Pickup” Addresses
A video tutorial will be done soon, but I’ve basically started invoicing my own clients with WooCommerce itself. I was using a third party system and I said to myself – why not using WooCommerce instead? So I did it, it’s actually pretty straight forward.
One of the most important functionalities I needed to customize was the “Bank Transfer” (bacs) payment option. Of course I don’t want this to be visible on the standard checkout page, however for those clients I invoice manually I definitely needed it.
We’ve seen in the past how to disable payment gateways given certain conditions… but how do we “enable” one? Continue reading WooCommerce: Enable Payment Gateway Only for “Order Pay Checkout”
I wanted to do something different on my own checkout page, and change the default “Have a Coupon?” message. Thankfully, WooCommerce gives us a filter we can use to accomplish anything we like – such as adding a FontAwesome icon or changing the text string completely! Continue reading WooCommerce: Edit “Have a Coupon?” Message @ Cart & Checkout
We’ve already seen how to set the default values for certain dropdowns (country and state default: https://businessbloomer.com/woocommerce-set-default-state-checkout-page/). But what can we do when we want to define the defaults for the other “text” inputs, such as the billing_city? Continue reading WooCommerce: Set Default Billing City (or other fields) @ Checkout
One of my premium course students had an apparently simple requirement. Her client didn’t want to show the “What is PayPal?” text (and link) on the checkout page. In fact, why sending users away from the checkout? And who doesn’t know what PayPal is nowadays? Well, let’s see how this is done via a simple “filter” – but this time I’d like to show you a step-by-step tutorial! Let me know what you think about this in the comments 🙂 Continue reading WooCommerce: How to Remove “What is PayPal?” @ Checkout
A WooCommerce freelance client had a special request for their online store. And sometimes, just like physical stores, your WooCommerce website need to go on holiday! This means disabling cart, checkout and show a little notice on every WooCommerce page. Continue reading WooCommerce: Holiday/Pause/Closed Mode
A Dutch fan told me in Holland they’re really strict about addresses 🙂 In particular, all Dutch billing/shipping addresses require the “House Number”.
This must be therefore placed on the checkout, AFTER & BESIDE the Address_1 field and made required. Also, it’s a good idea to make this show in the Admin Order, the thank you page and the notification Emails. Continue reading WooCommerce: Add House Number Field @ Checkout
A client of mine runs online courses for acupuncturists via Sensei LMS. US Law requires an “Acupuncture Registration Number” in order for students to get the final online certificate. So, this task was a little bit more complex than usual as it had two major issues:
1) This new checkout field does not belong to billing or shipping (order information), but instead it’s a unique user field that needs to be saved and retrieved multiple times if necessary
2) This field does need to be shown at checkout only if a certain product category is in the cart (“online courses”, as opposed to e.g. “books”)
So, here’s how you do it – hope it helps you understand that anything is possible via PHP! Continue reading WooCommerce: How to Add a Custom Checkout Field (PHP)