ActionScheduler_Logger::log_failed_fetch_action │ public │ WC 1.0

Log the failure of fetching the action.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$ActionScheduler_Logger = new ActionScheduler_Logger();
$ActionScheduler_Logger->log_failed_fetch_action( $action_id, ?Exception $exception );
$action_id(строка) (обязательный)
Action ID.
?Exception $exception
.
По умолчанию: null

Код ActionScheduler_Logger::log_failed_fetch_action() WC 11.2.2

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 );
}