Home › Forums › Quform WordPress › thenewsletter plugin and quform2 :-)
- This topic has 5 replies, 2 voices, and was last updated 1 year ago by deranaloge.
- AuthorPosts
- October 24, 2023 at 7:49 am #36093deranalogeParticipant
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 advanceOctober 24, 2023 at 8:21 am #36094deranalogeParticipanthm 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 sendenTNP::subscribe2($subscription);
}
}return $result;
}, 10, 2);but i got an ajax error now…
October 24, 2023 at 9:10 am #36098AllySupport StaffYou 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 1 year, 1 month ago by Ally.
October 24, 2023 at 9:51 am #36100deranalogeParticipantHi,
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 knowthanks again!
Best regards
harald- This reply was modified 1 year, 1 month ago by deranaloge.
October 25, 2023 at 10:15 am #36115AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 31, 2023 at 11:53 am #36151deranalogeParticipantHi,
awesome! it works now!
thank you for your support!best regards
Harald - AuthorPosts
- You must be logged in to reply to this topic.