Ask SkyVerge

Ask SkyVerge: 20 WooCommerce How To’s

Hey everyone! We’ve been collecting some WooCommerce How To questions that are really easy to solve with a line or two of code or that we’ve written about already. If you haven’t checked out the news site that we sponsor yet – Sell with WP – you should check out the How To section. There are some handy WooCommerce How To’s there as well. You can also check out our free WooCommerce plugins, which sometimes…

Read More

WooCommerce reviews + tutorials

New Tutorial: Customize WooCommerce Emails

Hi all! Some of you have asked us both here and at Sell with WP a bit about how to customize your WooCommerce emails. We did write about creating your own custom WooCommerce emails, but changing the look of your emails to blend in with your brand is an important part of your store’s communication. We wanted to let you know that Justin has written a tutorial on customizing WooCommerce order emails at Sell with…

Read More

Guide for Upgrading to WooCommerce 2.1

WooCommerce 2.1 was released on Monday, and makes several changes to the core plugin. As a result, you may experience issues when upgrading if you don’t pay attention to a few of the changes. The guide that follows is a general overview of some things to look out for when upgrading to WooCommerce 2.1 to make the transition from WooCommerce 2.0 as smooth as possible. There are a couple of known issues that are being…

Read More

Timezones

Down the Rabbit Hole: WordPress and Timezones

“Why, sometimes I’ve believed as many as six impossible things before breakfast.” ― Lewis Carroll, Alice in Wonderland A few months ago, we were working on the WooCommerce Pre-Orders extension and had to think about how we wanted to store the release date & time. Like most concepts that look simple and easy at first, this turned out to be somewhat complex. Throughout development, I ended up learning quite a bit about working with timezones…

Read More

WordPress development tutorials

Translating a WordPress Plugin on the Command Line Step by Step

The purpose of this article is to provide a quick and easy to follow step-by-step guide to extracting text strings from a WordPress plugin for translation from the command line. Although this is documented in the codex: I18N for WordPress Developers and Translating WordPress, those articles are somewhat lengthy and the first time I was asked to internationalize a plugin it took me some time to find the actual steps to generate my POT file….

Read More

WordPress development tutorials

WordPress Get DB Table Column Names

To get the column names for a MySQL database table in WordPress, use the following: global $wpdb; $table_name = $wpdb->prefix . ‘posts’; foreach ( $wpdb->get_col( “DESC ” . $table_name, 0 ) as $column_name ) { error_log( $column_name ); } Which will result in something like the following being printed to your debug.log: ID post_author post_date post_date_gmt post_content … You get the idea 🙂

Read More

Guide to Migrating Your Plugin to WooCommerce 2.0

With the release of WooCommerce 2.0 becoming more imminent (well, maybe not quite imminent yet, but certainly drawing nearer), those of us with WooCommerce plugins need to start work on getting them ready for the big release. WooCommerce has never been one to hold back on making plugin-busting implementation changes with a new release, and they’re setting the bar quite high with 2.0. It’s chalk full of code changes and improvements plugin developers must be…

Read More

Tweaking the WooCommerce Order Admin: Searching For Custom Fields

The WooCommerce Order Admin allows you to search for orders by the following fields: order key billing first name billing last name billing company billing address 1 billing address 2 billing city billing postcode billing country billing state billing email billing phone order items But what if you want to search by another order field? Perhaps the order total? Well it’s as easy as adding something like the following to your themes functions.php: function woocommerce_shop_order_search_order_total(…

Read More

WordPress development tutorials

Don’t Share Terms Between WordPress Taxonomies

By default WordPress will reuse terms with the same name and slug between different taxonomies (at least for now). For instance, if you add the term ‘red’ as a tag, and then add the category ‘red’, the same wp_terms record will be shared between them. This is also true for any custom taxonomies you define (remember that despite their seeming differences, WordPress tags and categories are both implemented as taxonomies). Now, in general this is…

Read More

Hide Certain WooCommerce Sub-Categories in Catalog

WooCommerce provides some coarse control over displaying sub categories in your shop/category pages with the “Show subcategories on category pages” and “Show subcategories on the shop page” options on the WooCommerce > Settings > Catalog > Catalog Options section. These controls are all-or-nothing though: show all subcategories on the category pages, or show all subcategories on the shop page. If you want finer-grained control, for instance displaying only certain subcategories on the shop or particular…

Read More