public function update(Product &$product)
    {
        $data = $product->exportData();
        $endpoint = '/admin/products/'.$product->id.'.json';
        $response = $this->request(
            $endpoint, 'PUT', array(
            'product' => $data
            )
        );
        $product->setData($response['product']);
    }
public function update(Product &$product)
    {
        $data = $product->exportData();
        $endpoint = '/admin/products/'.$product->id.'.json';
        $response = $this->request(
            $endpoint, 'PUT', array(
            'product' => $data
            )
        );
        $product->setData($response['product']);
    }
public function update ( Product & $ product ) { $ data = $ product -> exportData ( ) ; $ endpoint = '/admin/products/' . $ product -> id . '.json' ; $ response = $ this -> request ( $ endpoint , 'PUT' , array ( 'product' => $ data ) ) ; $ product -> setData ( $ response [ 'product' ] ) ; }
Modify an existing product

@link   https://help.shopify.com/api/reference/product#update
@param  Product $product
@return void
Modify an existing product