API methods

Home Forums Legacy Support Support queries API methods

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #389779
    Upface tech-admin


    We would like to integrate Hotmart Webhooks to Woocommerce and WPLMS.

    So we need to know how to do it with API (which methods, documetation,etc):

    1. Add student to course

    2. Remove student from course

    3. Add more time which user could be presented on the course (I think the best idea is add more time by api request and do not use wplms subscriptions at all)

    Thank you

    Anshuman Sahu

    well i think there wont be any need , in wplms when user purchased product course access is provided . 

    still if you want follow : https://vibethemes.github.io/wplms-docs/developer-guide.html

    Upface tech-admin

    ok, for NEW users we could create woocommerce orders, no problem 


    1) How to extend subscription or add more time by API? User will exted his subscription in the Hotmart APP and we need to do same by API in WPLMS

    2) How to remove users from course? If user cancelled subscription in Hotmart APP, we need to do same by API here.

    3) Will WPLMS assign course if Woocommerce order will be created by API (or from admin panel), not by /checkout page?

    So, we need to sync third-party app (Hotmart) with WPLMS (add students, remove students, add more time on subscription,etc). 

    Hotmart provides all webhooks we need, so here problem is how to do this on WPLMS side.

    Thank you.

    Anshuman Sahu

    1,2 . all api's are not not directly available . . also for this user need to authenticated via token. please check these docs: https://vibethemes.github.io/wplms-docs/developer-guide.html

    3) Will WPLMS assign course if Woocommerce order will be created by API (or from admin panel), not by /checkout page? : YES . 

    Upface tech-admin

    1,2 - https://vibethemes.github.io/wplms-docs/assets/images/demo/findclientid.png this tokens? If yes, okay, we could create tokens. But how to add student, extend time and remove students by api? Could you send me specific api methods to do it?

    Anshuman Sahu

    Im sorry these api's are not available as of now , you can create your own rest api in worpress in wplms . 

    to remove student you can use this function : 


    course expirty time saved in usermeta with meta_key as {Course-id} and meta_value is the timestamp when the course going to be expired.

    to adjust the time there is a usermeta : 

    $t = time()+(30*86400);//currenttime + 30 days converted into seconds 


    this means the course is extended to 30 days

    Upface tech-admin

    Will the subscription extended if I create second order?

    for example:

    1 order: 1 month of subscription

    2 order (after 10 days): 20 days of subscription (from 1 month) + new 1 month?

    Anshuman Sahu

    2 . well it when your purchase 2nd time at from that current time(when user orders) it will add more 30 days no matter how many days past when course was expired.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.