Problem with Subscriptions

Home Forums Legacy Support Support queries Other issues Problem with Subscriptions

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #191852
    LuizBra
    Participant
    Hi there, We noticed a problem with the subscription. In order to reproduce this: 1) Buy a normal product with the course (NOT subscription). And you have a normal access to a course 2) Now try to buy the subscription product for the same course. And did not pay it so now you have cancelled subscription. Right after that you would lose the access for the subscription. Why is that? You don't suppose to lose the access in this case. Please fix this asap
    #191975
    Mk
    Moderator
    Go to Wp-admin -> plugins -> editor ->select  wplms-customizer plugin and copy following code at below of wplms-customizer.php. code: add_action('init','remove_cancel_order_course_check');   function remove_cancel_order_course_check(){   $obj = BP_Course_Action::init();   remove_action('woocommerce_order_status_cancelled',array($obj,'bp_course_disable_access'),10,1);   }
    #192521
    LuizBra
    Participant
    This reply has been marked as private.
    #192664
    Mk
    Moderator
    While editing wplms-customizer.php you made a little mistake. You had commented these lines of code:   include_once 'classes/customizer_class.php';   if(class_exists('WPLMS_Customizer_Plugin_Class')) {     // instantiate the plugin class     $wplms_customizer = new WPLMS_Customizer_Plugin_Class(); }   Which is part of wplms-customizer plugin, without these lines code would not work. For now, I have changed the code. you can test it now.  
    #192677
    LuizBra
    Participant
    I see, thanks a lot! But did you test this? It still doesn't work
    #192791
    Mk
    Moderator
    okay Well that would be tought to check if user has already bought the main product ,but we can do this . We will add a check for this if user has bought the course product then we wont revoke his access on cancelled order(cancelled subscription ) . but for that we would need to your FTP credentials to make this change in your woocommerce subscriptions addon .
    #192795
    LuizBra
    Participant
    This reply has been marked as private.
    #193062
    Anshuman Sahu
    Keymaster
    That would be impossible to put a check for this .There are unlimited possibilities to gain access . One thing we can check is : we can check if user has already subscription to that course and its greater than the current subscription he is buying .If we put a simple existing subscription check then it might create other issues with it .   A question in popped in my mind : Why is user purchasing subscription if he is already added to course .
    #193079
    LuizBra
    Participant
    This reply has been marked as private.
    #193236
    Mk
    Moderator
    We checked again in codes and found we can do it. we will inform you tomorrow after modification .
    #193368
    LuizBra
    Participant
    This reply has been marked as private.
    #193387
    Anshuman Sahu
    Keymaster
    Please tell me if the subscription for that user gets expired or its status changes to on-hold as they are not paying for it  before the user subscription is cancelled?  
    #193396
    LuizBra
    Participant
    Hi Alex,
    Please tell me if the subscription for that user gets expired or its status changes to on-hold as they are not paying for it before the user subscription is cancelled?
    Sorry I don't understand what you've said. Can you be more specific please? I'm not sure that you understand the initial problem. Could you please read my initial problem once again and see this issue yourself if you not sure what I'm talking about
    #193534
    Anshuman Sahu
    Keymaster
    I got your issue in first place .Now I checked the code and found out that the user is being removed from course due to wplms woocommerce subscriptions addon ,because there is a check for cancelled subscription .the user will be removed all connected courses . Now im thinking of a solution for this : a logic condition in which we have to check if user has already bought the course or not then we do not remove the user from course So we need a specific condition to be implemented for your use case only . Checking user already in course or not is not possible as there are unlimited ways to get access to the course . Therefore I need a pattern that is being followed on your site with the user subscription . you said : "And did not pay it so now you have cancelled subscription." . that means that user's subscription (not in course , this is in respect to the woocommerce subscription ) status would be expired or on hold . refer:http://prntscr.com/mazx2l  so we can check here for the previous subscription of user and only then remove user from course .   IF we simply check if user is already in course then it wont remove the user when subscription actually cancelled .    
    #193539
    LuizBra
    Participant
    Good that you get the point. Do you have any specific questions to me?
    you said : "And did not pay it so now you have cancelled subscription." .
    Let me explain once again maybe this will clear something (or maybe not :) since you already got my point). 1) A user bought an access to a "course A" via the woocommerce (NOT wocoommorce subscription) for let's say 6 months. 2) Then in 5 months she decides to buy a woocommerce subscription product for this "Course A" so she would have an unlimited access to it in the future. 3) She adds the woocoommerce subscription product to the cart and go to checkout and tries to pay for it. In this case she still has an access to the course that she already bought 5 months ago. 4) However, if she for some reason she doesn't pay for the Wocoomerce subscription product then her subscription product become Cancelled. After that she immediately lose an access to a course although she paid for it 5 months ago and she suppose to have 1 more months left of the access. I don't what would happen if the order would be in "On hold" status. And whether she would lose an access or not in this case. This is something that you need to check. Also I don't get these 2 phrases. Sorry my english is not perfect
    that means that user's subscription (not in course , this is in respect to the woocommerce subscription ) status would be expired or on hold . refer:http://prntscr.com/mazx2l so we can check here for the previous subscription of user and only then remove user from course .
Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Problem with Subscriptions’ is closed to new replies.