ActionScheduler_Logger::log_failed_fetch_action()publicWC 1.0

Метод класса: ActionScheduler_Logger{}

Хуков нет.

Возвращает

ActionScheduler_LogEntry[].

Использование

$ActionScheduler_Logger = new ActionScheduler_Logger();
$ActionScheduler_Logger->log_failed_fetch_action( $action_id, $exception );
$action_id(строка) (обязательный)
-
$exception(Exception|NULL)
The exception which occured when fetching the action. NULL by default for backward compatibility.
По умолчанию: NULL

Код ActionScheduler_Logger::log_failed_fetch_action() 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 );
}