- This topic has 5 replies, 2 voices, and was last updated 1 year, 4 months ago by Tom.
-
AuthorPosts
-
January 6, 2018 at 10:18 am #464605Webmaster
How do I add or activate or even set the license code serial for GeneratePress in wp-config.php? Is it possible?
January 6, 2018 at 8:14 pm #464838TomLead DeveloperLead DeveloperIt’s not possible currently. When the license key is added, a function needs to run (save, update) to send the request to our server. Saving some code in wp-config.php can’t fire a function to make that call.
November 29, 2022 at 3:35 am #2440686Content-ProduktionI have not found any newer post regarding this topic, so I’ll add my 2cents here. Meanwhile, 4 years later, there is still no common “pattern” how the developers of paid plugins check and manage the licenses. However, the need for keeping the license in code is there, and IMHO it is getting stronger.
For larger sites needing more functionality there will be multiple paid plugins. So dealing with a license should be a ONE-TIME-task ( i.e. should be implemented once and for good after buying/installing ) and not an ongoing hassle that needs attention and manual intervention for every plugin.
In CI/CD deployment scenarios, where code is deployed often and to multiple containers or environments, it is essential that the complete setup can be done in code, which would mean either a WP-CLI activation or simply a question of adding a license key as a constant in wp-config. Some Plugins already do this, and it is a breeze to use.
Regarding GB, there was a discussion in this forum about a WP-CLI activation ( in 2019), but I couldn’t find out whether it was built eventually.
So the bottom line is: as of 2022, can GP (and GB, which we also use) be licensed in code? If so, how? If not – when ๐ ?
Regards
UlrichNovember 29, 2022 at 9:46 pm #2442114TomLead DeveloperLead DeveloperNo, it’s not possible by default right now.
As mentioned above, license key activation requires a request sent to our server with your URL and license key in order to activate it on your site. Right now, that request is triggered when you click the Save button next to the license key field. This is a one-time thing you need to do unless your URL changes.
As of right now, I’m not aware of a better way to do it that would shave time off license key activation for our users. You could write a helper function that fires on plugin activation that has your license key built into it, but it’s not something we can build into the plugin.
November 30, 2022 at 5:54 am #2442666Content-ProduktionHi Tom,
ok, so we will have to live with this hassle. Comes up every time we deploy to an environment with different/dynamic hostnames, and these names are not accepted/detected as dev sites. Of course you could also say that this way of dev/staging deployment is our own fault…
There is certainly a need for a common pattern for licensing and dev environment detection, so that site owners don’t have to implement multiple fixes and workarounds for every single plugin in the universe.
Anyway, thanks for taking the time to reply.
Regards
UlrichNovember 30, 2022 at 7:18 pm #2443822TomLead DeveloperLead DeveloperI’ll keep an eye out for better solutions that are compatible with our licensing system ๐
-
AuthorPosts
- You must be logged in to reply to this topic.