I am making a plugin that will update the stock quantity of woocommerce it's some sort of third party cart I want to sync the quantity of woocommerce from other website data. my code is 

```
$quantity = floatval(5);
$product_id = 10;
$woocmmerce_instance = new WC_Product( $product_id );
$woocmmerce_instance->set_stock_quantity($quantity);

```

but this throws an error PHP Fatal error: Call to undefined method WC\_Product::set\_stock\_quantity()