WordPress Heartbeat API: An Introduction
If I were to mention to a casual WordPress user something about the WordPress Heartbeat API, most would have never even heard of it, much less know that it’s been in WordPress since version 3.6(!) with very little fanfare. But, as it turns out, the Heartbeat API has gained traction in the developer community, as people are starting to utilize it to create some amazing plugins and use cases for WordPress. With this newfound popularity, I thought it would be great for us to dive into the WordPress Heartbeat API and see exactly what makes it… tick (see what I did there?)
What is the WordPress Heartbeat API
Plugins Utilizing the WordPress Heartbeat API
Here’s a list of the ones I’ve found that work well on the front-end that utilize the WordPress Heartbeat API:
- WP Heartbeat Notify – live notification of new blog posts to current site visitors.
- WooCommerce Live Stock Notification – This plugin refreshes automatically WooCommerce products stock using the Heart Beart API.
…and that’s it. Really. There are quite a few that use Heartbeat on the back-end, but these are the ones that utilize it for “forward facing” items such as store stock and notifications.
Of real interest is the WP Heartbeat Notify, which is designed as a template for other plugins.
So, if you’re a developer and want to tinker with one of WordPress’ most underutilized features, I would look into the Heartbeat API. There’s tons of potential there, but with such little integration there’s a golden opportunity for someone with the right idea to come along and crush it.