pixelpeter / laravel5-woocommerce-api-client

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

Custom taxonomy #34

Closed fabianomoier closed 6 years ago

fabianomoier commented 6 years ago

Good Morning!! I'm using Woo Rest API to update a store and create products, I needed to create a taxonomy = drive I can register the normal product with the category plus the taxonomy = drive does not register !! I searched tutorials on custom taxonomy found one that said to activate show_in_rest = true; but it looks like it did not work !! `

       $params_produto = [   
                             'sku' => "$skueverst", 
                             'name'  => "$tituloproduto",  
                             'status'  => $status,  
                            'price' => substr($produto->vl_preco, 0, 9),
                            'regular_price'  => substr($produto->vl_preco, 0, 9),   
                             'stock_quantity'  => $produto->qt_saldo,                              
                            'categories' => [
                                [
                                    'id'  => 962

                                ], 

                            ],  
                           'product_brand' => [

                                [
                                    'id'  => $trmarca
                                ],   

                            ],   
                            'unidade'  => [   
                                [
                                    'id'  => $trunidade
                                ],                                   
                            ],                             
                        ];

`

pixelpeter commented 6 years ago

Please have a look at the documentation of the Woocommere REST API because this project is only a wrapper around this library. We do not add additional functionality. https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product