Support » Plugin: AutomatorWP » Automation to change order status in woocommerce

  • Resolved cvouzas

    (@cvouzas)


    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.

    • This topic was modified 8 months, 1 week ago by cvouzas.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @cvouzas

    AutomatorWP has an add-on name Schedule Actions, this add-on lets you schedule an action so you can make an automatic status change like this:

    User purchases a product > Update the order status 30 days after

    This add-on is able to schedule any action from any of our integrations:
    https://automatorwp.com/add-ons/schedule-actions/

    Note: WooCommerce orders are WordPress posts, so you can use the action “Update post” to update the order information (even its status).

    Hope it helps!

    Thread Starter cvouzas

    (@cvouzas)

    Thank you very much for the answer.
    I try it.
    I try and the Tutor LMS addon but not working.
    I have make an automation if paid membership pro subscription expires then unroll all students.
    Student remain rolled when subcription expired.

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @cvouzas

    The action to “Unroll user from course” from our add-on is a premium one, so please, for premium support you may need to open a support ticket here:
    https://automatorwp.com/contact-us/

    Best regards

    Thread Starter cvouzas

    (@cvouzas)

    I have buy the Pro.

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @cvouzas

    The unique way to confirm this is by opening a ticket through our website

    Also, those forums are for the free features only, premium features need to get handled through support tickets

    Thread Starter cvouzas

    (@cvouzas)

    Ok. Thank you very much.

    Plugin Author Ruben Garcia

    (@rubengc)

    You’re welcome!

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