Advanced WordPress plugin development course #6. License management – .com

In the sixth lesson of the advanced WordPress plugin development course, we are going to see how license management works.

I already told you in previous lessons that we can use different methods to manage the license of our plugin. The basic logic is that we need to build a system that checks that the license number is valid. We can do it, for example, with user accounts or with requests to an API that validates the license.

In this course we are going to do it through an API that checks the license. We are going to do this with existing software on the market. There are many but this time we will see EDD or Easy Digital Downloads and its Software Licensing extension. With this software we have what is necessary to create licenses associated with products, in this case the plugin, and manage the entire activation and checking system through requests that we will make from our plugin. Let us begin!

That easy! With this we already have a robust license system in our Premium plugin. We have done the integration by modifying the pfcb_isPremium method of our plugin in which we will see different flows: activation, license check, license change and no license.

It is important to keep in mind that in order to make it work correctly we have to set up a WordPress separate from the one we use for the development of the plugin because we need to have a WordPress store and license manager on the one hand and the other one that has the plugin. This is necessary because the plugin will make requests to the store to activate the plugin and check its validity.

See also  WordPress marketplace course - .com

The most important thing when we implement this type of flow is that we have remote control because this plugin is going to be installed by hundreds of people and we have to be able to control that they cannot bypass the security of the license.

Although we have seen all the operation in detail, I propose as a homework that you improve this method with a control of error messages. In the EDD documentation it tells us that there are several license states and it could show custom messages in the WordPress administration panel.

As always, remember that if you have any questions or comments, do not hesitate to write to us through the support panel at 🙂

Remember that if you will have access to everybody the courses and you can also enjoy everything from .

All chapters in this course:

Loading Facebook Comments ...
Loading Disqus Comments ...