• Resolved xcastaneda

    (@xcastaneda)


    When using gravity forms user registration add-on and enabling the “manual user activation” option, WP Better E-mail sends the user an email with the correct html template but the %content% is blank.

    The manual activation option should not send an email to the user.

    When I disable WP Better emails, this “blank” activation e-mail does not get sent.

    https://www.ads-software.com/plugins/wp-better-emails/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter xcastaneda

    (@xcastaneda)

    The issue seems to be specific to GravityForms User Registration. I tried another WP HTML Email plugin and it sent the same blank activate email.

    Setting as closed and will reach out to Gravity Forms developer.

    Hey there

    same deal using it in conjunction with sb welcome email, all other emails are cool.

    Plugin Author Nicolas Lemoine

    (@nlemoine)

    Paul,

    Please check out the topics related to SB Welcome Editor issues, you’ll probably find a solution. Spoiler: check the “plan text” option.

    Thread Starter xcastaneda

    (@xcastaneda)

    To anyone that has had this issue when using Gravity Forms Manual activation in conjunction with an HTML template plugin like WP Better Emails, I found a simple workaround.

    By default, the wordpress mail function will check if an email is empty before sending out. When using GF manual activation, GF passes an empty string to WP mail which WordPress normally catches and prevents from sending out. However, since WP Better Emails wraps the body message with the HTML template, it actually fools WP into thinking it is a legit email that should go out. Thus, you get a perfectly templated HTML email with a blank %content% message.

    The answer is to simply check that the body is not blank before applying the template.

    I did this by modifying the line at roughly 391 in wpbe.php (set_email_template function) from

    return str_replace( '%content%', $body, $template );

    to this

    if( $body ){
    	return str_replace( '%content%', $body, $template );
    }

    I assume this is the same issue any other HTML templating plugin like SB Welcome has.

    I hope this helps someone else out there who like me wants all emails to templated and wants to use Gravity Form Manual activation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GF User Registration with manual activation sends empty %content% email’ is closed to new replies.