• Resolved jbslettebak

    (@jbslettebak)


    I am currently using the sequential order number plugin on a site I developed. Everything has been working great until recently. I have a snippet in my code that looks like this:

    $order = wc_get_order($arrayItem[0]) // $arrayItem[0] is my Order ID
    $order->add_order_note($noteContents);
    $order->update_status(‘completed’);
    $order->save();

    Again, I had no issues with this code until recently, but now whenever I try to update a status programatically (using update_status() ), the order NUMBER changes for whichever order had its status updated. I tried also using the “new WC_Order” method to get my order object to see if this would make a difference, but it did not.

    There must be a way to achieve updating the status programatically without affecting the order number, but I could use some help narrowing down the solution. Any help is much appreciated and please let me know if any further information might be needed to resolve my issue.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jessicaskyverge

    (@jessicaskyverge)

    Hi there,

    Thank you for reaching out for help with Sequential Order Numbers. I’m happy to help out here!

    Apologies for the delay on this. We’ll review our processes so we do better in the future for timeliness of replies.

    Could you confirm if your goal is to make sure the orders are in the completed status with this code snippet?

    Thank you,

    Plugin Support Benjamin, SkyVerge Support

    (@benjaminskyverge)

    Hey @jbslettebak,

    It has been a long time since we heard from you, so I’m going to mark this topic as resolved. I also want to offer my apologies for the delayed initial response from us. I hope you were able to get this question resolved!

    If you’re still experiencing issues please take a look at our FAQs for more information and create a new thread if you have further questions.

    Thanks,
    Benjamin ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Updating Order Status Programatically Results in Order Number Change’ is closed to new replies.