Home › Forums › Legacy Support › Support queries › Other issues › Problem with Subscriptions part 2
- This topic has 75 replies, 3 voices, and was last updated 4 years, 6 months ago by Mk.
-
AuthorPosts
-
August 16, 2019 at 12:10 pm #222630Anshuman SahuKeymasterThere is only pitfall : If user cancels her subscription then she wont be removed any of the subscription related courses . Yes that change is correct and its this change : if($new_status == 'cancelled' && $old_status != 'on-hold'){ in this condition we are checking when memberhsip's status is changing and new status is cancelled and previous status is not "on-hold" which is in the case when failed payment order is deleted from system or its status changes from processing to failed . only then remove the user .August 16, 2019 at 12:23 pm #222635LuizBraParticipantThanks Alex, sorry for many question, I want fully understand the situation
If user cancels her subscription then she wont be removed any of the subscription related courses .
But if the user cancels her subscription the subscription status changes to the "pending cancelation" and she suppose to have an access to the subscription till it finishesYes that change is correct and its this change : if($new_status == 'cancelled' && $old_status != 'on-hold'){
Sorry what is this code? Is this the full code that we need to implement in the functions.php?in this condition we are checking when memberhsip's status is changing and new status is cancelled and previous status is not "on-hold" which is in the case when failed payment order is deleted from system or its status changes from processing to failed .
What is wrong with the "on-hold" status? we have some orders that "on-hold" and they considered to be completed. Could you remove this status?August 17, 2019 at 10:39 am #222709Anshuman SahuKeymasterOk yes we can restrict this to this condition "pending-cancellation" we will remove the users from courses only if they are manually cancelling their subscription . But still it would not solve the problem if user purchased one of the courses individually before . FOr this to check we would need to fetch atleast 10 heavy queries to database as told in previous replyAugust 19, 2019 at 9:00 am #222840LuizBraParticipantThis reply has been marked as private.August 20, 2019 at 2:06 pm #223075Anshuman SahuKeymasterHi please do share your ftp credentials in private reply to make the changes which will check once the subscription status is in "pending-cancellation" state .September 2, 2019 at 11:29 am #224430LuizBraParticipanthi Alex, sorry for the delay! Can you test the plugin on your setup? I can send you the plugin This way there won't be problems with our pluginsSeptember 2, 2019 at 1:40 pm #224483Anshuman SahuKeymasterWell we just need to change one line for your situation . one line in code , just need to check for the status to be exactly 'pending-cancellation' .could you please share the ftps again for this .September 2, 2019 at 1:43 pm #224485LuizBraParticipantThanks, Alex, I'll provide the credentials, but previously you said that you can't find a solution for us without heavy queries. Did you find a solution for our problem?September 3, 2019 at 11:59 am #224600Anshuman SahuKeymasterYes when you said the status of subscription changes to 'pending-cancellation' instead of "cancel" for the subscriptions which are cancelled deliberately by the users. But you are right there is no solution to check for which course user purchased previously before buying this subscription.this will remain an issue , user will be removed from all courses connected to this current subscription he is cancelling .September 4, 2019 at 12:00 pm #224750LuizBraParticipantThis reply has been marked as private.September 4, 2019 at 1:14 pm #224773LuizBraParticipantThis reply has been marked as private.September 4, 2019 at 1:19 pm #224777LuizBraParticipantThis reply has been marked as private.September 5, 2019 at 1:43 pm #224905Anshuman SahuKeymastercheck wether a user has an access to any courses already. This is the key issue , we cannot identify it as when the user is about to cancel the subscription , she would have the access to courses already according to this current subscription he is about to cancel . So checking whether she has already has the access to course would fail as user will always has access to the course in this case . This can only be checked by checking the user's old orders for each course which is connected with that subscription which will be the case where too many heavy queries would run . Yes nothing is impossible.We came up with a different solution in which user will not be removed from course completely . We will just adjust the subscription duration for the course for the user . Suppose a user purchases a subscription of 2 months for course A . Now this same user purchases subscription of 1 month for the same course A and fails to pay . Normally we use to remove the user from all courses connected to 1 month subscription (too which course A will also be connected) . But we can actually reduce the 1 month subscription duration from all courses connected to 1 month subscription product . Please let us know if that would work for you ?September 6, 2019 at 9:03 am #224997LuizBraParticipantThis is the key issue , we cannot identify it as when the user is about to cancel the subscription , she would have the access to courses already according to this current subscription he is about to cancel . So checking whether she has already has the access to course would fail as user will always has access to the course in this case . This can only be checked by checking the user's old orders for each course which is connected with that subscription which will be the case where too many heavy queries would run .
Thanks, Alex! Unfortunately I don't understand this without a specific example. Let's create a specific example. Let's have a user have an access to "Course A" for 35 days. Now a user decided to buy a subscription for bundle "Course A + Course B + Course C" for 365 days. So she starts a purchase for the subscription. The status of an order is "Pending" at first and she still have an access to a "Course A". Now once the status of the subscription order is changing from "Pending" to "Cancelled" she automatically lose an access to the "Course A". Can you once again explain why at the moment of changing order status from "Pending" to "Cancelled" we can't check wether a user already has an access to any courses already and if she has them then leave the access as it is? Please provide the specific example so we could discuss it :)September 6, 2019 at 9:06 am #224998LuizBraParticipantThis is the key issue , we cannot identify it as when the user is about to cancel the subscription , she would have the access to courses already according to this current subscription he is about to cancel . So checking whether she has already has the access to course would fail as user will always has access to the course in this case . This can only be checked by checking the user's old orders for each course which is connected with that subscription which will be the case where too many heavy queries would run .
Thanks, Alex! Sorry I don't understand this without a specific example. Let's create a specific example. Let's have a user have an access to "Course A" for 35 days. Now a user decided to buy a subscription for bundle "Course A + Course B + Course C" for 365 days. So she starts a purchase for the subscription. The status of an order is "Pending" at first and she still have an access to a "Course A". Now once the status of the subscription order is changing from "Pending" to "Cancelled" she automatically lose an access to the "Course A". Can you once again explain why at the moment of changing order status from "Pending" to "Cancelled" we can't check wether a user already has an access to any courses already and if she has them then leave the access as it is? Please provide the specific example so we could discuss it :) -
AuthorPosts
- The topic ‘Problem with Subscriptions part 2’ is closed to new replies.