Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow Site Owners to Exclude Users from EOT Reminder Emails #816

Closed
patdumond opened this issue Dec 15, 2015 · 11 comments
Closed
Assignees
Labels

Comments

@patdumond
Copy link

@patdumond patdumond commented Dec 15, 2015

With the new EOT reminders notifications we've added a much-requested feature to s2Member, but our users still see room for improvement. One request is to allow site owners to flag users to exclude users from receiving the EOT Reminder Emails. The site owner who requested this feature suggested allowing these changes to be made by the Admin on the User's profile. I think it should also be available for the member to change on the user profile generated by [s2Member-Profile /] and available for placement on User Registration so that members can opt-out of receiving the email reminders at registration.

Reference Private/Internal Ticket: https://websharks.zendesk.com/agent/tickets/10032

@luisrock
Copy link

@luisrock luisrock commented Dec 15, 2015

Yes, great feature! For me, a checkbox on the user's profile would be great. I don't want to send the EOT reminder email for certain users...As it is now, it is all or nothing, which is not suitable for me.

Thanks!

@jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Dec 16, 2015

Possible Short-Term Workaround

This hack allows you to exclude certain users (by email address) until we improve filters/functionality.

Create this directory and file:
wp-content/mu-plugins/s2-hacks.php

<?php
add_filter('ws_plugin__s2member_pro_eot_reminder_email_recipients', function($recipients) {
    $recipient_emails = c_ws_plugin__s2member_utils_strings::parse_emails($recipients);

    $emails_to_exclude = array(
        'jane@example.com',
        'john@example.com',
    );
    foreach($emails_to_exclude as $_email_to_exclude) {
        if(in_array($_email_to_exclude, $recipient_emails, true)) {
            return $recipients = array(); // Prevent email from being sent.
        }
    }
    return $recipients; // Else pass through as-is.
});
@luisrock
Copy link

@luisrock luisrock commented Dec 16, 2015

Nice hack. Thanks. That'll do it for now.

Regards

jaswrks pushed a commit that referenced this issue Dec 18, 2015
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Dec 18, 2015
@jaswrks jaswrks added this to the Next Release milestone Dec 18, 2015
@jaswrks jaswrks self-assigned this Dec 18, 2015
@jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Dec 18, 2015

Next Release Changelog:

  • (s2Member Pro) Reminder Email Notification Exclusions: It is now possible to enable/disable EOT Renewal/Reminder Email notifications on a per-user basis. You can edit a user's profile in the WP Dashboard and check "No (exclude)" to prevent specific users from receiving any reminder emails that you configured. Props at @patdumond @luisrock. See also this GitHub issue.
@jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Dec 18, 2015

2015-12-18_04-41-57

There is also a new filter.
ws_plugin__s2member_pro_eot_reminders_exclude_user_ids

@jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Dec 18, 2015

What's left in this issue?

@patdumond suggests...

and available for placement on User Registration so that members can opt-out of receiving the email reminders at registration.

@luisrock
Copy link

@luisrock luisrock commented Dec 18, 2015

Hey, Jason.

Quick and precise! And thanks for mentioning me.

About @patdumond suggestion, I really do not see me using it. So, in case you are planning to implement it, it would be great if admin could choose whether or not to give user the possibility to opt-out of the EOT email reminder process.

My users will not have this luxury... :)

Thanks again.

@jaswrks jaswrks modified the milestones: Future Release, Next Release Dec 18, 2015
@jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Dec 18, 2015

Update: Work from this issue was pushed out with the release of s2Member v151218.
See: http://s2member.com/changelog/ for full details.

@jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Dec 18, 2015

Quick and precise! And thanks for mentioning me.

Quite welcome :-)

So, in case you are planning to implement it, it would be great if admin could choose whether or not to give user the possibility to opt-out of the EOT email reminder process.

My users will not have this luxury... :)

Copy that. I understand what you mean. I'll give the remaining work some more thought.

@jaswrks jaswrks modified the milestones: Future Release, Next Release Apr 23, 2016
@luisrock
Copy link

@luisrock luisrock commented Jul 18, 2016

Hi, Jason.

Now that you´ve implemented this feature, how can I get/change the value from Enable Reminder Emails? option (user-edit.php page)?

Thanks.

@luisrock
Copy link

@luisrock luisrock commented Jul 18, 2016

Nevermind.

I tried update_user_meta($user_id, 'wp_s2member_reminders_enable', "1"); and it went as I wished.

May I suggest that you update plugin's documentation with it?

Anyway, thanks.

@raamdev raamdev closed this Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants