pixelpeter / laravel5-woocommerce-api-client

Laravel 5 wrapper for the Woocommerce REST API
MIT License
125 stars 48 forks source link

Register Products #27

Closed fabianomoier closed 6 years ago

fabianomoier commented 6 years ago

Good Morning!! When registering products I am with test array of the form below

Array ( [title] => Geladeira [type] => simple [regular_price] => 5900.00 [description] => Side by Side com gelo na porta [categories] => 1 [stock_quantity] => 2 [in_stock] => true )

my question is to save in Woo the products passed by array I am using as below return Woocommerce::put($params_produto);

"Type error: Too few arguments to function Pixelpeter\Woocommerce\WoocommerceClient::put(), 1 passed in vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 221 and exactly 2 expected ◀"

Sorry, I may be doing it wrong !! Thank you very much!!

pixelpeter commented 6 years ago

You forgot to define the endpoint. It needs to be:

return Woocommerce::put('products', $params_produto);
fabianomoier commented 6 years ago

Yes!! Thank you so much !!