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:
- Student X ordered course A. Order number is #1. Status on-hold.
- Student X ordered again course A. Order number is #2. Status on-hold.
- So Student X has 2 orders for the same course.
- Student X complete payment for order #1.
- System automatically subscribed/put the student to course A.
- Order #2 still on-hold. Of course. The student will only pay one order for one course.
- We cancel the on-hold order (#2)
- 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.
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);
}
Works like a charm!
Thanks buddy.
thanks for the confirmation .
closing the topic.
#staysafe.