Woocommerce Api – JSON ERROR
-
Hallo zusammen,
ich versuche mich gerade mit der Woocommerce API. Bekomme aber beim put und delete eine Fehlermeldung. Hat da jemand eine Idee?$this->woocommerce = new Client( 'https://abc.com', 'ck_xxxxxx764', 'cs_xxxxxb3', [ 'wp_api' => true, 'version' => 'wc/v3', ] ); $id = 123; //löschen $this->woocommerce->delete('products/'.$id, ['force' => true]); //update $data = [ "name" => 'ApiProdukt' ]; $this->woocommerce->put("products/".$id,$data); //Fehlermedung CRITICAL Uncaught Automattic\WooCommerce\HttpClient\HttpClientException: JSON ERROR: Syntax error in /var/www/html/vendor/automattic/woocommerce/src/WooCommerce/HttpClient/HttpClient.php:378
Das erstellen eines Produktes mit ->post() funktioniert!
- Das Thema „Woocommerce Api – JSON ERROR“ ist für neue Antworten geschlossen.