• Resolved margas6

    (@margas6)


    Hello,

    after updating wordpress to 4.8 an woocommeerce to 3.1 when i try to search for a customer name to see the order he have made it shows only the ones after the update.

    Any suggestions how to fix it?

    Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Claudiu Lodromanean

    (@claudiulodro)

    Orders created after WooCommerce 3.0 have some special meta values that make searching faster and more accurate. Orders created before WooCommerce 3.0 don’t have these yet.

    In WooCommerce 3.2, there is going to be a tool for generating the correct information for orders that don’t have the information yet (https://github.com/woocommerce/woocommerce/pull/15854).

    In the meantime you can run this query in MYSQL to generate the correct information for old orders:


    INSERT INTO wp_postmeta( post_id, meta_key, meta_value )
    SELECT post_id, ‘_billing_address_index’, GROUP_CONCAT( meta_value SEPARATOR ‘ ‘ )
    FROM wp_postmeta
    WHERE meta_key IN ( ‘_billing_first_name’, ‘_billing_last_name’ )
    AND post_id IN ( SELECT DISTINCT post_id FROM wp_postmeta
    WHERE post_id NOT IN ( SELECT post_id FROM wp_postmeta WHERE meta_key=’_billing_address_index’ )
    AND post_id IN ( SELECT post_id FROM wp_postmeta WHERE meta_key=’_billing_last_name’ ) )
    GROUP BY post_id;

    EDIT: The single quotes look weird on this forum. Just use regular single quotes.

    Hi,
    I used this SQL command, it did update a lot of rows, but searches of adresses created before 3.1 still does not work

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Orders filters/search not working after updating to 3.1’ is closed to new replies.