WooCommerce-REST-API-Client-Library icon indicating copy to clipboard operation
WooCommerce-REST-API-Client-Library copied to clipboard

Filter order by ID or order_key

Open marotn opened this issue 7 years ago • 0 comments

Hi, how can i filter order by ther id or oreder_key? I want to check if the order exsit or no befor .... With the product :: $client = new WC_API_Client( $Url, $consumer_key, $consumer_secret, $options ); $result = $client->products->get( null, array( "filter[sku]" => $REF ) ); //print_r($result); $errors = array_filter($result); if (!empty($errors)) { echo "existe"; $ID = $result['products'][0]['id']; }else { echo ("OK"); }

marotn avatar Feb 01 '18 09:02 marotn