mikeramsey869
Forum Replies Created
-
works for me with latest woocommerce and wordpress. Fixed it up immediately after clearing server cache.
Nice work with this plugin @optimocha ??
Forum: Plugins
In reply to: [License Manager for WooCommerce] Python REST API Examplecan you provide the the scripts you use with the api keys removed and example to shown. If the wordpress is showing a 500 error its possible the PHP is wrong though vs the api.
Did you add stuff into your child theme’s functions.php? If so first off your going to want to probably comment out or remove it and make sure the wordpress is not showing errors when curling the domain api.
Heres minimal example Python script. You can load in like Pycharm and run easily to test retrieving a single license key.
This should work assuming you have created a License Key and setup your rest API keys and their active and valid.
Edit the edit section with your information as applicable then run it
https://pastebin.com/pihY7Ry4Should look something like the below when valid key is run.
Once you have confirmed the API is working then I recommend going back and trying to work with the fancy filters. I got hung up on trying to make it all work before gradually working up to what I wanted.
Only thing really left is getting it to save the uuid and nice_name from the device into the license meta. The Validate does not check if expired inactive so best option I found was to validate based off the license key full details from the retrieve license details base and add my logic from there.
Hopefully that helps you @willwinter
Forum: Plugins
In reply to: [License Manager for WooCommerce] Python REST API ExampleNice snippet @processzip I wish i had seen that before i made my wrapper lol.
I added your snippet with attribution in my pylicensemanager which is opensource.
The the code has an option to generate uuid and to send that back in json response too. We just need the plugin to accept this by default and consider it valid on the validate or activate vs invalid if its activating/validating on the same uuid vs failing saying already registered.
feel free to submit pull requests
https://gitlab.com/mikeramsey/pylicensemanager
https://pypi.org/project/pylicensemanager/@drazenbebic Where do i put the filters and hooks for this?
https://www.licensemanager.at/docs/tutorials-how-to/additional-rest-api-validation/
https://www.licensemanager.at/docs/tutorials-how-to/modifying-the-rest-api-response/Also is there any documentation for the upcoming v3 api? If so please let me know would like to update the library to fully support all methods and would be nice if we can add public key signed messages which can be verified client side to confirm the response is coming from our url and signed by our public key.