• Resolved russo69

    (@russo69)


    Our webpage includes a form which allows users to apply for training. The form includes a checkbox to verify whether the participant would like to attend an additional workshop. This triggers additional costs. We would like to use this plugin to send the corresponding invoice to the participant. So, we have to use something like two different invoice templates (2 different prices triggered by the checkbox). So far, when the user clicks submit we change the submitted data using the following script:

    add_action ( “wpcf7_before_send_mail”, “wpcf7_update_ mail” );
    function wpcf7_update_ mail($WPCF7_ContactForm) {
    if ( 491 == $WPCF7_ContactForm->id() ) {
    ………
    if ($submission) {
    ………
    if ( $data[‘addws’][0] ) {
    $mail[‘body’] = str_replace(‘[your-price]’, ‘Euro 170.-‘, $mail[‘body’]);
    } else {
    $mail[‘body’] = str_replace(‘[your-price]’, ‘Euro 140.-‘, $mail[‘body’]);
    }
    ………
    return $wpcf7;
    } } }

    The e-mail sent out by Contact Form 7 is fine but the pdf created by the plugin does not reflect the changes made by the script above. How can we solve this issue? Is it possible to use two different pdf templates?

    Thanks a lot for your support.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Two pdf templates’ is closed to new replies.