src/Controllers/Product.php
/**
     * Create a product based on a WooCommerce Product
     * @return $this
     * @throws Error
     */
Create a product based on a WooCommerce Product
@return $this
@throws Error
Create a product based on a WooCommerce Product @return $this @throws Error
public function create()
    {
        $this->setProduct();
        $insert = Curl::simple('products/insert', $this->mapPropsToValues());
        if (isset($insert['product_id'])) {
            $this->product_id = $insert['product_id'];
            return $this;
        }
        throw new Error(__('Erro ao inserir o artigo ') . $this->name);
    }
public function create ( ) { $ this -> setProduct ( ) ; $ insert = Curl :: simple ( 'products/insert' , $ this -> mapPropsToValues ( ) ) ; if ( isset ( $ insert [ 'product_id' ] ) ) { $ this -> product_id = $ insert [ 'product_id' ] ; return $ this ; } throw new Error ( __ ( 'Erro ao inserir o artigo ' ) . $ this -> name ) ; }
Create a product based on a WooCommerce Product
 @return $this
 @throws Error
Create a product based on a WooCommerce Product @return $this @throws Error