• Hi. I have a website to sell courses (based with Tutor LMS) and i sell them via woocommerce because support Greek banks payments.
    My problem is when a student buy a course have unlimited access time to this course.
    I try payment subscription pro but when subscription expires user still have access to course that have buy.
    I have buy the pro extension for Tutor LMS to unroll the user after expiration but nothing happens. User still have access to the curse.
    The only way to solve this is if change the order status. For e.g. from complete to canceled.
    I have found some functions to do this.

    $order = new WC_Order($order_id);
     
    if (!empty($order)) {
        $order->update_status( 'completed' );
    }

    How to run something like this with Automator when a subscription expires?

    P.S. see this page for more codes.
    https://quadlayers.com/change-order-status-automatically-in-woocommerce/
    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Automation to change order status in woocommerce’ is closed to new replies.