Support » Plugin: WooCommerce » Orders have post status set to publish, possible fix?

  • Resolved glinch

    (@glinch)


    Hi

    As per the subject, the current status of all orders on our site are “publish”.

    The reason for this is that all products (due to a third party) had been set to private. As a quick (which it was) solution, the following SQL query was ran:

    UPDATEwp_postsSETpost_status= 'publish';

    This has of course, unfortunately, set the orders to publish also.

    In the order notes for a product I can see the correct status. Is it possible to reset ‘post_status’ according to the last order note?

    Any assistance would be greatly appreciated.

    Thanks

    • This topic was modified 4 months, 1 week ago by glinch.
    • This topic was modified 4 months, 1 week ago by glinch.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    There is no way you can change the order status depending on their order notes. However, you can add a custom code which will help you achieve that.

    Also, you can run another database query in which the ‘post_type’ is also selected as order and change their status. But this will change the status for all the order at once and change it to same for all.

    Thanks.

    Hi @rohittm thanks for the reply

    Appreciate that I could run one query that would change all post types of order, but of course this would be a last resort.

    with regards to:

    However, you can add a custom code which will help you achieve that.

    Achieve the orders having their original status? Could you please elaborate?

    Thanks

    • This reply was modified 4 months, 1 week ago by glinch.
    rohittm

    (@rohittm)

    Hi there,

    > Achieve the orders having their original status? Could you please elaborate?

    Yes, this would require some complex code customizations written possibly in PHP. You can get in touch with a developer who can assist you with these changes.

    glinch

    (@glinch)

    @rohittm I’m game, I do php develpoment! I am in this mess due to a query performed (in haste and for good reason) on the database.

    Appreciate that this would require a run-once function that will iterate through each order.

    You appear to have an idea of what would be required – any pointers and I can then follow up on them myself.

    Cheers

    rohittm

    (@rohittm)

    Hi there,

    I’m sorry as I’m not sure what code you can add here in order to achieve this. As I mentioned earlier if you need help with the customizations and the development of the site, get in touch with a developer who can assist you with these changes.

    Thanks.

    glinch

    (@glinch)

    @rohittm I am the developer of the site!

    I was going off what you said here:

    However, you can add a custom code which will help you achieve that.

    No worries, it appears you are now saying that that is not possible.

    Cheers

    • This reply was modified 4 months ago by glinch.
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.