WooCommerce reviews + tutorials

Building Your First WooCommerce Extension

This is post 1 of 8 in the series “Build a WooCommerce Extension” While we’ve written a lot of tutorials on WordPress and WooCommerce development or how to extend WooCommerce, we’ve never written a series on how to start developing WooCommerce plugins. We’ve decided to write about building simple WooCommerce extensions so that you can get started building your own simple plugins to bend WooCommerce to your will. All extensions are WordPress plugins that hook…

Read More

8 Lessons Learned by building the WooCommerce iPhone App

One of our major goals for the first half of this year was to release the official WooCommerce iPhone app. While we released the app a bit behind schedule (in July), we were still really excited to get our first iOS app out the door and to create a mobile store management tool that we’d want to use ourselves. However, the process of building the app wasn’t entirely smooth sailing, so we figured we’d share…

Read More

Add Information to the WooCommerce Shop Page

Today’s tutorial will show you how to add information, such as custom fields or product meta, to the WooCommerce shop page. This can be really useful if you have product information that should be displayed before viewing the single product page. You can add the SKU to the WooCommerce shop page, display available inventory or stock status, show shipping weight, and more. If you’ve never added custom code to your site, check out our tutorial…

Read More

Sort WooCommerce Products by Custom Fields or Post Meta

We’ve got a plugin that will allow you to add WooCommerce product sorting options (not to mention one that will remove core sorting options as desired), but you may need a more customized solution for sorting your products. In this case, you may want to sort WooCommerce products by your custom fields or by other post meta values. Let’s go over how we can add sorting options for custom fields that we’ve set for our…

Read More

How to Check if the WooCommerce Cart is Empty

We had an interesting question the other day from a user who wanted to know if it’s possible to do something only when the WooCommerce cart is empty. WooCommerce core includes several handy methods that can help you out with this, but lots of tutorials show a cart-empty check with the $woocommerce global. However, this is only necessary if working with WooCommerce 2.0 or earlier. You can instead use the WC() global function to cut…

Read More

Ask SkyVerge

How to Output the WooCommerce SKU via Shortcode

Today’s Ask SkyVerge question is from Ted: I’m trying to embed the WooCommerce SKU of the product being viewed into a link in short product description for that product. Basically, I’d like to pass the SKU (aka video ID) into a link over to a generic streaming video page. This is an interesting idea, and something that we could easily implement using a shortcode. As we can’t directly insert PHP into our post content, a…

Read More

WordPress development tutorials

How to Create a WordPress Shortcode

Shortcodes are a great feature of WordPress, and many plugins include their own handy shortcodes. For example, WooCommerce includes several shortcodes. These can allow you to create “Buy Now” buttons, insert products into blog posts, display related products or featured products, and more. While these shortcodes are really helpful, as are the shortcodes included by most plugins or extensions, it’s still very useful to create a WordPress shortcode for your own use. For example, I…

Read More

How to Edit WooCommerce Templates

Prior to version 2.1, WooCommerce installed several pages with shortcodes into your site to display important pages like the cart or checkout. This let you use the WordPress content editor to add content either before or after the template was inserted. However, the issue with using so many pages is that they can accidentally get deleted or shuffled around (for example, you could accidentally change the parent page), which caused errors for some shops. Version…

Read More

WordPress development tutorials

How to apply changes to a single WordPress page

Here’s a quick development tutorial on how to make changes to a single WordPress page or post. Let’s say that you want to change styling for one page on your site, but it doesn’t have unique class or ID for you to target in your stylesheet. You can use the is_page() conditional tag to target a specific WordPress page to make your changes. You can also use the is_single() tag to target an individual post…

Read More

Ask SkyVerge

Ask SkyVerge: WooCommerce Align Add to Cart Buttons

Today’s question comes from Nelson: Is there a way to align the “Add to Cart” or “Select Options” buttons on the shop pages? When the product names are different lengths, or some products have reviews and some don’t, the buttons are misaligned. This would make it look much more professional. Thanks! Unfortunately, this will depend heavily on your theme. However, it may be possible with a bit of CSS to change the way these buttons…

Read More