WooCommerce-REST-API-Client-Library
WooCommerce-REST-API-Client-Library copied to clipboard
Filter order by ID or order_key
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"); }