WooCommerce Office Hours Episode 23

Click here if you can’t see the video above.

In today’s show, I answer questions about exporting orders to a custom CSV format, offering half-price shipping, and filtering out zero total orders from the WooCommerce Orders page.

WordPress 4.4 is Coming Soon!

The release of WordPress version 4.4 is imminent, so I chose to use 4.4 and the 2016 base theme in today’s office hours. I have been spending time testing all my plugins with the new version to make sure they all work.

Customize Order Export CSVFor Fulfillment House

Tim asked: “Is there a way to export orders to a CSV file and customize the file to a format required by my fulfillment house?” This question was similar to the dropshipper question in Episode 22. I showed how to use the WC Customer Order CSV Export plugin to export orders to CSV file.

SkyVerge has provided some developer documentation  that outlines the process of modifying the CSV output. I walk through the process of adding a filter to modify the header record, and adding a filter to modify the item data.

Here is direct link to the answer in the video.

Offer Half Price Shipping via Coupon Code

Mark Asks: “How can I create Half Price Shipping via coupon code?”  There isn’t a way in default WooCommerce to cut the shipping costs in half using a coupon code. I explained how his question depends on whether he’s offering shipping costs from a calculator such as USPS or FedEx rates, or flat rate shipping.

For the example I said that my store offers Flat Rate shipping of $50 per order. I then created a coupon with code “halfoff” that I would give customers to get half price shipping.

I then activated the WooCommerce Advanced Shipping plugin. This plugin handles conditional logic very well. With an advanced shipping method, I am able to set a condition “If coupon ‘halfoff’ is applied to the cart then offer a method named Discount Shipping with a cost of $25.”

Here is a direct link to the answer in the video.

Hide Free Orders From Orders Page

Sean McCabe asks: “Is there a way to hide $0 or free orders from the Orders page?”  Sean sells a course (Learn Lettering) that teaches people all about the hand lettering business. The course has 3 levels: a free Starter level, an Intermediate level, and a Master Class.

Sean wants to remove the free orders from the Edit Orders page. There isn’t a way with default WooCommerce to do this, so it required custom code. I put together a small plugin that will hide zero orders in WooCommerce.

I demonstrate how the plugin hooks into the  ‘restrict_manage_posts’ and ‘request’ filters to add a drop down to the Orders page:

Screen Shot 2015-12-08 at 2.18.02 PM

And then will add a meta_query to the request on this page if the CPT is ‘shop_order’ and the ‘non-zero’ parameter is set.

Here is a direct link to the answer in the video.

 

Daniel Espinoza

Daniel has been building ecommerce plugins and sites since 2007. He built the first commercial plugin for WooCommerce in 2011 and has built dozens of plugins and sites since.

Follow Daniel on Twitter