Automated WooCommerce Testing with Ghost Inspector

WooCommerce sites are made up of a complex set of integrated parts. There’s WordPress, WooCommerce itself, other third-party plugins, and a theme. Each of these components require frequent updates and has the potential to break critical functionality on your site. This is why it’s critical to have automated tests.

For a WooCommerce site I used to work with, we had a checklist of items we would manually run through after any major update:

  • Verify products on home page look correct and load
  • Test “Add to Cart” button
  • Test removing item from cart
  • Verify all product on /shop page look correct
  • Test complete checkout with Stripe for guest checkout
  • Test complete checkout with PayPal for guest checkout
  • Test complete checkout with Stripe with coupon for guest checkout
  • etc.

Needless to say, this took a lot of time. Thankfully, tests like this can all be automated using Ghost Inspector.

Continue reading

Subscription Toggle in WooCommerce

In WooCommerce subscription products and standard products can’t be combined. For example, if you’d like to offer customers the option to purchase coffee as a one-time sale or as a convenient monthly subscription, you’ll need to create two separate products on the backend (even though it’s essentially the same product and SKU).

If you’re SEO focused, this might be a concern in terms of duplicate content and splitting page rank. For customers, this also isn’t a great experience. If a customer lands on the one-time product page, they might not know about the subscription option (and vicea versa).

A better example of subscription user experience is Target. If a product offers a subscription option, there’s a radio button toggle with a discount clearly highlighted. Turns out, with a little work, this is also possible to do in WooCommerce. Continue reading

Shopify vs. WooCommerce

A former client contacted me this week because they were thinking about switching platforms for their ecommerce store. The site had originally been built on WooCommerce but they were now considering a switch to Shopify. The main issue is they didn’t want to have to rely on a developer for site updates and wanted a solution they could more easily manage themselves.

To answer their questions, I signed up for a Shopify account and then went through the technical and business requirements one by one. If you’re trying to decide between Shopify and WooCommerce, hopefully some of these notes are useful.

Continue reading

Unit Tests for WooCommerce Extensions

I am completely new to PHP unit testing, but I decided it was time to learn after discovering a critical bug in a small WooCommerce extension I had built for a client.

The extension I built added a feature that allowed administrators to limit specific coupons to new customers only. I had done some manual testing and made sure that new customers could use the coupon and existing customers could not. But there was a logic bug I missed that prevented existing customers from using any coupons, even ones that did not have the “new customer” restriction.

After finding the bug, I knew there were several use cases I would need to check every time an update was made to the plugin:

  • New customer should be able to apply a coupon
  • New customer should be able to apply a coupon with a “new customer” restriction
  • Existing customer should be able to apply a coupon without a “new customer” restriction
  • Existing customer should *not* be able to apply a coupon with the “new customer” restriction

Obviously, checking this manually each time would be rather tedious- which is why I turned to unit tests.

Continue reading

Change the Look of Your Site with Jetpack Modules

Jetpack offers dozens of different options to expand upon the basic layout and settings within WordPress. With the expanded Appearance modules, you can add several exciting options to your site. These will improve the look and feel of your site as well as add additional functionality and usability.

We at DevPress think these are great options for your site, and encourage you to check them out. Below we’ll look at each option and how it can be used. Continue reading

Building an Author Website with WordPress

Every writer needs a website.

You might want to have a portfolio of your writing, feature short pieces on a blog, or connect with your fans.

In this post we will take a look at how you can build a simple author website using DevPress themes. In this particular example, we’re going to focus on the Luminate theme, but any of the other DevPress themes that feature at least one sidebar will work just as well.

Here’s an example of a simple author site using Luminate:

screenshot of sample site

Let’s look at how to put it together! Continue reading

Get Social with Jetpack!

We know you value your content and want to share it as widely as possible. The Social modules within the free Jetpack plugin give you new ways to interact with your readers. You can make it easier for them to comment on your posts, and you can add sharing buttons to allow your readers to post your content on various social media sites. By connecting your site to Facebook and Twitter, and allowing your visitors to share the content, you will drive even more traffic to your site. Continue reading