Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Subscribe to Forum

@webcreations907

Participant

If you’re using the style pack to edit your email template, add the below as a test to your email template.


Catch Time: {catch_date_time}
Anglers: {anglers}

Then add this function to your functions.php file or code snippets plugin which ever your using.



if( !function_exists('afc_email_bbp_subscription_mail') ){
	function afc_email_bbp_subscription_mail( $message, $reply_id, $topic_id ) {
		if ( function_exists( 'get_field' ) && $topic_id != 0 ) {

			$afc_replace = array(
				'{catch_date_time}' => get_field( 'catch_date_time', $topic_id),
				'{anglers}'         => get_field( 'anglers', $topic_id )
				);

			$message = strtr( $message , $afc_replace);
		}
		return $message;
	}
	add_filter( 'bbp_forum_subscription_mail_message' , 'afc_email_bbp_subscription_mail', 100 , 3 );
}

Then test it out by creating a topic in a forum that has subscribers you can test with, and make sure to set those values when creating your topic.

Skip to toolbar