Ticket::should_show_qr_code( Tribe__Template $et_template )

Determines if QR code for Emails is Active.


Parameters

$et_template

(Tribe__Template) (Required) Event Tickets template object.


Top ↑

Return

(boolean)


Top ↑

Source

File: src/Tickets_Plus/Emails/Email/Ticket.php

	public function should_show_qr_code( $et_template ): bool {
		$args  = $et_template->get_local_values();

		if ( ! $args['email'] instanceof Ticket_Email ) {
			return false;
		}

		// handle live preview.
		$is_preview = tribe_is_truthy( Arr::get( $args, 'preview', false ) );
		$preview_qr = tribe_is_truthy( Arr::get( $args, 'add_qr_codes', false ) );
		if ( $is_preview ) {
			return $preview_qr;
		}

		return tribe_is_truthy( tribe_get_option( self::$option_ticket_include_qr_codes, true ) );
	}

Top ↑

Changelog

Changelog
Version Description
5.7.0 Introduced.