Title: Order Search Repair for WooCommerce
Author: indextwo
Published: <strong>May 14, 2017</strong>
Last modified: December 12, 2018

---

Search plugins

![](https://ps.w.org/order-search-repair-for-woocommerce/assets/banner-772x250.png?
rev=1656610)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/order-search-repair-for-woocommerce/assets/icon.svg?rev=1656610)

# Order Search Repair for WooCommerce

 By [indextwo](https://profiles.wordpress.org/indextwo/)

[Download](https://downloads.wordpress.org/plugin/order-search-repair-for-woocommerce.0.1.2.zip)

 * [Details](https://wordpress.org/plugins/order-search-repair-for-woocommerce/#description)
 * [Reviews](https://wordpress.org/plugins/order-search-repair-for-woocommerce/#reviews)
 *  [Installation](https://wordpress.org/plugins/order-search-repair-for-woocommerce/#installation)
 * [Development](https://wordpress.org/plugins/order-search-repair-for-woocommerce/#developers)

 [Support](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/)

## Description

Following the major v3 update to WooCommerce, searching for older orders by postcode,
full name or address no longer works – the search process was optimised, but the
changes were not applied retroactively to existing orders. Order Search Repair for
WooCommerce scans all of the orders in your WooCommerce store and updates them to
make your orders fully searchable again.

Features include:

 * Ajaxified processing to update the orders in manageable chunks
 * Customisable limit for the number of orders to process at a time so that even
   low-powered servers can process without issue, and beefier setups can get it 
   done in less time
 * Options to immediately update the orders live, or output an SQL query so that
   you can do it in the database yourself
 * Customisable offset so that you can skip any orders you don’t need (SQL export
   option only)
 * Ability to cancel the process at any point if you need to, with a live tally 
   of the number of orders already processed if you need to come back to it later.

## Installation

Upload the Order Search Repair plugin to your website & activate it as normal. Then
click on _Order Search Repair_ under the WooCommerce menu.

Make sure to back up your database before making any significant changes!

## FAQ

  How many orders can be processed at once?

Order Search Repair runs its operations in manageable chunks which it will process
automatically, one after the other. rather than trying to process all orders in 
one go. The recommended maximum limit is 500 orders per chunk.

  How long does it take?

That entirely depends on the number of orders in your store. Order Search Repair
has been tested with on stores ranging from 400 orders (which took about 10 seconds);
to over 50,000 orders (which took about 25 minutes). On average, each batch request(
varying from 100 to 500 orders per chunk) can take between 15 and 30 seconds.

  Can I just leave it running in the background?

You can absolutely leave it running and go make yourself a coffee, as long as you
don’t exit the page. Doing so will effectively cancel the update process, and you
won’t know how many orders have been processed.

  Will it time out?

Depending on the specification of your server and installation, you may find the
process takes a lot longer than anticipated. In that event, there is a 60-second
timeout when waiting for the server to respond, after which it will show an alert.
If this is happening to you, try lowering the limit for the number of requests.

  Can I see how many orders will be affected?

As of version `0.1.2`, you sure can. Click on the _Get total number of unindexed
orders_ button and it will retrieve the total number of orders that either have 
their search index missing, or the value is empty. Note that nothing will be done
at this point – it’s just to give you an idea of how many orders need updating.

  What’s the difference between updating orders and Output as SQL?

Selecting _Update all order indexes_ will instantly modify the meta for every processed
order in that chunk, updating your site as it goes. _Output as SQL_ does _not_ make
any changes to your site; it simply outputs the raw SQL queries so that you can 
run the update directly on the database yourself.

  Why would I want to output as SQL rather than update the live orders?

Order Search Repair was originally coded for a large-scale site with several thousand
orders. Running the process on the live site would have meant potentially eating
up resources and writing to the database while live transactions were going on. 
So, the option to simply output the SQL was added so that it didn’t do anything 
except read from the database while it was running. Then, the database could be 
updated later, and it would only take a few seconds to parse even several thousand
SQL queries.

  Should I back up my database?

Absolutely 100% definitely yes. There is virtually no risk of anything drastically
bad going wrong, as even in the worst case, the tool will only affect the `wp_postmeta`
table. However, as with any plugin that makes significant changes to your database,
you should _always_ back up as a precaution before doing anything.

  Why can’t I set an offset for updating live orders?

When updating live orders (rather than exporting SQL queries), the plugin is updating
the post’s meta on the fly; as such, the query that searches for older orders in
the first place doesn’t pick up orders that have been updated. So, if you were to
include an offset, it would actually skip over orders that need to be updated. Hence,
no offset.

## Reviews

![](https://secure.gravatar.com/avatar/820b6e01a383e867152e3a005cbd0945052eca8ca6c4006e493c8c470a49613c?
s=60&d=retro&r=g)

### 󠀁[Perfect… saved my life!](https://wordpress.org/support/topic/perfect-saved-my-life/)󠁿

 [davidpietersen](https://profiles.wordpress.org/davidpietersen/) August 12, 2019
1 reply

Thanks SO much to the dev of this plug-in, solved my problem in one go… I am VERY
grateful.

![](https://secure.gravatar.com/avatar/eb47000ce6ca0f3ab81adcf4902b1261d3466b055317964270f57735c9029daf?
s=60&d=retro&r=g)

### 󠀁[Thank you!](https://wordpress.org/support/topic/thank-you-1672/)󠁿

 [Abanys-Concept](https://profiles.wordpress.org/abanys-concept/) July 19, 2018

An excellent plugin, simple and effective!

![](https://secure.gravatar.com/avatar/6a717024bb5772bf33419ee3bce8e0f5252d51615c6c12ad649518a1fb93109b?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-4931/)󠁿

 [islamfotouh](https://profiles.wordpress.org/islamfotouh/) March 19, 2018 1 reply

Work perfectly good job

![](https://secure.gravatar.com/avatar/0e26244e009efc9ea66e9ef911c98066c865ccaf666ea9ad793221f83673406d?
s=60&d=retro&r=g)

### 󠀁[Great](https://wordpress.org/support/topic/great-6771/)󠁿

 [kribo](https://profiles.wordpress.org/kribo/) July 12, 2017 1 reply

It does exactly what it says , it allows you to search through older orders . Thank
you !

![](https://secure.gravatar.com/avatar/5090d7190e7ba895ab777b276fdc83b52ac7dcf90b8ed480694a3a45a26c967b?
s=60&d=retro&r=g)

### 󠀁[terrific!](https://wordpress.org/support/topic/terrific-50/)󠁿

 [emgraphics](https://profiles.wordpress.org/emgraphics/) June 12, 2017 1 reply

Did exactly what we needed -allowed the client to search orders back to 2013 instead
of just this year! thank you for making this!

 [ Read all 5 reviews ](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/)

## Contributors & Developers

“Order Search Repair for WooCommerce” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ indextwo ](https://profiles.wordpress.org/indextwo/)

[Translate “Order Search Repair for WooCommerce” into your language.](https://translate.wordpress.org/projects/wp-plugins/order-search-repair-for-woocommerce)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/order-search-repair-for-woocommerce/),
check out the [SVN repository](https://plugins.svn.wordpress.org/order-search-repair-for-woocommerce/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/order-search-repair-for-woocommerce/)
by [RSS](https://plugins.trac.wordpress.org/log/order-search-repair-for-woocommerce/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.1.2

_Release Date – 05 November 2017_

 * Order Search Repair now also checks for empty search indexes (as well as ones
   where the index doesn’t exist)
 * Added feature to retrieve the total number of orders with missing or blank search
   indexes
 * Added edge-case handler where actual billing or shipping details might be blank(
   for some unknown reason) and populate the search index with `{Empty}` string 
   to avoid infinite loop
 * Checked compatibility up to WordPress 4.8.3 and WooCommerce 3.2.2

#### 0.1.1

_Release Date – 22 September 2017_

 * Checked compatibility up to WordPress 4.8.2 and WooCommerce 3.1.2

#### 0.1

_Release Date – 11 May 2017_

 * Initial release

## Meta

 *  Version **0.1.2**
 *  Last updated **8 years ago**
 *  Active installations **50+**
 *  WordPress version ** 4.7 or higher **
 *  Tested up to **4.8.30**
 * Tags
 * [database](https://wordpress.org/plugins/tags/database/)[orders](https://wordpress.org/plugins/tags/orders/)
   [repair](https://wordpress.org/plugins/tags/repair/)[search](https://wordpress.org/plugins/tags/search/)
   [woocommerce](https://wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://wordpress.org/plugins/order-search-repair-for-woocommerce/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  5 5-star reviews     ](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/reviews/)

## Contributors

 *   [ indextwo ](https://profiles.wordpress.org/indextwo/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/order-search-repair-for-woocommerce/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.me/indextwo)