WC_Product_Variation::get_stock_managed_by_id()
If the stock level comes from another product ID.
Method of the class: WC_Product_Variation{}
No Hooks.
Return
Int
.
Usage
$WC_Product_Variation = new WC_Product_Variation(); $WC_Product_Variation->get_stock_managed_by_id();
Changelog
Since 3.0.0 | Introduced. |
WC_Product_Variation::get_stock_managed_by_id() WC Product Variation::get stock managed by id code WC 9.5.1
public function get_stock_managed_by_id() { return 'parent' === $this->get_manage_stock() ? $this->get_parent_id() : $this->get_id(); }