ActionScheduler_Logger::log_failed_fetch_action()
Method of the class: ActionScheduler_Logger{}
No Hooks.
Return
ActionScheduler_LogEntry[]
.
Usage
$ActionScheduler_Logger = new ActionScheduler_Logger(); $ActionScheduler_Logger->log_failed_fetch_action( $action_id, $exception );
- $action_id(string) (required)
- -
- $exception(Exception|NULL)
- The exception which occured when fetching the action. NULL by default for backward compatibility.
Default: NULL
ActionScheduler_Logger::log_failed_fetch_action() ActionScheduler Logger::log failed fetch action code WC 8.7.0
public function log_failed_fetch_action( $action_id, Exception $exception = NULL ) { if ( ! is_null( $exception ) ) { /* translators: %s: exception message */ $log_message = sprintf( __( 'There was a failure fetching this action: %s', 'woocommerce' ), $exception->getMessage() ); } else { $log_message = __( 'There was a failure fetching this action', 'woocommerce' ); } $this->log( $action_id, $log_message ); }