ActionScheduler_Logger::log_failed_action()
Method of the class: ActionScheduler_Logger{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ActionScheduler_Logger = new ActionScheduler_Logger(); $ActionScheduler_Logger->log_failed_action( $action_id, $exception, $context );
- $action_id (required)
- -
- $exception(Exception) (required)
- -
- $context **
- -
Default: ''
ActionScheduler_Logger::log_failed_action() ActionScheduler Logger::log failed action code WC 9.3.1
public function log_failed_action( $action_id, Exception $exception, $context = '' ) { if ( ! empty( $context ) ) { /* translators: 1: context 2: exception message */ $message = sprintf( __( 'action failed via %1$s: %2$s', 'woocommerce' ), $context, $exception->getMessage() ); } else { /* translators: %s: exception message */ $message = sprintf( __( 'action failed: %s', 'woocommerce' ), $exception->getMessage() ); } $this->log( $action_id, $message ); }