Using wp_remote_get() to parse JSON from remote APIs

WordPress includes an exceptionally useful API called the HTTP API that can be used for sending data to and retrieving data from remote APIs. If you are building a plugin that talks to Stripe, MailChimp, or just about any other service that provides an API, you can use the WP HTTP API to make your job significantly easier. For this tutorial, I’m going to show you how to use wp_remote_get(), one of the several functions included in the HTTP API, to retrieve and parse JSON data from a remote API.

code

Unit Tests for WordPress Plugins – The Factory

For many plugins, writing adequate unit tests requires the creation of sample post, user, taxonomy, and other data inside of the test WordPress install. While the standard WordPress functions for creating data, such as wp_insert_post(), work just fine, WordPress provides a set helper classes called WP_UnitTest_Factory that make it exceptionally simple.

testing

Restrict Content Pro version 2.1 released

Restrict Content Pro version 2.1 has been in development for more than six months and finally, today, I am thrilled to announce that it has been released. This is a major release that introduces some very significant improvements and several major feature changes. The biggest change with 2.1 is the inclusion of the Stripe, PayPal Express, and PayPal Pro payment gateways in core. These gateways were previously only available as add-ons but are now included with the main plugin at no additional charge.

60420-featured

AffiliateWP turns one

One year ago today, I announced the launch of my commercial plugin for managing affiliate programs in WordPress, AffiliateWP. Today, that plugin is one year old, so I’d like to take a few minutes to look back over the last 365 days and examine how the project has performed, grown, and changed over time.

58571-featured

You should love your hosting company

I am a firm believer that if you don’t love your job, you should strive to change that by either finding one you love or making one you love. I am also a firm believer in loving where you live, who you associate with, what you do with your spare time, and every other aspect…

57138-featured

Your competitors should be a source of motivation

It is a common practice in all realms of business to think of your competitors as enemies. They are, after all, the ones stealing your customers and revenue. Right? While there is certainly nuggets of truth in this, I firmly believe that viewing competitors as enemies and being frustrated with how they “take your customers” is one…

Creating a Pricing Page with Restrict Content Pro

One of the most common questions I get about Restrict Content Pro is “how can I create a pricing page with a pricing table of my subscription options?“. There are numerous ways to do it and in this quick video tutorial I’m going to show you one of the simplest. We will use a free pricing…

product-restrict-content-pro

Error: Please enter a valid email address

Error: Invalid email