WooCommerce Code Reference

Message
in package

Base class for error and info messages.

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).
is_error()  : bool
Check if the message is an error.
to_array()  : array<string|int, mixed>
Convert the message 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