Home › Forums › Legacy Support › Support queries › Other issues › Problem with Subscriptions
- This topic has 17 replies, 3 voices, and was last updated 5 years, 3 months ago by Mk.
-
AuthorPosts
-
January 10, 2019 at 2:24 am #191852LuizBraParticipantHi 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 asapJanuary 10, 2019 at 1:00 pm #191975MkModeratorGo 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); }January 15, 2019 at 8:33 am #192521LuizBraParticipantThis reply has been marked as private.January 16, 2019 at 8:02 am #192664MkModeratorWhile 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.January 16, 2019 at 8:49 am #192677LuizBraParticipantI see, thanks a lot! But did you test this? It still doesn't workJanuary 17, 2019 at 7:20 am #192791MkModeratorokay 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 .January 17, 2019 at 7:27 am #192795LuizBraParticipantThis reply has been marked as private.January 19, 2019 at 11:20 am #193062Anshuman SahuKeymasterThat 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 .January 19, 2019 at 2:10 pm #193079LuizBraParticipantThis reply has been marked as private.January 21, 2019 at 3:12 pm #193236MkModeratorWe checked again in codes and found we can do it. we will inform you tomorrow after modification .January 22, 2019 at 11:34 am #193368LuizBraParticipantThis reply has been marked as private.January 22, 2019 at 1:16 pm #193387Anshuman SahuKeymasterPlease 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?January 22, 2019 at 1:33 pm #193396LuizBraParticipantHi 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 aboutJanuary 23, 2019 at 11:13 am #193534Anshuman SahuKeymasterI 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 .January 23, 2019 at 11:37 am #193539LuizBraParticipantGood 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 perfectthat 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 .
-
AuthorPosts
- The topic ‘Problem with Subscriptions’ is closed to new replies.