Meta Box License Warning On Plugin Activation with MB Bundled
Support › Meta Box AIO › Meta Box License Warning On Plugin Activation with MB Bundled
- This topic has 9 replies, 3 voices, and was last updated 1 year, 6 months ago by
Infolu Official.
-
AuthorPosts
-
April 28, 2023 at 12:00 AM #41639
James Cooper
ParticipantI'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
April 28, 2023 at 7:43 PM #41650Peter
ModeratorHello,
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
April 28, 2023 at 9:24 PM #41654James Cooper
ParticipantI 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?
April 28, 2023 at 9:31 PM #41655James Cooper
ParticipantActually, 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?
April 28, 2023 at 9:32 PM #41656James Cooper
ParticipantJust to note: The encoded license key above is not my actual license key.
April 30, 2023 at 7:54 AM #41661Peter
ModeratorHello,
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.
April 30, 2023 at 10:55 PM #41666James Cooper
ParticipantYes, 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.
May 9, 2023 at 4:15 AM #41761Infolu Official
ParticipantGuys, 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
October 6, 2023 at 8:36 AM #43439Infolu Official
ParticipantGuys, any news about this?
October 6, 2023 at 9:15 PM #43447Infolu Official
ParticipantI 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. -
AuthorPosts
- You must be logged in to reply to this topic.