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

MessageError::__constructpublicWC 1.0

Constructor.

Method of the class: MessageError{}

No Hooks.

Returns

null. Nothing (null).

Usage

$MessageError = new MessageError();
$MessageError->__construct( $code, $content, ?string $param );
$code(string) (required)
Error code from ErrorCode enum.
$content(string) (required)
Error content/message.
?string $param
.
Default: null

MessageError::__construct() code WC 10.9.4

public function __construct( string $code, string $content, ?string $param = null ) {
	$this->code    = $code;
	$this->content = $content;
	$this->param   = $param;
}