ActionScheduler_WPCLI_QueueRunner::action_failed()
Handle WP CLI message when the action has failed.
Method of the class: ActionScheduler_WPCLI_QueueRunner{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ActionScheduler_WPCLI_QueueRunner = new ActionScheduler_WPCLI_QueueRunner(); $ActionScheduler_WPCLI_QueueRunner->action_failed( $action_id, $exception );
- $action_id(int) (required)
- Action ID.
- $exception(Exception) (required)
- Exception.
ActionScheduler_WPCLI_QueueRunner::action_failed() ActionScheduler WPCLI QueueRunner::action failed code WC 9.5.1
public function action_failed( $action_id, $exception ) { WP_CLI::error( /* translators: 1: action ID 2: exception message */ sprintf( __( 'Error processing action %1$s: %2$s', 'woocommerce' ), $action_id, $exception->getMessage() ), false ); }