WordPress at Your Fingertips
function is not described

WC_Product_Variation::get_manage_stock() public WC 3.0.0

Return if product manage stock.

{} It's a method of the class: WC_Product_Variation{}

No Hooks.

Return

true|false|String. true, false, or parent.

Usage

$WC_Product_Variation = new WC_Product_Variation();
$WC_Product_Variation->get_manage_stock( $context );
$context(string)
What the value is for. Valid values are view and edit.
Default: 'view'

Changelog

Since 3.0.0 Introduced.

Code of WC_Product_Variation::get_manage_stock() WC 5.7.1

public function get_manage_stock( $context = 'view' ) {
	$value = $this->get_prop( 'manage_stock', $context );

	// Inherit value from parent.
	if ( 'view' === $context && false === $value && true === wc_string_to_bool( $this->parent_data['manage_stock'] ) ) {
		$value = 'parent';
	}
	return $value;
}