Automattic\WooCommerce\Blueprint
StepProcessorResult::get_messages
Filter messages.
Метод класса: StepProcessorResult{}
Хуков нет.
Возвращает
Массив.
Использование
$StepProcessorResult = new StepProcessorResult(); $StepProcessorResult->get_messages( $type ): array;
- $type(строка)
- one of all, error, and info.
По умолчанию:'all'
Код StepProcessorResult::get_messages() StepProcessorResult::get messages 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'];
}
);
}