[Resolved] activate / add license in wp-config – is it possible?

Home Forums Support [Resolved] activate / add license in wp-config – is it possible?

Home Forums Support activate / add license in wp-config – is it possible?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #464605
    Webmaster

    How do I add or activate or even set the license code serial for GeneratePress in wp-config.php? Is it possible?

    #464838
    Tom
    Lead Developer
    Lead Developer

    It’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.

    #2440686
    Content-Produktion

    I 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
    Ulrich

    #2442114
    Tom
    Lead Developer
    Lead Developer

    No, 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.

    #2442666
    Content-Produktion

    Hi 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
    Ulrich

    #2443822
    Tom
    Lead Developer
    Lead Developer

    I’ll keep an eye out for better solutions that are compatible with our licensing system ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.