HISE Logo Forum
    • Categories
    • Register
    • Login

    Woocommerce linked licensing system for your plugins

    Scheduled Pinned Locked Moved General Questions
    91 Posts 14 Posters 9.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • orangeO
      orange
      last edited by orange

      Hi everyone

      We've been working on a WooCommerce linked licensing system for months. I can definately say that you can make an efficient online licening system with Hise. We've built even a License Manager application, and of course integrated the same system to the plugins too.

      Thanks go to @ustk for helping me about this system, he helped me to build a great solution for this 👍 I really appreciate that.

      Here is a working example video with this system: https://noiseash.com/knowledge-base/activating-plugins/

      I just wanted you to know that you can make the same thing including license activation/deactivation process with below requirments:

      • Install the JWT Authentication for WP REST API to your Wordpress Woocommerce website. This is a secure authentication method (No need to embed Woocommerce API keys to your software anymore).

      • You need to install Woocommerce License Manager plugin to your Wordpress Woocommerce website. That plugin is a go-to license plugin for Hise developers. It is a highly recommended, great and fast plugin that makes everything possible with lowest server requests. It's using JWT Auth system, that means no need to embed API keys to your exported plugin. This makes this plugin very secure and fast. With just one request, you can grab all of the user licenses which is a great feature! With Woocommerce REST API, you'd need to do it at least 2 requests, which isn't an economic way for the hosting server cpu. But with Woocommerce License Manager you can do it easily and much more securely.

      If you install both on your Wordpress Woocommerce website, then you're ready to go with using Hise's server API and Woocommerce License Manager API in your plugins to authorize your products. You'll be able to get:

      • Automatic license creation with the purchase
      • Activate / Deactivate Licenses with Machine ID (max. activation number can be assigned)
      • Get Purchased Products, Get License Meta Data,
      • Register License that were sold by resellers
      • Remove the license from the customer account
      • You can combine this with subscription based selling via using a Woocommerce Subscription plugin
      • And other ton's of features.

      API documentation is here: https://firassaidi.com/docs/documentation-woocommerce-license-manager/api-version-3/authentication-jwt/
      alt text

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

      d.healeyD LindonL Dan KorneffD Matt_SFM 5 Replies Last reply Reply Quote 7
      • d.healeyD
        d.healey @orange
        last edited by

        @orange How do you manage download permissions for users adding licenses sold by resellers? Do you generate a new $0 order when they add a license?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        orangeO 1 Reply Last reply Reply Quote 0
        • orangeO
          orange @d.healey
          last edited by orange

          @d-healey said in Woocommerce linked licensing system for your plugins:

          @orange How do you manage download permissions for users adding licenses sold by resellers? Do you generate a new $0 order when they add a license?

          Yes. First you need to upload the license key to the Woocommerce License Manager and set it to "unregistered" status. This means this lciense key won't be sold to other customers and it will wait to be registered. Then "Register License Key" endpoint needs to be triggered. https://firassaidi.com/docs/documentation-woocommerce-license-manager/api-version-3/register-license-key/

          develop Branch / XCode 13.1
          macOS Monterey / M1 Max

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @orange
            last edited by

            @orange said in Woocommerce linked licensing system for your plugins:

            Then "Register License Key" endpoint needs to be triggered.

            Does that create a new order?

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            orangeO 1 Reply Last reply Reply Quote 0
            • orangeO
              orange @d.healey
              last edited by orange

              @d-healey said in Woocommerce linked licensing system for your plugins:

              Does that create a new order?

              Yes it creates an order with "0" value, so the user will get download links, default file permissions like the regular orders.

              develop Branch / XCode 13.1
              macOS Monterey / M1 Max

              d.healeyD 1 Reply Last reply Reply Quote 1
              • d.healeyD
                d.healey @orange
                last edited by

                @orange Cool. I just wanted to check if that was the best way because that's what I'm doing :) I'm using a different license manager plugin though with a custom API.

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                orangeO 1 Reply Last reply Reply Quote 1
                • orangeO
                  orange @d.healey
                  last edited by orange

                  @d-healey said in Woocommerce linked licensing system for your plugins:

                  @orange Cool. I just wanted to check if that was the best way because that's what I'm doing :) I'm using a different license manager plugin though with a custom API.

                  Actually I've contacted to this plugin's developer and asked this system. Thanks him, to listem my endless requests, he is a great developer :) Then he added JWT Auth, Register License, Get User Licenses... and lot's of features and then released a new API v3 :) So this plugin is just for Hise users :)

                  develop Branch / XCode 13.1
                  macOS Monterey / M1 Max

                  1 Reply Last reply Reply Quote 1
                  • LindonL
                    Lindon @orange
                    last edited by

                    @orange - How did you deal with finding the correct folder on a Mac for your product...I assume that's where you are storing the license...

                    HISE Development for hire.
                    www.channelrobot.com

                    d.healeyD orangeO 2 Replies Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Lindon
                      last edited by d.healey

                      @lindon I store mine in appData. const appData = FileSystem.getFolder(FileSystem.AppData);

                      Actually I don't store the license on the user's system, I just store a flag to indicate if they have a valid license once it's been confirmed by the server. From a security point of view it doesn't make much difference except if someone does de-encrypt the file they'll just find a flag instead of the license key.

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      1 Reply Last reply Reply Quote 1
                      • orangeO
                        orange @Lindon
                        last edited by orange

                        @lindon said in Woocommerce linked licensing system for your plugins:

                        @orange - How did you deal with finding the correct folder on a Mac for your product...I assume that's where you are storing the license...

                        FileSystem.getFolder(FileSystem.AppData) is the way to go as a reference point. And you can combine it with .getParentDirectory() and/or .createDirectory("Your License Folder") relatively to this reference point.

                        develop Branch / XCode 13.1
                        macOS Monterey / M1 Max

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @orange
                          last edited by

                          @orange said in Woocommerce linked licensing system for your plugins:

                          @lindon said in Woocommerce linked licensing system for your plugins:

                          @orange - How did you deal with finding the correct folder on a Mac for your product...I assume that's where you are storing the license...

                          FileSystem.getFolder(FileSystem.AppData) is the way to go as a reference point. And you can combine it with .getParentDirectory() and/or .createDirectory("Your License Folder") relatively to this reference point.

                          & @d-healey ... yes obviously BUT:

                          FileSystem.AppData will point to the correct folder for the end-user product...but ONLY inside the end-user product.....

                          so I have a product called SynthSimple.... and a validation stand alone called myValidationApp.

                          inside SynthSimple the AppData folder points to:

                          C:/Users/joeBlo/AppData/Roaming/myCo/SynthSimple

                          inside myValidationApp it points to:

                          C:/Users/joeBlo/AppData/Roaming/myCo/myValidationApp

                          so myValidation App needs to put the validation key/flag/whatever inside the AppData folder for the end-product - not in its own folder....

                          So how do you do that?

                          HISE Development for hire.
                          www.channelrobot.com

                          d.healeyD orangeO 2 Replies Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @Lindon
                            last edited by

                            @lindon said in Woocommerce linked licensing system for your plugins:

                            So how do you do that?

                            fromAbsolutePath but not on master branch. You'll have to do as orange suggested and browse from the appData directory using getParentDirectory, getFolder, and getChildFile.

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            1 Reply Last reply Reply Quote 1
                            • orangeO
                              orange @Lindon
                              last edited by orange

                              @lindon

                              Why don't you put the validation key/flag...etc. inside the "C:/Users/joeBlo/AppData/Roaming/myCo/Validation Folder" for example?

                              So this folder will be a common folder for all software, even with or without Validation App. For example;

                               const validationFolder  = FileSystem.getFolder(FileSystem.AppData).getParentDirectory().createDirectory("Validation Folder");
                              

                              develop Branch / XCode 13.1
                              macOS Monterey / M1 Max

                              LindonL 1 Reply Last reply Reply Quote 0
                              • LindonL
                                Lindon @orange
                                last edited by

                                @orange said in Woocommerce linked licensing system for your plugins:

                                @lindon

                                Why don't you put the validation key/flag...etc. inside the "C:/Users/joeBlo/AppData/Roaming/myCo/Validation Folder" for example?

                                So this folder will be a common folder for all software, even with or without Validation App. For example;

                                 const validationFolder  = FileSystem.getFolder(FileSystem.AppData).getParentDirectory().createDirectory("Validation Folder");
                                

                                because its not even commonly "rooted" on MacOS...

                                HISE Development for hire.
                                www.channelrobot.com

                                orangeO 1 Reply Last reply Reply Quote 0
                                • orangeO
                                  orange @Lindon
                                  last edited by orange

                                  @lindon said in Woocommerce linked licensing system for your plugins:

                                  because its not even commonly "rooted" on MacOS...

                                  Yes AppData is common on both Win and Mac. This works here.

                                  develop Branch / XCode 13.1
                                  macOS Monterey / M1 Max

                                  LindonL 1 Reply Last reply Reply Quote 0
                                  • LindonL
                                    Lindon @orange
                                    last edited by Lindon

                                    @orange --er no its not. I t will be common on a single Mac but not between more than one Mac - well that's my understanding anyway.

                                    HISE Development for hire.
                                    www.channelrobot.com

                                    1 Reply Last reply Reply Quote 0
                                    • DabDabD
                                      DabDab
                                      last edited by

                                      @orange . Congrats ! bro. Learning many things from you.

                                      Bollywood Music Producer and Trance Producer.

                                      1 Reply Last reply Reply Quote 1
                                      • Dan KorneffD
                                        Dan Korneff @orange
                                        last edited by

                                        @orange Very interested in this. Well done!

                                        Dan Korneff - Producer / Mixer / Audio Nerd

                                        1 Reply Last reply Reply Quote 1
                                        • FortuneF
                                          Fortune
                                          last edited by Fortune

                                          Wow that's awesome! I didn't know it is ppossible with Hise. You guys did great job @orange @ustk 👏👏🎉🎉

                                          That's very helpful, thank you so much for this great info. I will definitely use this!!!

                                          1 Reply Last reply Reply Quote 1
                                          • Matt_SFM
                                            Matt_SF @orange
                                            last edited by

                                            @orange great job !! And thank you for your insight !

                                            Develop branch
                                            Win10 & VS17 / Ventura & Xcode 14. 3

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            47

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.1k

                                            Posts