Hi Gabriel,
I believe you can get what you want by using some of our filters. Considering the pro-account
is a user role, you could try to add this to your functions.php
:
add_action( 'alg_wc_ev_email_content_final', 'alg_wc_ev_my_custom_activation_email', 9, 2 );
add_action( 'alg_wc_ev_email_subject_final', 'alg_wc_ev_my_custom_activation_email', 9, 2 );
add_action( 'alg_wc_ev_email_content_heading', 'alg_wc_ev_my_custom_activation_email', 12, 2 );
function alg_wc_ev_my_custom_activation_email( $email_content, $args ) {
if (
'activation_email_separate' !== $args['context'] ||
empty( $user_id = $args['user_id'] ) ||
! is_a( $user = get_user_by( 'ID', $user_id ), 'WP_User' ) ||
! in_array( 'pro-account', $user->roles )
) {
return $email_content;
}
// Email Content.
$email_content = 'Custom email CONTENT, including some placeholder present on the Email Settings page, like %user_display_name%.';
if ( 'alg_wc_ev_email_subject_final' === current_filter() ) {
// Email Subject.
$email_content = 'Custom SUBJECT';
} elseif ( 'alg_wc_ev_email_content_heading' === current_filter() ) {
// Email Heading.
$email_content = 'Custom HEADING';
}
// Placeholders.
$placeholders = array_merge( $args['placeholders'], alg_wc_ev_get_user_placeholders( array( 'user_id' => $user_id ) ) );
$email_content = str_replace( array_keys( $placeholders ), $placeholders, $email_content );
return $email_content;
}
Let me know if you need more help.