Home / Widgets / Filter the message generated for admin confirmation | Quick Event Manager
Duplicate Snippet

Embed Snippet on Your Site

Filter the message generated for admin confirmation | Quick Event Manager

add_filter('qem_registration_email_message',,,3);

This filters allows you to adjust the confirmation email to the admin / organiser ( $content) . It can take up to 6 arguments, $content, $details, $close, $id, $payment.

The following reconstructs the email to append a heading with numbers attending.

(Note this code snippet applies for "Quick Event Manager Plugin" available here: https://fullworksplugins.com/products/quick-event-manager/ )

Code Preview
php
<?php
add_filter( /**
 *
 * Filter the message generated to email confirmation
 *
 * @param $message
 * @param $content
 * @param $details
 * @param $close
 * @param $id
 * @param $payment
 *
 * @return string output message for registration email
 */
	'qem_registration_email_message',
	function ( $message, $content, $details, $close, $id, $payment ) {
		if ( ! function_exists( 'qem_get_the_numbers' ) ) {
			return $message;
		}
		$attending = qem_get_the_numbers( $id, $payment );
		$message   = '<html>' . $content . $details . '<h1>' . 'Numbers Attending:  ' . $attending . '</h1>' . $close . '</html>';
		return $message;
	},
	10,
	6
);

Comments

Add a Comment