WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] All Order statuses are missing (3 posts)

  1. tenkabuto
    Member
    Posted 2 years ago #

    One of the users within a website I control let some other webmaster into our Admin Dashboard to install a security plugin (called "WP Lockup"), which, among other things, adds a prefix to our wordpress database's tables.

    When I checked the WooCommerce Orders listing I found that most parts of our Orders are fine (their comments and customer notes have been preserved), except their statuses are all set to 'pending'. However, within the Order listing page in the 'Show all statuses' dropdown menu, only 3 items are designated as being 'pending'.

    I went into an order that I know had been completed, reselected 'completed' and then saved the order. The previously mentioned dropdown menu now lists "completed (1), pending (3)".

    I have no idea what to do, we need to have our Orders' statuses restored. Might there be a way of restoring them by looking to the Orders' comments and determining which of the statuses it should be set to, like the below?:

    Order status changed from on-hold to completed. => completed

    http://wordpress.org/extend/plugins/woocommerce/

    EDIT: I figured out that the issue had been caused not by the security plugin, but upon deletion of the Jigoshop plugin (which we had used previously).

  2. zviera
    Member
    Posted 1 year ago #

    I have exactly the same issue with the missing order statuses. Please share how you resolved it. Thanks a lot!

  3. tenkabuto
    Member
    Posted 1 year ago #

    You may want to look at the plugin I produced to help me resolve the issue: https://github.com/tenkabuto/Revitalize-Orders/blob/master/revitalize-orders.php I do not recommend using this on a live site, however, as (1) it can be a performance suck due to the issue mentioned two paragraphs down and (2) because it can cause WooCommerce to re-send order processing/completion emails to your previous customers.

    What it does is searches through all your orders then retrieves for each one all comments until it reaches one that looks like "Order status changed from processing to refunded.", at which case WooCommerce is told to set the order to whatever status it had last been changed to -- which would be refunded in the previous example.

    There is a problem with the aforementioned code, though: It runs through all orders. (I'd tried to have the code process only the no-status orders (when I introduced the $not_alive variable), however, due to the nature of the original, status-wiping error, there's no way that I know of to check for such orders.)

    Good luck in resolving this, I hope that either my response or my code -- flawed as it may be -- manages to help you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic