Developing a Simple WordPress Plugin from Scratch

January 18, 2015 | 8 Comments

Recently I walked folks through building a simple WordPress plugin from scratch at the WordPress Developers meetup in Fresno (my hometown).

We went through how to build a plugin for taking donations, optionally with a Stripe Checkout overlay.

Here’s the source code.

Learning Resources

As promised, here’s a list of resources to get you started with plugin development.

Developer Tools

Here’s a few tools I use as I’m developing and debugging plugins.

Google Calendar Events Version 2 Update

August 16, 2014 | 54 Comments

GCE Version 2.0 to be Released late August September 2014

Please submit any questions or troubleshooting requests in the public support forms


Stripe Checkout for WordPress

March 26, 2014 | 12 Comments

StripeIf you haven’t used Stripe for accepting payments online yet, you’re missing out on the best. Hands down.

They take care of payment processing with minimal headaches and extensive developer resources. But they also have a beautiful checkout form you can start using right away on your site.

Stripe Checkout was recently revamped with mobile optimizations and a high conversion form layout that’s gone through probably millions of A/B tests. See the demo for yourself.

Since it’s an embedded button that pops up a checkout form overlay provided by Stripe, you get all their improvements and optimizations automatically as they test and iterate.

It’s pretty simple to add HTML code and the JavaScript reference to any site, but in case you don’t want to bother with that, Nick Young and I created a simple Stripe Checkout plugin for WordPress.

It’s free in the WordPress repository, or simply search for “Stripe checkout” in your WordPress admin.

But wait…aren’t there a ton of good Stripe plugins already out there.

The simple answer is yes. And there are some good ones. If you want to integrate with plugins for e-commerce, membership sites, form building, etc., this plugin is not what you’re looking for. If you’re using one of these, you can probably find a Stripe add-on designed for it.

This Stripe plugin also does not store any post meta for transactions or send emails. Stripe does this for you, though you have to explicitly enable customer receipts.

Note that Stripe suggests that the pages hosting the checkout form be SSL (start with https://).

For version 1.0, there’s just a few settings to enter, then you place a shortcode on your pages where you want the button and overlay. That’s it.

At this point, like our Gumroad WordPress plugin, we’d like to hear from actual users what features they need.

Let us know your feature requests and they might get in a future update.

Update April 24, 2014

Added a few more shortcode options: multiple currencies, billing/shipping addresses, redirect URL, etc. See the changelog.

Pinterest Widgets WordPress Plugin

January 25, 2014 | 1 Comment

Update April 2015: My Pinterest WordPress plugins have been acquired, so they’re no longer under my ownership.

When folks want to integrate Pinterest with their WordPress site, usually it’s a focus on the “Pin It” button, which is why I created the Pinterest “Pin It” button WordPress plugin in the first place.

However, some people need a few more Pinterest widgets on their sidebar and other widget areas, which luckily Pinterest provides embed code for in their widget builder.

Besides the “Pin It” button, Pinterest provides code for a Follow button, Pin widget, Profile widget and Board widget. Since the “Pin It” button is taken care of in its own plugin, Nick Young and I created a Pinterest Widgets WordPress plugin that takes care of these 4 other widgets and all their options.

Oh, and you can use shortcodes to output all 4 widgets as well.

Download the free Pinterest Widgets WordPress plugin here (or simply search for “pinterest widgets” when adding a plugin in your WordPress admin).

Adding Software Licensing and Automatic Updates to a Premium WordPress Plugin

July 25, 2013 | 22 Comments

While developing a commercial WordPress plugin one element you’ll probably want to add is automatic updates for your customers. They’re used to it from free plugins in the repository, so why not make it an easy transition for them with your premium plugin.

keysWhy software license keys?

To verify each install of your plugin is valid, you’ll need to generate a unique license key for each purchase. Each customer then gets the same seamless one-click updates as you release them. No re-downloading, FTP uploads, or any of that nonsense.

A unique license key can also serve as a check when the customer creates (or you create) an account in your support system. You can take it further and log the sites the plugin and license key are being used on to make sure you’re only supporting the number of sites it’s intended for.

It’s not a requirement to provide a license key or automatic updates for a premium WordPress plugin, but it sure makes support and maintenance easier.

Options for the auto-updater only

Developing your own auto-updater and license key system was the most popular way up until there was a few more options in 2012. Quite possibly still the most popular.

If you’ve already established a purchase and delivery system for your plugin, and you don’t mind adding a license key generator yourself, here are a few sources to get the auto-updater working.

A Guide to the WordPress HTTP API: Automatic Plugin Updates by Abid Omar – This is a pretty extensive WP Tuts tutorial complete with screenshots and source files.

TGM Updater by Thomas Griffin and Gary Jones – This project on Github never reached 1.0, but it’s a great code base to start with.

Auto Hosted by David Chandra (reviewed on WP Daily) – I just ran across this recently. This is a premium plugin but you get something a little more polished, documented and with support.

Plugins for the complete package: Purchase, delivery, license key and auto-updater

Since I was in the market for a complete premium plugin package (digital delivery plus a license key and auto-update system), I turned towards the e-commerce plugins that provided all of this along with good documentation and support.

At this time, I only know of two.

Easy Digital Downloads + Software Licensing Extension

This is what I went with when I launched Pinterest “Pin It” Button Pro in the fall of 2012. I was fortunate in my timing in that EDD + SL was out there to use even though it was fairly new. There were a few technical issues along the way, but the products have matured a ton since release and I get fantastic support from Pippin and crew. There is extensive documentation and code snippets on how to integrate with your commercial plugin.

WooCommerce + Software Add-On

If EDD + SL didn’t work out for me I would’ve tried out WC + Software. I love the themes and plugins over at WooThemes and you can’t deny the widespread usage of WooCommerce in the WordPress e-commerce space (digital goods or not). I’d love to hear if any plugin shops out there are using this setup and how they like it. They have documentation for the add-on and I know their support is great.

Hosted complete package solutions

Updated October 2017

Using a hosted solution to help you issue software licenses for your premium WordPress plugins, as well as handle automatic updates for your users, can save quite a bit of time. Managing and controlling all of your users’ licenses from a dashboard can make life so much easier and convenient.

One service built specifically for WordPress plugin and themes is Freemius, which is pretty easy to integrate into your plugin. It lets your free users upgrade their license directly from within their WordPress admin dashboards. You can still sell licenses from any website like you normally would with premium plugins, but all using the same WordPress software licensing service. What’s nice is that their premium plugins update mechanism is that it mimics the official WordPress plugins update technology, enabling a super smooth updating process for your customers.

The below solution is currently on hold indefinitely.

SellWP is the “easiest way to start selling your WordPress themes and plugins.” It’s a brand new hosted solution right around the corner and comes from John Turner, the developer behind the Coming Soon Pro plugin.

You’ll still set up your marketing website as you normally would, but this solution provides the rest for you (yes the purchase, delivery, license key and auto-updater).

If you’re interested go check out the new video and sign up on the launch list over at SellWP.