Automattic\WooCommerce\StoreApi\Routes\V1\Agentic\Messages
MessageInfo::to_array
Convert the error to an array.
Method of the class: MessageInfo{}
No Hooks.
Returns
Array. A message for the messages array of the response.
Usage
$MessageInfo = new MessageInfo(); $MessageInfo->to_array(): array;
MessageInfo::to_array() MessageInfo::to array code WC 10.8.1
public function to_array(): array {
$data = array(
'type' => $this->type,
'content_type' => $this->content_type,
'content' => $this->content,
);
if ( null !== $this->param ) {
$data['param'] = $this->param;
}
return $data;
}