Action_Scheduler\WP_CLI\Action
Cancel_Command::print_error()
Convert an exception into a WP CLI error.
Method of the class: Cancel_Command{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->print_error( $e, $multiple );
- $e(\Exception) (required)
- The error object.
- $multiple(true|false) (required)
- Boolean if multiple actions.
Cancel_Command::print_error() Cancel Command::print error code WC 9.8.1
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() ) ); }