Canceled order removes student from course

Home Forums Legacy Support Support queries Setup issues Canceled order removes student from course

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #254181
    hilmanf
    Spectator
    Hi, I have situation. WPLS removed student from a course when admin/system cancel the order. It's a problem when a student has 2 orders for the same course and completed only an order. Steps:
    1. Student X ordered course A. Order number is #1. Status on-hold.
    2. Student X ordered again course A. Order number is #2. Status on-hold.
    3. So Student X has 2 orders for the same course.
    4. Student X complete payment for order #1.
    5. System automatically subscribed/put the student to course A.
    6. Order #2 still on-hold. Of course. The student will only pay one order for one course.
    7. We cancel the on-hold order (#2)
    8. Once we cancled the on-hold order (#2) the student removed from the course. We need to re-add him again manually.
    Question: how to disable WPLMS/Woocommerce to automatically remove the user from a course when their order canceled.  
    #254332
    Anshuman Sahu
    Keymaster
    please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :     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);   }
    #254653
    hilmanf
    Spectator
    Works like a charm! Thanks buddy.
    #254889
    Veronica
    Moderator
    thanks for the confirmation . closing the topic. #staysafe.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Canceled order removes student from course’ is closed to new replies.