thenewsletter plugin and quform2 :-)

Home Forums Quform WordPress thenewsletter plugin and quform2 :-)

This topic is: not resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36093
    deranaloge
    Participant

    hi there,

    thanks again for your help with thenewsletterplugin. but now i ran into some problems again:

    when collecting subscriber with your code from : https://support.themecatcher.net/quform-wordpress-v2/guides/integration/newsletter it does work, but it does not fire the thenewsletter plugin to send the confirmation email.
    Now i wrote to the support from tnp, they answered:

    Hi, do not use the “subscribe” method, it is old. Create a TNP_Subscription object with all the data and then use the “subscribe2” method.

    The TNP_Subscription class has internally the TNP_Subscription_Data for the subscriber information and some other values to set if the welcome email should be sent and so on.

    I think it is this: https://www.thenewsletterplugin.com/documentation/developers/dev-newsletter-hooks/
    I need a double opt in thing because we are in europe.

    could you help me out here?
    many many thanks in advance

    #36094
    deranaloge
    Participant

    hm now i tried something myself:

    add_filter(‘quform_post_process_2’, function($result, $form) {
    if (class_exists(‘TNP_Subscription’)) {
    $email = $form->getValue(‘quform_2_4’);
    if (!empty($email)) {
    $name = $form->getValue(‘quform_2_3’);
    $subscription = new TNP_Subscription();
    $subscription->email = $email;
    $subscription->first_name = $name[2];
    $subscription->last_name = $name[4];
    $subscription->lists = array(1);
    $subscription->send_welcome = true; // Setzen Sie dies auf true, um die Willkommens-E-Mail zu senden

    TNP::subscribe2($subscription);
    }
    }

    return $result;
    }, 10, 2);

    but i got an ajax error now…

    #36098
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 6 months ago by Ally.
    #36100
    deranaloge
    Participant

    Hi,
    unfortunately, the change does not work.
    The Ajax Error is gone, but no entry in the newsletter list.
    The plugin is free https://wordpress.org/plugins/newsletter/, so it should work?
    If you need Premium Addons let me know

    thanks again!
    Best regards
    harald

    • This reply was modified 6 months ago by deranaloge.
    #36115
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #36151
    deranaloge
    Participant

    Hi,
    awesome! it works now!
    thank you for your support!

    best regards
    Harald

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy