• Hello everyone, I’m experiencing an annoying issue with my woocommerce order statuses.

    So, I’m using woocommerce and “WooCommerce Cart Abandonment Recovery” plugin.

    For those who don’t know how the abandonment cart plugin works, customers start a checkout, enter their email, and don’t place an order.

    Then, the plugin will email them to say that their cart was abandoned and they forgot to pay.

    There is a rule in woocommerce that will change the status from pending to cancelled within 24 hours.

    I have some customers who place their orders in 2 days. Because they received an email stating that their cart was abandoned, they click the cart link from the email, but the order status doesn’t change!

    Because of that, neither I, as a merchant nor the customer, receive any email notification of their order. I have to manually access the admin panel and change the status.

    Please help me, I need the status to change if the customer place the order after it was cancelled.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @yngmind,

    Thanks for reaching out. I am sorry to know that you are experiencing issues.

    I have escalated this with our development team. They will get back to you as soon as they can.

    Kind regards,
    Moshtafizur

    Plugin Author Algoritmika

    (@algoritmika)

    Hi, @yngmind,

    Sorry for not getting back to you sooner.

    Could you please elaborate on “customer place the order after it was cancelled”? How do you know if customer placed an order? As I understand, the order status is still “cancelled”, so are there any other order parameters by which we can determine if the order was placed or not?

    Thread Starter yngmind

    (@yngmind)

    Hello, sure.

    What I meant is that customer complete the payment of the order that had a status “cancelled”, it happens because of abandonment cart plugin, it sends a customer a link to the cart that he abandon.

    Woocommerce automatically change status to cancelled if you don’t pay in 24 hours.

    So, the customer complete the payment for the order which had a status “cancelled”, and the status doesn’t change after that.

    Because of that customer doesn’t receive an email with confirmation, and I don’t receive any emails.

    How do I know? Customers normally complain that they haven’t received any emails, I can see a payment on stripe and it sends me an email.

    • This reply was modified 8 months ago by yngmind.
    Plugin Author Algoritmika

    (@algoritmika)

    Hi, @yngmind,

    Before I add it to the plugin, could you please test if this solves our task?

    I think this PHP snippet should stop WooCommerce from making your unpaid orders cancelled:

    add_filter( 'woocommerce_cancel_unpaid_order', '__return_false', PHP_INT_MAX );

    Another approach would be to “complete” paid/cancelled orders (as you suggested):

    add_action( 'woocommerce_update_order', function ( $order_id, $order ) {
        if ( $order->is_paid() && $order->has_status( 'cancelled' ) ) {
            $order->update_status( 'completed', __( 'Paid cancelled order completed.' ) );
        }
    }, 10, 2 );

    Could you please give it a try and let me know what you think?

    Thread Starter yngmind

    (@yngmind)

    Hello, I’ve tried both codes.

    First one seems like works fine, so what will happen, those orders they will be pending?

    After installing the second code my checkout stopped working

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Order status doesn’t change after order was cancelled’ is closed to new replies.