Meta Box License Warning On Plugin Activation with MB Bundled

Support Meta Box AIO Meta Box License Warning On Plugin Activation with MB Bundled

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #41639
    James CooperJames Cooper
    Participant

    I've created a plugin bundling Meta Box into it. Upon plugin activation, I'm getting a License Key warning from Meta Box.

    What's the best way to remove this warning? I've not yet found an obvious method.

    I do have the Agency Ultimate Plan and added the license key to my composer.json file before running 'composer install' to install Meta Box into the /vendors folder of my plugin.

    Other than the warning, everything seems to be working fine.

    Best Regards,

    Ryan

    #41650
    PeterPeter
    Moderator

    Hello,

    You can define the license key in a constant in the wp-config.php file to remove the warning. For example:

    define( 'META_BOX_KEY', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ); // Your Meta Box license key.

    Please read more here https://docs.metabox.io/updates/#can-i-define-the-license-key-via-a-constant-in-wp-configphp

    #41654
    James CooperJames Cooper
    Participant

    I am bundling Meta Box in a plugin. Forcing the end-user to have to access the wp-config.php to enter the license key would be a terrible user experience. I just want them to activate the plugin and not have to require any further action.

    So I defined the constant in my plugin's main file like so:

    
    if ( !defined( 'META_BOX_KEY' ) ) {
        define( 'META_BOX_KEY', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ); // Your Meta Box license key.
    }
    

    But that doesn't seem secure. I can obfuscate the key like so:

    
    if ( ! defined( 'META_BOX_KEY' ) ) {
        $encoded_key = 'QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVoxMjM0NTY='; // Your base64-encoded Meta Box license key.
        $decoded_key = base64_decode( $encoded_key );
        define( 'META_BOX_KEY', $decoded_key );
    }
    

    But that's still not foolproof. Are there any other options?

    #41655
    James CooperJames Cooper
    Participant

    Actually, the base64 encoding is no better because Chat GPT is able to decode it immediately. Just tested it and it returned my license key from the encoded license key.

    Any other options?

    #41656
    James CooperJames Cooper
    Participant

    Just to note: The encoded license key above is not my actual license key.

    #41661
    PeterPeter
    Moderator

    Hello,

    Defining the license key in a file under the plugin folder will not work. I will inform the development team to support this case in future updates.

    #41666
    James CooperJames Cooper
    Participant

    Yes, there needs to be a solution because otherwise, it's a bad user experience to require users that use the plugin I develop to have to purchase a Meta Box license and enter the license key in order to use the plugin.

    I've seen plugins that bundle ACF that do not have this issue, so there should be a solution that can be added.

    #41761
    Infolu OfficialInfolu Official
    Participant

    Guys, I came to this topic for the same reason, I need a way to activate the metabox io with a key, it is integrated into my plugin and using define( 'META_BOX_KEY' doesn't seem like a good thing to do

    #43439
    Infolu OfficialInfolu Official
    Participant

    Guys, any news about this?

    #43447
    Infolu OfficialInfolu Official
    Participant

    I tried to use defini within my plugin so that when metaboxAIO loads it recognizes the license, but AIO sometimes says that no license was found.
    if ( !defined( 'META_BOX_KEY' ) ) {
    define( 'META_BOX_KEY', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ); // Your Meta Box license key.
    }
    I was thinking that Metabox AIO could retrieve the key directly from a wp_options entry, this way my plugin would enter the license directly into the database.

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