WooCommerce Code Reference

Messages
in package

Class Messages

Manages error & info messages for the agentic checkout process.

Table of Contents

$messages  : array<string|int, Message>
Array of messages.
add()  : void
Add a message.
get_formatted_messages()  : array<string|int, mixed>
Get all error messages, formatted as per the ACP spec.
has_errors()  : bool
Check if there are any error messages.

Properties

Methods

get_formatted_messages()

Get all error messages, formatted as per the ACP spec.

public get_formatted_messages() : array<string|int, mixed>
Return values
array<string|int, mixed>that is ready for the response.