php MT - Event Tickets Plus(ET +) - 扫描QR码后重定向到WebQR.com(伪自助终端/自助办理登机手续模式)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php MT - Event Tickets Plus(ET +) - 扫描QR码后重定向到WebQR.com(伪自助终端/自助办理登机手续模式)相关的知识,希望对你有一定的参考价值。

<?php
/**
 * MT - Event Tickets Plus (ET+) - Redirect to WebQR.com after scanning a QR code (pseudo-kiosk / self check-in mode)
 *
 * Useful for self-service "kiosk" mode for ET+ QR code check-ins.
 * Sign into wp-admin as a user that has permission to check-in QR codes.
 * In the same web browser, visit WebQR.com and then await your attendees.
 * If the check-in was successful (or ticket was previously checked-in already), it will redirect back to WebQR.com to be ready for the next attendee check-in.
 * If the check-in was unsuccessful, it will do its default action of redirecting to the event's public/front-end single page view. You may want to modify this to go to a page that displays something like, "Error with check-in. Please see a staff member before proceeding."
 * Overall, make sure to think through and test things before putting into production for your event's actual check-ins.
 * Note that WebQR.com is not supported, guaranteed, maintained, owned by, or affiliated with Modern Tribe.
 *
 * @link https://gist.github.com/cliffordp/f1e6efdd77560bb9d27df38e99d73ec3
 * @link https://theeventscalendar.com/support/forums/topic/self-checkin-capability/
 *
 * @param string $url             URL to redirect to, gets escaped upstream
 * @param int    $event_id        Event Post ID
 * @param int    $ticket_id       Ticket Post ID
 * @param bool   $user_had_access Whether or not the logged-in user has permission to perform check-ins
 *
 * @return string
 */
add_filter( 'tribe_tickets_plus_qr_handle_redirects', 'cliff_et_plus_qr_check_in_redirect', 10, 4 );
function cliff_et_plus_qr_check_in_redirect( $url, $event_id, $ticket_id, $user_had_access ) {
	if ( ! empty( $user_had_access ) ) {
		$url = 'https://webqr.com/';
	}

	return $url;
}

以上是关于php MT - Event Tickets Plus(ET +) - 扫描QR码后重定向到WebQR.com(伪自助终端/自助办理登机手续模式)的主要内容,如果未能解决你的问题,请参考以下文章

php Event Tickets Plus:在WooCommerce订单电子邮件的末尾添加额外的换行符。

php Event Tickets Plus:在WooCommerce订单电子邮件的末尾添加额外的换行符。

php Event Tickets&Plus:将媒体库中的文件附加到所有票证电子邮件。

php Event Tickets&Plus:将媒体库中的文件附加到所有票证电子邮件。

php Event Tickets Plus - 隐藏所有活动的参加者列表。屏幕截图:https://cl.ly/0H0A2I2d1k2B

php Event Tickets Plus - 隐藏所有活动的参加者列表。屏幕截图:https://cl.ly/0H0A2I2d1k2B