Gravity Forms is a tremendously powerful plugin for WordPress and Help Scout is an awesome customer support system that also provides a service for handling documentation. What they miss, however, is a direct connection that allows site owners to provide customers with a way to search the Help Scout documentation before they can submit a support ticket submission form.
The WordPress metadata API is a simple way to store and retrieve information related to various objects in WordPress, such as posts, users, and taxonomy terms. Out of the box, WordPress includes post meta, user meta, and term meta, but what if you want metadata on other objects, such as custom objects provided by a plugin? Thankfully, the metadata API is actually quite simple to extend, allowing developers to easily register their own kind of metadata that is attached to their own, custom objects.
In the previous part of this series we wrote the base class that we can then extend for each table in our database. For this part, we’re going to look at what an orders table might look at and build the database class for interacting with the orders table.