Screen Shot 2014-11-22 at 4.20.17 pm

A Look at Related Posts by Barry Kooij

I work over at WooThemes with a guy called Barry Kooij. He’s one of those mysterious developers behind WooCommerce, who normally hides in the shadows of WordPress-land creating awesome stuff that you’ve probably even used and loved, like What the File and Post Connector.

To be fair, when Barry started at WooThemes, I’d already been there for a month, so I was feeling pretty settled in. Naturally, I was nice enough to the new Dutch guy but didn’t give him much notice. After all, both our names started with B, so there’s was always going to be some conflict. But when I discovered he had made What the File, a simple plugin that I’d been using for a while and loved, I opened up my heart to him.

Continue reading A Look at Related Posts by Barry Kooij

Hunger_Games_Movie_Katniss_1920x1080 copy

All About Purchase Notes in WooCommerce

For every product you create in WooCommerce, there exists a little known option hidden in away in the Advanced tab of the Product Data metabox – Purchase Note:

purchase-note

It can actually be really useful. Like if you’re selling a super secret password or something fun like that, and need to provide it to the customer after the order has been completed (bit farfetched, but stilL).

Continue reading All About Purchase Notes in WooCommerce

di-holiday-boxes-1

Exclude ZIP Codes from Shipping in WooCommerce

The US Zip Code system sort of makes sense but can get pretty confusing when a random when some 5 digit combinations aren’t actually zips.

If you’re using a Shipping extension that interacts with a Shipping API (like USPS or Fedex), this isn’t usually an issue as the extension will only provide rates for valid zip codes.

However, not all extensions can do this due to API limitations and what if you just want to stop certain zip codes from being used in your store?

Here’s a quick code snippet that will allow you to do just that. Simply change / add to the $excluded_zips variable’s array:

Make sure you remove the <?php if you’re adding this to a file like functions.php that hasn’t got a closing tag beforehand.

Adding a Section to a Settings Tab

I published this over in the WooCommerce Developer Docs the other day. Please keep it in mind if you’re developing an extension for WooCommerce – along with the Create a WooCommerce Plugin guide.

When you’re adding building an extension for WooCommerce that requires settings of some kind, it’s important to ask yourself: Where do they belong?

If your extension just has a couple of simple settings, do you really need to create a new tab specifically for it? Most likely the answer is no.

Continue reading Adding a Section to a Settings Tab

Only Show Free Shipping When it’s Available in WooCommerce

There is an awesome doc in our WooCommerce documentation that explains just how to do this, but it’s often missed / hard to find, so I’d like to write it a little bit about it here.

If you have free shipping on your WooCommerce site but only offer it in certain situations, like when the total order amount is above $100, you probably don’t want to show the other paid shipping methods.

I mean, what kinda customer is going to pay for shipping when you’re offering it to them for free? It makes more sense just to hide those paid options when free shipping is available. If you add the following code to the ‘custom functions’ area of your functions.php file (or use a plugin like Functionality), it will do just that (WooCommerce 2.1+ required):

Delete the php first line if you are having errors come up after saving the file.

But wait! Is that too confusing above? Instead, just download and install the following plugin: WC Only Show Free (.zip)

Change WooCommerce ‘Ship to a different address?’ Default State

You may want to change how the extra shipping address fields in the WooCommerce Checkout are shown.

By default, they tend to be hidden but you can ‘check’ a checkbox to show them and ship to a different address.

Checkout___W

However, you may want to keep this open by default. To do so, add the following code to the ‘custom functions’ area of your functions.php file (or use a plugin like Functionality – https://wordpress.org/plugins/functionality/).

To Enable:

add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' );

To Disable:

add_filter( 'woocommerce_ship_to_different_address_checked', '__return_false' );

There’s an interesting discussion over this that took place over a year ago that you can find in WooCommerce Issue #2571.