Automattic\WooCommerce\Blueprint
StepProcessorResult::get_messages
Filter messages.
Method of the class: StepProcessorResult{}
No Hooks.
Returns
Array.
Usage
$StepProcessorResult = new StepProcessorResult(); $StepProcessorResult->get_messages( $type ): array;
- $type(string)
- one of all, error, and info.
Default:'all'
StepProcessorResult::get_messages() StepProcessorResult::get messages code WC 10.9.1
public function get_messages( string $type = 'all' ): array {
if ( 'all' === $type ) {
return $this->messages;
}
return array_filter(
$this->messages,
function ( $message ) use ( $type ) {
return $type === $message['type'];
}
);
}