WordPress at Your Fingertips
function is not described

WC_Product_External::set_manage_stock() public WC 3.0.0

External products cannot be stock managed.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product_External = new WC_Product_External();
$WC_Product_External->set_manage_stock( $manage_stock );
$manage_stock(true|false) (required)
If manage stock.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product_External::set_manage_stock() WC 5.6.0

public function set_manage_stock( $manage_stock ) {
	$this->set_prop( 'manage_stock', false );

	if ( true === $manage_stock ) {
		$this->error( 'product_external_invalid_manage_stock', __( 'External products cannot be stock managed.', 'woocommerce' ) );
	}
}