Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter 1stsol

    (@1stsol)

    Hi,

    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?

    best regards, Hannes

    Thread Starter 1stsol

    (@1stsol)

    @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.

    Thread Starter 1stsol

    (@1stsol)

    @haet
    I can give you access to the dev environment. there you can test and see it 🙂

    We have an extension for WP Forms. Please try ist and let me know the result:
    https://drive.google.com/file/d/1WxaJym7jRh3A4Hph0-I6abN504gHysOs/view?usp=sharing

    Thread Starter 1stsol

    (@1stsol)

    Hi @haet
    sorry – doesn’t work.
    The result – lot’s of more space between header and body.

    Thread Starter 1stsol

    (@1stsol)

    @haet

    Do you have any other solutions?

    Plugin Support Julian

    (@juliangk)

    @1stsol
    What kind of shop system or plugin are you using?

    Best regards
    Julian

    Thread Starter 1stsol

    (@1stsol)

    Hi @juliangk
    in this case I use WPForms for the message.
    In this website is WooCommerce installed, also.

    Plugin Support Julian

    (@juliangk)

    @1stsol

    can you please email us to support(at)codemiq.com and refer to this thread.

    best regards
    Julian

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.