Home Forums Newsletter Plugin Support Unsubscribe help/defaults

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #134692
    Anonymous
    Inactive

    Hello!

    I am completely new to this – and am having great difficulty setting up my unsubscribe service.

    Without having to reinstall the plugin – could you send me the default settings, and perhaps a step by step guide on how I set this up?

    Thank you so much!

    Michael

    #134815
    Stefano
    Keymaster

    Hi, there is not an sunsubscription to setup, when you send emails with Newsletter an unsubscription link is usually added, so the user can subscribe.

    Stefano.

    #143443
    Rumyan Tsekov
    Participant

    Hi, Happy New Year!

    I believe, in this year you will implement unsubscribe shortcode and/or link to implement on any page we need?

    The second wish is a hook, so that when some plugin deletes the user profile, because of the GDPR this will trigger user removal from the lists.

    Happy holidays!

    #143562
    Rumyan Tsekov
    Participant

    In the spirit of the New Year’s miracles, I was able to find a temporary work-around and I am going to share it with others, if that is not a problem!

    In my case, I’m customizing woocommerce’s file dashboard.php by using a copy of the original file into my child theme’s folder (common practice to override anything in wordpress). My file is located at: wp-content/themes/oceanwp-child-theme-master/woocommerce/myaccount/dashboard.php (because I use the oceanwp theme).

    In this file, which is already part of the code, I have added the following code (below), which will create two buttons Subscribe and Unsubscribe in HTML.
    It is already available inside The Newsletter Plugin itself. Anyone can find it in -> List Building -> Subscription Form Fields, Buttons, Labels -> Code

    What I needed was the ability to pre-populate current user’s email in the text field, so I got the information from the wp database.

    Next, I extracted the unsubscribe link parameters from the database, by inspecting the unsubscribe link that every user receives in their email, generated the unsubscribe link in a string parameter and added it to the buttons.

    You can nest this code within any hooked .php file with a little bit of testing, so I hope someone may find it useful.

    <?php
    global $wpdb;

    $your_website_s_url = get_bloginfo(‘wpurl’);
    $current_user = wp_get_current_user();
    $current_user_s_email = $current_user->user_email;

    $tableName = $wpdb->prefix . ‘newsletter’;
    $the_newsletter_s_array = $wpdb->get_results( “SELECT * FROM {$tableName} WHERE email = ‘$current_user_s_email'”);

    foreach ( $the_newsletter_s_array as $subscriber_s_email ){
    $unsubscribe_link = $your_website_s_url . “/?na=uc&nk=” . $subscriber_s_email->id . “-” . $subscriber_s_email->token;
    }
    $subscribe_link = $your_website_s_url . “?na=s”;

    ?>

    <div class=”tnp tnp-subscription”>
    <form method=”post” action=”<?php echo $subscribe_link ?>” onsubmit=”return newsletter_check(this)”>

    <input type=”hidden” name=”nlang” value=””>
    <div class=”tnp-field tnp-field-email”><label>Email</label><input class=”tnp-email” type=”email” name=”ne” value=”<?php echo $current_user_s_email ?>” required></div>
    <div class=”tnp-field tnp-field-privacy”><label><input type=”checkbox” name=”ny” required class=”tnp-privacy”> By continuing, you accept the privacy policy</label></div>
    <div class=”tnp-field tnp-field-button”><input class=”tnp-submit” type=”submit” value=”Subscribe”>
    </div>
    </form>
    </div>

    <div class=”tnp tnp-subscription”>
    <form method=”post” action=”<?php echo $unsubscribe_link ?>” onsubmit=”return newsletter_check(this)”>
    <div class=”tnp-field tnp-field-button”><input class=”tnp-submit” type=”submit” value=”Unsubscribe”>
    </div>
    </form>
    </div>

    Please, try not to break your site 🙂 test it in a staging environment 1st!

    Happy New Year!

    #143591
    Little Cousette
    Participant

    Thnak you for the ersponse, but when I click to the unsusbcribe link, it gives me a 404 error.. what is wrong please?

    #143593
    Little Cousette
    Participant

    Thank you for the response, but when I click to the unsusbcribe link automatically added at the bottom of my emails, , it gives me a 404 error: page not found.. what is wrong please?
    Please help me !
    Best regards,
    Christelle

    #143608
    Rumyan Tsekov
    Participant

    Hey 🙂 Happy New Year!

    I am not a developer and this solution is my way of fixing things. I am customer as you, sharing my findings with others. In my case this code is inserted into the dashboard.php of my child theme and it works. Where are you trying to implement it?

    EDIT: one more thing to mention: when copying this code, HTML formatting replaces all ” an ‘ with wrong ones. Make sure to find-replace in Notepad for example all those 1st

    #143641
    Rumyan Tsekov
    Participant

    and just found out that if you need, can define to which list the subscriber should belong by adding: list=”Name_of_the_list”

    at this row: <div class=”tnp-field tnp-field-button”><input class=”tnp-submit” type=”submit” value=”Subscribe” list=”Name_of_the_list”>

    #143799
    Little Cousette
    Participant

    Thank you so much for your response Rumyan.. I am so sossory, but i did not understand how to do that in my dashboard …:-(
    Howver, in fact, I understand the problem: it does not work when I click in the link in my newsletter directly, but it work for susbcribers (I made some test with phantom emails..)
    Happy new year !
    Chris

    #143847
    Rumyan Tsekov
    Participant

    Yes. This work-around is for browsers. For emails, there are already shortcodes in curly brackets – well documented.

    Cheers 🙂

    #144307
    tdcpepsi
    Participant

    Where is the “UNSUBSCRIBE PAGE” or shortcode, so that my subscribers can unsubscribe from my mailing list????

    #145174
    Scambia Ricette
    Participant

    Dear All,
    I’ve the same problem, I test it clicking unsubscribe link in my profile page and opena a new page (with final perma: %7Bunsubscription_confirm_url) with: Error 404!
    Have I to add a shortcode to the profile page?
    Thanks in advance for a reply
    Regards
    Andrea

    #145181
    Rumyan Tsekov
    Participant

    Hey! Please, try opening Incognito window in your browser. Does it work there?

    #145189
    Scambia Ricette
    Participant

    Dear Rumyan,
    no it doesn’t work in chrome incognito mode too.
    🙁

    #145194
    Rumyan Tsekov
    Participant

    I can only guess, that your theme options set buttons to open in new window and the variables are lost?

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.