Home / Widgets / Auto Responder Message Content | Quick Event Manager
Duplicate Snippet

Embed Snippet on Your Site

Auto Responder Message Content | Quick Event Manager

add_filter('qem_autoresponder-message-content', , , 3);

This filter allows you to alter the auto responder message content from Fullworks Event Manager plugin. A useful thing to to is add a new placeholder / shortcode. There are three arguments, $msg, $id, $payment.

The following example creates a new placeholder / shortcode called [number] and assigns the total number of attendees so far.

(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 autoresponder content
 * this can be used to add custom shortcodes
 *
 * @param $msg
 * @param $id
 * @param $payment
 *
 * @return string   content for autoresponder
 */
	'qem_autoresponder-message-content',
	function ( $msg, $id, $payment ) {
		if ( ! function_exists( 'qem_get_the_numbers' ) ) {
			return $msg;
		}
		$attending = qem_get_the_numbers( $id, $payment );
		$msg       = str_replace( '[number]', $attending, $msg );
		return $msg;
	},
	10,
	3
);

Comments

Add a Comment