kloon / WooCommerce-REST-API-Client-Library

A PHP wrapper for the WooCommerce REST API
GNU General Public License v3.0
356 stars 175 forks source link

Filter order by ID or order_key #240

Open marotn opened 6 years ago

marotn commented 6 years ago

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"); }