Automattic\WooCommerce\Database\Migrations
TableMigrator::add_error
Add an error message to the errors list unless it's there already.
Метод класса: TableMigrator{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_error( $error ): void;
- $error(строка) (обязательный)
- The error message to add.
Код TableMigrator::add_error() TableMigrator::add error WC 11.1.2
protected function add_error( string $error ): void {
if ( is_null( $this->errors ) ) {
$this->errors = array();
}
if ( ! in_array( $error, $this->errors, true ) ) {
$this->errors[] = $error;
}
}