@champsupertramp also i think its an issue with my 2 custom fields which i have hooked as below;
add_filter( 'um_template_tags_patterns_hook', 'my_template_tags_patterns', 10, 1 );
function my_template_tags_patterns( $placeholders ) {
$placeholders = array(
'{company_name}',
'{manager_name}',
);
return $placeholders;
}
add_filter( 'um_template_tags_replaces_hook', 'my_template_tags_replaces', 10, 1 );
function my_template_tags_replaces( $replace_placeholders ) {
global $wpdb;
$company_name = str_replace("um_","",str_replace("-".substr(um_user('role'), strrpos(um_user('role'), "-") + 1),"",um_user('role')));
$added_by = get_user_meta( um_user( 'ID' ) , 'added_by', true );
$module_data = $wpdb->get_row("SELECT display_name FROM wp_users WHERE ID = '$added_by' ");
$replace_placeholders = array(
strtoupper($company_name),
$module_data->display_name,
);
return $replace_placeholders;
}
When i delete one eg. {manager_name}, the welcome email is being sent once as required, please assist.