Question about using LicenseManagerForWooCommerce programmatically
-
Hi,
I’m using your plugin License Manager for WooCommerce, and I need to display decrypted license keys for the currently logged-in user using a custom shortcode or a standalone plugin.However, I’m having trouble accessing the decrypted license values outside your plugin (in a custom shortcode). Could you please help clarify a few things?
- What is the correct full path and filename of the class that handles license decryption?
(Specifically, the one that contains thegetDecryptedLicenseKey()method.) - How can I properly include or autoload this class from outside the plugin?
For example, should Irequirea specific file likevendor/autoload.php, or is there a central file that sets up autoloading for all classes? - Is it safe to instantiate and use the license model directly from outside the plugin like this?
$license = new LicenseManagerForWooCommerce\Models\Resources\License($id);
$license_key = $license->getDecryptedLicenseKey();Or is there a different recommended way to fetch and decrypt a license by its ID?
- 4. Are there any requirements or dependencies needed for license decryption to work correctly?
(e.g., encryption keys, user context, WooCommerce session, admin environment, etc.) - I’m building this as a separate plugin to avoid overwriting anything during updates.
- Your guidance would be much appreciated 🙏
- Thanks in advance!
- What is the correct full path and filename of the class that handles license decryption?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Question about using LicenseManagerForWooCommerce programmatically’ is closed to new replies.