Get data from Woocommerce via server api
-
@dustbro Custom endpoint is server side code that you can interact with through POST/GET requests.
https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
-
I contacted the developer of Woocommerce License Manager plugin.
He is now building a new API that uses JWT Authorization (without API secret or key usage) with much more usable than Woocommerce API stuff. If any of you are interested, there will be no need to make custom endpoints if this new API will be finished.
Below POST/GET requests (such as Activate / Deactivate License with Machine ID, Get Purchased Products, Get Product Image / Meta Data, Add License that bought from a reseller...etc) can be made with only a user login and this API. User roles can be adjusted also.
-
I'll still need to custom endpoints, the APIs don't provide all the options I need.
-
@d-healey said in Get data from Woocommerce via server api:
I'll still need to custom endpoints, the APIs don't provide all the options I need.
Which kind of endpoints do you need more?
-
@d-healey I tried to read everything and understand it is still very difficult. would it be possible to have an example of how to load an image from a server? this could help to better understand this system. I have tried many times without success. I myself have a nas at home but I can't. if you want it of course :)
-
@yall said in Get data from Woocommerce via server api:
would it be possible to have an example of how to load an image from a server?
https://forum.hise.audio/topic/3849/images-from-server/8?_=1618520782258
@orange said in Get data from Woocommerce via server api:
Which kind of endpoints do you need more?
A custom one :p It's a lot to explain but basically I'm letting the user log in from my plugin, I display all of the products available on my site that can be loaded as an expansion, I also indicate which products the user has a license for and allow them to install/uninstall those ones. I want to do this in as few server requests as possible, using a custom end point allows me to do everything except installing in 2 requests. And a few additional requests to download product images. The number of requests required for installing depends on the number of
.hr
files that are needed.Anyway the problem I'm having at the moment is the WooCommerce function to provide an S3 download link is not working properly. I've asked on the WooCommerce support page but no luck so far.
Update: I solved my issue, I'd setup my Amazon credentials incorrectly.
-
@d-healey said in Get data from Woocommerce via server api:
display all of the products available on my site that can be loaded as an expansion
I can't wait to buy this from you :)
-
As I previously mentioned, I've contacted to the developer of Woocommerce License Manager.
For anyone who is interested, Woocommerce License Manager API v3 will be released soon. I think this plugin will be very useful for anyone is using Woocommerce to sell the software. This version will have:
- JWT Authentication (no api keys needed to embed in your software),
- Activate / Deactivate License with Machine ID (max. activation number can be assigned)
- Get Purchased Products, Get Product Meta Data,
- Register License that sold by resellers
And other ton's of features. API documentation is here: https://firassaidi.com/docs/documentation-woocommerce-license-manager/api-version-3/authentication-jwt/
-
@orange Don't suppose they mentioned how soon did they?! :D
-
That's great news. I was thinking about building a generic example project that talks to a WooCommerce store and implements a proper copy protection system, but then I have no experience with Wordpress and plugins whatsoever so if anyone is interested in doing the stuff on this side, it will highly increase the probability of getting realised.
-
@orange Will it have a system for transferring licenses between users? Will it be possible for a user to increase the max activations by purchasing additional licenses?
-
@Christoph-Hart said in Get data from Woocommerce via server api:
That's great news. I was thinking about building a generic example project that talks to a WooCommerce store and implements a proper copy protection system, but then I have no experience with Wordpress and plugins whatsoever so if anyone is interested in doing the stuff on this side, it will highly increase the probability of getting realised.
Yes if there would be an example, it would be great. About this, I haven't done anything yet too, except a couple of endpoint trials.
Also if I have time to implement something, I will definately let you know. If you need some wordpress JWT examples or a woocomemrce help, I can definately help with my limited knowledge.
-
@d-healey said in Get data from Woocommerce via server api:
@orange Will it have a system for transferring licenses between users? Will it be possible for a user to increase the max activations by purchasing additional licenses?
I think license transfer between users is not possible right now.
But there is a "maximum instance" setting for defining max. activations. In this case, the machine ID will be needed of course. -
@DanH said in Get data from Woocommerce via server api:
@orange Don't suppose they mentioned how soon did they?! :D
I think it will be ready soon, really :)
-
But there is a "maximum instance" setting for defining max. activations. In this case, the machine ID will be needed of course.
If the user buys a product, and then a week later comes back to buy the same product again, will they get a new license or will it increase the max activations on their existing license?
-
@d-healey said in Get data from Woocommerce via server api:
But there is a "maximum instance" setting for defining max. activations. In this case, the machine ID will be needed of course.
If the user buys a product, and then a week later comes back to buy the same product again, will they get a new license or will it increase the max activations on their existing license?
New license key will be assigned.
-
For your information guys,
Woocmmerce License Manager API v3 has been released, Thanks Firas (developer of this plugin) for the patience about my nonstop shameless requests :)
With all of the new API endpoints and JWT Authorization features, I can definately say that this plugin is one of the greatest and secure "in the box" solutions for Woocommerce License management that you can find!
- JWT Authentication (no api keys needed to embed in your software),
- Activate / Deactivate License with Machine ID (max. activation number can be assigned)
- Get Purchased Products, Get Product Meta Data (no need to dig into complex shitty Woocommerce REST API anymore)
- Register License that sold by resellers
- And other ton's of features
Plugin: https://codecanyon.net/item/woocommerce-license-manager/16636748?ref=firassaidi
API documentation: https://firassaidi.com/docs/documentation-woocommerce-license-manager/api-version-3/get-license-details/
-
@orange Thanks, this looks great.
-
May I ask in all respect why bother with this stuff at all when it can get stripped away easily by any script kiddy looking to get props from the scene release community?
It just seems like a lot of work for something that’s not secure at all.
No offense, just want to know if I missed something.
-
@clumsybear It can't be stripped away easily, this isn't like a Kontakt library, however as with all software it is certainly crackable.
Second, if you link software to your server then the client app is only half of the equation. If you remove the authorization from the client app then the server will refuse to talk with it. That means no downloads/support/updates for the end user.