This is the moment of truth for my first major feature of the Ninja Forms core product. Today, the team at the WP Ninjas released version 2.9.12 of Ninja Forms, which introduces the Upgrade Handler. The importance of this update is further highlighted by the milestone of 200,000+ active installs for the free core plugin. As I mentioned in a previous post, Responsible Plugin Upgrades, upgrades don’t run just once on a development environment, but rather on each customer’s website. Again, for the sake of emphasis, that is 200,000+ websites, and a lot that can go wrong.
One process for all extensions
When building a brand distributed over 40+ add-ons you must be careful about feature implementation in terms of both code and user experience. In the past, each upgrade was independent and responsible for itself in regards to both notification and execution. Now, all add-ons can utilize a hook to register their upgrade(s), streamlining the process with a single notification.
The resulting process is single click for the customer, sans any necessary decisions about what action needs to be taken.
Previously, we ran into an issue where customers were attempting to update out of order. This wasn’t much of an issue until people started to make large jumps in updates (like v2.2.6 to v2.9.11). The issue was not that we weren’t outputting the notices in order, but rather that when there were multiple upgrades the order of action was not clear, resulting in some broken upgrades.
One page for all upgrades
Prior to the Upgrade Handler, upgrades required page redirects in order to transition upgrade processes. This created a disjointed experience for the customer and gave no indication of what was going to happen next. With the Upgrade Handler, upgrades are processed via ajax and the server dictates the order of processing. This single page approach allows the customer to stay fully aware of what has already happened, what is happening, and what is about to happen.
If something breaks, tell someone about it
If a tree falls in a forest and no one is around to hear it, does it make a sound?
Philosophically, thought experiments about observation are interesting, but in terms of development if something breaks and you don’t tell anyone about it then it cannot be fixed. Instead of allowing a process to fail silently, tell someone about it. Help your customer help you help them. (Not only does this help a customer understand what is happening, but it also speeds up the development process.)
Yeah! It worked!
Finally, we let the customer know when the process is completed. Make it obvious.
Next time I’ll get into some code and breakdown the new upgrade class and how to register upgrades with the Upgrade Handler.