Action_Scheduler\WP_CLI\Action
Cancel_Command::print_error
Convert an exception into a WP CLI error.
Метод класса: Cancel_Command{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->print_error( $e, $multiple );
- $e(Exception) (обязательный)
- The error object.
- $multiple(true|false) (обязательный)
- Boolean if multiple actions.
Код Cancel_Command::print_error() Cancel Command::print error WC 10.0.2
protected function print_error( \Exception $e, $multiple ) { \WP_CLI::error( sprintf( /* translators: %1$s: singular or plural %2$s: refers to the exception error message. */ __( 'There was an error cancelling the %1$s: %2$s', 'woocommerce' ), $multiple ? __( 'scheduled actions', 'woocommerce' ) : __( 'scheduled action', 'woocommerce' ), $e->getMessage() ) ); }