WooCommerce: Ship to Predefined “Local Pickup” Addresses

WooCommerce Shipping Zones are quite easy to override / customize. With a simple PHP (and jQuery, sometimes) snippet we can accomplish many advanced shipping rules, such as the one we’ll study today.

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: Ship to Predefined “Local Pickup” Addresses

WooCommerce: Add Different Facebook Pixels to Different Pages

Last week a client who was about to carry a Facebook Advertising campaign asked me something pretty interesting. We already saw in the past how to add conversion tracking to the Thank-you page, however this time was slightly different.

My client’s FB consultant required a code for the whole site, another code for the Checkout page only (“user has initiated checkout”), and another one for the Thank-you page (“user has purchased”). So, here’s how I did it. Continue reading WooCommerce: Add Different Facebook Pixels to Different Pages

WooCommerce: 85 Free Plugins for Every Challenge

free woocommerce plugins

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

WooCommerce: Enable Holiday / Pause / Vacation Mode

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).

Enjoy!

Continue reading WooCommerce: Enable Holiday / Pause / Vacation Mode

WooCommerce: Limit Shipping to Only One State

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

WooCommerce: Move & Change Number of Cross-Sells @ Cart Page

This week’s snippet is about the Cart Page (perfect timing, as in a few days I will run a free class on “How to Customize the WooCommerce Cart Page“).

Today we’ll focus on the “You may be interested In…” section, also called the “Cross-Sells” area. If a product that is in the cart has cross-sells (Edit Product > Product Data > Linked Products), this section will appear by default. Problem is – it is pretty ugly where it is now and distracts the user from identifying the “Proceed to Checkout” button, the most important CTA (Call To Action) of the Cart page.

So, how can me move it UNDER the Cart Totals, and make the design a little cleaner? Continue reading WooCommerce: Move & Change Number of Cross-Sells @ Cart Page

WooCommerce Custom “Add to Cart” URLs – The Ultimate Guide

Here’s how to create custom WooCommerce Add to Cart HTML links / buttons and make them add a given quantity of a single product to cart and redirect to specific website pages.

This tutorial explains how to achieve that for simple products but also variable and grouped types.

I strongly recommend to read through all the post comments in case you’re not sure about something – many people have asked the same questions over and over again e.g. “is it possible to add more than 1 product to Cart?” (to which the answer is “no”, unless you create a Grouped Product).

With this guide it’s much easier to place Add to Cart buttons on custom landing pages, pricing tables, blog posts and so on. Enjoy!

Continue reading WooCommerce Custom “Add to Cart” URLs – The Ultimate Guide

CustomizeWoo: a WooCommerce Online Course for Aspiring Developers

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

WooCommerce: Disable Payment Method If Product Category @ Cart

Today we take a look at the WooCommerce Checkout and specifically at how to disable a payment gateway (e.g. PayPal) if a specific product category is in the Cart.

There are two tasks to code in this case: (1) based on all the products in the Cart, calculate the list of product categories in the Cart and (2) disable a specific payment ID if the target product category is in the Cart.

May sound difficult but don’t worry – solution is right below. Enjoy!

Continue reading WooCommerce: Disable Payment Method If Product Category @ Cart

WooCommerce: Disable Payment Gateway For Specific Shipping Method

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

WooCommerce: Add Product to Cart On Visit Programmatically

Quite an interesting functionality! A WooCommerce client wanted their Cart pre-filled with one product as soon as their customers accessed the website. I don’t remember the exact reason, but this could be useful when you want to give them a free product by default, or you want to send your visitors straight to checkout with a product already in the cart without letting them add anything first.

Adding an item to cart programmatically is the same as “automatically”. Basically, all users will have a default, non-empty Cart filled with an item of your choice. So, let’s see how this snippet works!

Continue reading WooCommerce: Add Product to Cart On Visit Programmatically

WooCommerce Visual Hook Guide: Cart Page

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