WooCommerce reviews + tutorials

Widgets, Part Deux: Create a Smart WooCommerce Widget

This is post 4 of 8 in the series “Build a WooCommerce Extension” We’ve covered how to create a WooCommerce widget in a very basic sense in an earlier post in this series. However, there are some more advanced steps we can take to create “smart” WooCommerce widgets for your store. Creating a “Smart Widget” If you frequently use WooCommerce widgets, you’ll notice that some of them are displayed only on certain pages. For example,…

Read More

WooCommerce reviews + tutorials

How to Create a WooCommerce Widget

This is post 3 of 8 in the series “Build a WooCommerce Extension” Today we’re continuing our series on building your first WooCommerce plugin with an article on how to create a WooCommerce widget for your store. Widgets and shortcodes are great tools to let users output some information on the frontend of their eCommerce site, and they’re fairly easy to build and include as part of your plugin. We’ve already written about creating a…

Read More

Get All WooCommerce Orders for a Customer

There are several reasons you might want to get all WooCommerce orders for a customer in your shop. For example, you may want to find out if they’ve ever purchased a product, or do something as simple as count the number of orders they’ve placed with you. Since orders are a custom post type, you can use get_posts to query orders, which is a pretty standard WP query that most developers are familiar with and…

Read More

How to Simplify Free WooCommerce Checkout

For most WooCommerce checkouts, customers will be purchasing products and remitting payment to your store. They may also be selecting shipping methods or entering coupon codes. However, when customers purchase a free item, you may not need all of the fields at checkout if you’re not collecting any payment for shipping. As a result, you may require almost none of the checkout fields. While WooCommerce will helpfully remove payment method selection for free checkouts, the…

Read More

Add Actions to WooCommerce My Orders Table

You can easily add action buttons to the WooCommerce My Orders table in the customer’s My Account section of your site. The default buttons include actions like “Pay”, “Cancel”, and “View”, but you can add your own actions for each order. The woocommerce_my_account_my_orders_actions filter makes it very simple to add our actions. Actions are an array, so you add your own action into the array and then give them back to WooCommerce. The filter gives…

Read More

Get a list of WooCommerce sale products

You can get lists of all simple products, variable products, or featured products easily with WooCommerce. It’s also easy to get things like “in-stock” products or “out of stock” products. However, getting a list of WooCommerce sale products can be a bit tougher because sale products use different meta keys to determine sale status depending on the product type. Let’s take a look at a couple of ways you can get sale products. Check sale…

Read More

Pagely staging site

How to create a Pagely staging site (for the non-developer)

Chances are that you’ve heard of Pagely, as they were the first company to offer managed WordPress hosting. They’re one of two hosts we recommend, and we migrated all of our own sites to Pagely early this year. One feature that many eCommerce sites need as part of their managed hosting services are staging sites, as these help you test updates and debug issues so you don’t have to deactivate plugins or try out new…

Read More

How to add a flash for WooCommerce Featured Products

When a product is on sale in your shop, WooCommerce adds a sales flash to that product to show customers that the product has a sale running to draw their attention to it. This sales flash is shown on the shop page and on the single product page to keep the customer informed. Depending on how you’re using “Featured” products in your shop, you may want to draw the customer’s attention to the featured products…

Read More

Ask SkyVerge

How to Remove WooCommerce Product Images from the Cart

This Ask SkyVerge question comes from Frank: Is it possible to remove the product thumbnails and the links to the product page on the cart page? By default, the WooCommerce cart page includes product images and links to product pages in your shop for each item in the cart. However, the cart template is pretty flexible, and there a couple of handy filters in it that can let us change these cart elements. First, we…

Read More

WordPress development tutorials

Developers: Stop Using sslverify = false — WordPress has you covered

I listened to a talk recently about using WordPress to communicate with external APIs, which is something we do frequently at SkyVerge. We’ve built over 20 payment gateway integrations for WooCommerce, each of which needs to communicate with the payment processor’s API. One thing that I noticed in the talk is that setting sslverify = false when using wp_remote_get or wp_remote_post was recommended. This is a fairly common practice and has thus become recommended for…

Read More