I have a problem with an WPForms formular an the output in the email. If I deactivate your plugin, the output in the email is correct.
I use the {order_summary} of wpforms. The Email shows “no products have been selected” (in german: Es sind keine Produkte ausgewählt). After that, the choosen products are listed. If I deactivate your plugin, the message will not shown in the email.
I added some code to the function.php, generated by chatgpt.
add_filter( 'wp_mail', function ( $args ) {
if ( isset( $args['message'] ) && strpos( $args['message'], 'Produkte ausgewählt' ) !== false ) { $args['message'] = preg_replace( '/<[^>]*>?\s*Es sind keine Produkte ausgewählt\.?\s*<\/[^>]*>/i', '', $args['message'] ); }
return $args; });
WP HTML Mail – Email Template Designer processes the email body before WPForms smart tags like {order_summary} are fully rendered, causing WPForms to fall back to the “no products selected” message even when products exist.
Hi @1stsol really strange behaviour… this message is not part of our plugin. Do you use any custom code related to your emails (except the snippet above)? Where does the term “product” come from? Do you use WooCommerce or any other Shop plugin?
@haet I testet other E-Mail Template Plugins; the message don’t come. The term comes from WPForms – in the frontend only, if no articles are selected. It is just a form without any payment actions or something like that.