WooCommerce Code Reference

MessageInfo extends Message
in package

MessageInfo class.

Represents an info message object as defined in the Agentic Commerce Protocol.

Table of Contents

$content  : string
Error content/message.
$content_type  : string
Content type for the error message.
$param  : string|null
RFC 9535 JSONPath to the problematic parameter (optional).
$type  : string
The error type (always 'error' for message errors).
__construct()  : mixed
Constructor.
is_error()  : bool
Check if the message is an error.
to_array()  : array<string|int, mixed>
Convert the error to an array.
use_markdown()  : mixed
Use markdown content type for the content of the error.

Properties

$content_type

Content type for the error message.

protected string $content_type = AutomatticWooCommerceInternalAgenticEnumsSpecsMessageContentType::PLAIN

Defaults to plain, but could also be markdown.

Methods

__construct()

Constructor.

public __construct(string $content[, string|null $param = null ]) : mixed
Parameters
$content : string

Error content/message.

$param : string|null = null

RFC 9535 JSONPath (optional).

Return values
mixed