• Hello, the plugin wasn’t working to search orders by SKU.

    If you replace line 30:
    $posts = get_posts( array( 'post_type' => 'shop_order' ) );

    With something like this:

    $args = array (
            'post_type' => 'shop_order',
    	'post_status' => 'wc_completed',
            );
     $posts = get_posts( $args );

    This seems to fix the issue

    • This topic was modified 2 years, 10 months ago by dambacher.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dambacher

    (@dambacher)

    This is with wordpres 5.8.3 and woocommerce 6.1.0

    Hope that helps

    Hi,

    Thanks for the fix.

    Any clue how your fix could be tweaked for variation’s SKU ?
    It actually works only for SKU set on product level but not on variation level.
    My WC install does not use product SKU but variation SKU only.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Quick Fix’ is closed to new replies.