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

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