Automattic\WooCommerce\StoreApi\Routes\V1\Agentic\Messages

MessageError::out_of_stockpublic staticWC 1.0

Create an out of stock error.

Method of the class: MessageError{}

No Hooks.

Returns

MessageError.

Usage

$result = MessageError::out_of_stock( $content, $param );
$content(string) (required)
Error content/message.
$param(string|null)
RFC 9535 JSONPath (optional).
Default: null

MessageError::out_of_stock() code WC 10.9.4

public static function out_of_stock( $content, $param = null ) {
	return new self( ErrorCode::OUT_OF_STOCK, $content, $param );
}