Version Description
- Added a new option so the admin notification email content can be customized from the email settings menu of the plugin.
Download this release
Release Info
| Developer | mra13 |
| Plugin | |
| Version | 3.3.6 |
| Comparing to | |
| See all releases | |
Code changes from version 3.3.5 to 3.3.6
- classes/class.swpm-installation.php +10 -3
- classes/class.swpm-registration.php +11 -4
- classes/class.swpm-settings.php +5 -0
- readme.txt +5 -1
- simple-wp-membership.php +2 -2
classes/class.swpm-installation.php
CHANGED
|
@@ -147,8 +147,7 @@ class SwpmInstallation {
|
|
| 147 |
meta_type varchar(255) NOT NULL DEFAULT 'text',
|
| 148 |
meta_default text,
|
| 149 |
meta_context varchar(255) NOT NULL DEFAULT 'default',
|
| 150 |
-
KEY level_id (level_id)
|
| 151 |
-
UNIQUE KEY (level_id,meta_key(100))
|
| 152 |
)" . $charset_collate . " AUTO_INCREMENT=1;";
|
| 153 |
dbDelta($sql);
|
| 154 |
|
|
@@ -195,6 +194,12 @@ class SwpmInstallation {
|
|
| 195 |
"Please login to the member area at the following URL:\n\n" .
|
| 196 |
"{login_link}\n\n" .
|
| 197 |
"Thank You";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
|
| 199 |
$upgrade_email_subject = "Subject for email sent after account upgrade";
|
| 200 |
$upgrade_email_body = "Dear {first_name} {last_name}" .
|
|
@@ -238,10 +243,12 @@ class SwpmInstallation {
|
|
| 238 |
->set_value('account-change-email-subject', stripslashes($status_change_email_subject))
|
| 239 |
->set_value('account-change-email-body', stripslashes($status_change_email_body))
|
| 240 |
->set_value('email-from', trim(get_option('admin_email')));
|
| 241 |
-
|
|
|
|
| 242 |
$settings->set_value('bulk-activate-notify-mail-subject', stripslashes($bulk_activate_email_subject));
|
| 243 |
$settings->set_value('bulk-activate-notify-mail-body', stripslashes($bulk_activate_email_body));
|
| 244 |
}
|
|
|
|
| 245 |
if (version_compare($installed_version, SIMPLE_WP_MEMBERSHIP_VER) == -1) {
|
| 246 |
//Do upgrade tasks
|
| 247 |
}
|
| 147 |
meta_type varchar(255) NOT NULL DEFAULT 'text',
|
| 148 |
meta_default text,
|
| 149 |
meta_context varchar(255) NOT NULL DEFAULT 'default',
|
| 150 |
+
KEY level_id (level_id)
|
|
|
|
| 151 |
)" . $charset_collate . " AUTO_INCREMENT=1;";
|
| 152 |
dbDelta($sql);
|
| 153 |
|
| 194 |
"Please login to the member area at the following URL:\n\n" .
|
| 195 |
"{login_link}\n\n" .
|
| 196 |
"Thank You";
|
| 197 |
+
$reg_email_body_admin = "A new member has completed the registration.\n\n" .
|
| 198 |
+
"Username: {user_name}\n" .
|
| 199 |
+
"Email: {email}\n\n" .
|
| 200 |
+
"Please login to the admin dashboard to view details of this user.\n\n" .
|
| 201 |
+
"You can customize this email message from the Email Settings menu of the plugin.\n\n" .
|
| 202 |
+
"Thank You";
|
| 203 |
|
| 204 |
$upgrade_email_subject = "Subject for email sent after account upgrade";
|
| 205 |
$upgrade_email_body = "Dear {first_name} {last_name}" .
|
| 243 |
->set_value('account-change-email-subject', stripslashes($status_change_email_subject))
|
| 244 |
->set_value('account-change-email-body', stripslashes($status_change_email_body))
|
| 245 |
->set_value('email-from', trim(get_option('admin_email')));
|
| 246 |
+
$settings->set_value('reg-complete-mail-body-admin', stripslashes($reg_email_body_admin));
|
| 247 |
+
|
| 248 |
$settings->set_value('bulk-activate-notify-mail-subject', stripslashes($bulk_activate_email_subject));
|
| 249 |
$settings->set_value('bulk-activate-notify-mail-body', stripslashes($bulk_activate_email_body));
|
| 250 |
}
|
| 251 |
+
|
| 252 |
if (version_compare($installed_version, SIMPLE_WP_MEMBERSHIP_VER) == -1) {
|
| 253 |
//Do upgrade tasks
|
| 254 |
}
|
classes/class.swpm-registration.php
CHANGED
|
@@ -49,13 +49,20 @@ abstract class SwpmRegistration {
|
|
| 49 |
|
| 50 |
$headers = 'From: ' . $from_address . "\r\n";
|
| 51 |
$subject = "Notification of New Member Registration";
|
| 52 |
-
$
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
foreach ($notify_emails_array as $to_email){
|
| 57 |
$to_email = trim($to_email);
|
| 58 |
-
wp_mail($to_email, $subject, $
|
| 59 |
SwpmLog::log_simple_debug('Admin notification email sent to: '.$to_email, true);
|
| 60 |
}
|
| 61 |
}
|
| 49 |
|
| 50 |
$headers = 'From: ' . $from_address . "\r\n";
|
| 51 |
$subject = "Notification of New Member Registration";
|
| 52 |
+
$admin_notify_body = $settings->get_value('reg-complete-mail-body-admin');
|
| 53 |
+
if(empty($admin_notify_body)){
|
| 54 |
+
$admin_notify_body = "A new member has completed the registration.\n\n" .
|
| 55 |
+
"Username: {user_name}\n" .
|
| 56 |
+
"Email: {email}\n\n" .
|
| 57 |
+
"Please login to the admin dashboard to view details of this user.\n\n" .
|
| 58 |
+
"You can customize this email message from the Email Settings menu of the plugin.\n\n" .
|
| 59 |
+
"Thank You";
|
| 60 |
+
}
|
| 61 |
+
$admin_notify_body = SwpmMiscUtils::replace_dynamic_tags($admin_notify_body, $member_id);//Do the standard merge var replacement.
|
| 62 |
|
| 63 |
foreach ($notify_emails_array as $to_email){
|
| 64 |
$to_email = trim($to_email);
|
| 65 |
+
wp_mail($to_email, $subject, $admin_notify_body, $headers);
|
| 66 |
SwpmLog::log_simple_debug('Admin notification email sent to: '.$to_email, true);
|
| 67 |
}
|
| 68 |
}
|
classes/class.swpm-settings.php
CHANGED
|
@@ -131,6 +131,7 @@ class SwpmSettings {
|
|
| 131 |
//Registration complete email settings
|
| 132 |
$msg_for_admin_notify_email_field = SwpmUtils::_('Enter the email address where you want the admin notification email to be sent to.');
|
| 133 |
$msg_for_admin_notify_email_field .= SwpmUtils::_(' You can put multiple email addresses separated by comma (,) in the above field to send the notification to multiple email addresses.');
|
|
|
|
| 134 |
add_settings_section('reg-email-settings', SwpmUtils::_('Email Settings (Registration Complete)'), array(&$this, 'reg_email_settings_callback'), 'simple_wp_membership_settings');
|
| 135 |
add_settings_field('reg-complete-mail-subject', SwpmUtils::_('Email Subject'), array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'reg-complete-mail-subject',
|
| 136 |
'message' => ''));
|
|
@@ -140,6 +141,9 @@ class SwpmSettings {
|
|
| 140 |
'message' => SwpmUtils::_('Enable this option if you want the admin to receive a notification when a member registers.')));
|
| 141 |
add_settings_field('admin-notification-email', SwpmUtils::_('Admin Email Address'), array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'admin-notification-email',
|
| 142 |
'message' => $msg_for_admin_notify_email_field));
|
|
|
|
|
|
|
|
|
|
| 143 |
add_settings_field('enable-notification-after-manual-user-add', SwpmUtils::_('Send Email to Member When Added via Admin Dashboard'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'enable-notification-after-manual-user-add',
|
| 144 |
'message' => ''));
|
| 145 |
|
|
@@ -366,6 +370,7 @@ class SwpmSettings {
|
|
| 366 |
$output = $this->settings;
|
| 367 |
$output['reg-complete-mail-subject'] = sanitize_text_field($input['reg-complete-mail-subject']);
|
| 368 |
$output['reg-complete-mail-body'] = wp_kses_data(force_balance_tags($input['reg-complete-mail-body']));
|
|
|
|
| 369 |
|
| 370 |
$output['reset-mail-subject'] = sanitize_text_field($input['reset-mail-subject']);
|
| 371 |
$output['reset-mail-body'] = wp_kses_data(force_balance_tags($input['reset-mail-body']));
|
| 131 |
//Registration complete email settings
|
| 132 |
$msg_for_admin_notify_email_field = SwpmUtils::_('Enter the email address where you want the admin notification email to be sent to.');
|
| 133 |
$msg_for_admin_notify_email_field .= SwpmUtils::_(' You can put multiple email addresses separated by comma (,) in the above field to send the notification to multiple email addresses.');
|
| 134 |
+
$admin_notify_email_body_msg = SwpmUtils::_('This email will be sent to the admin when a new user completes the membership registration. Only works if you have enabled the "Send Notification to Admin" option above.');
|
| 135 |
add_settings_section('reg-email-settings', SwpmUtils::_('Email Settings (Registration Complete)'), array(&$this, 'reg_email_settings_callback'), 'simple_wp_membership_settings');
|
| 136 |
add_settings_field('reg-complete-mail-subject', SwpmUtils::_('Email Subject'), array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'reg-complete-mail-subject',
|
| 137 |
'message' => ''));
|
| 141 |
'message' => SwpmUtils::_('Enable this option if you want the admin to receive a notification when a member registers.')));
|
| 142 |
add_settings_field('admin-notification-email', SwpmUtils::_('Admin Email Address'), array(&$this, 'textfield_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'admin-notification-email',
|
| 143 |
'message' => $msg_for_admin_notify_email_field));
|
| 144 |
+
add_settings_field('reg-complete-mail-body-admin', SwpmUtils::_('Admin Notification Email Body'), array(&$this, 'textarea_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'reg-complete-mail-body-admin',
|
| 145 |
+
'message' => $admin_notify_email_body_msg));
|
| 146 |
+
|
| 147 |
add_settings_field('enable-notification-after-manual-user-add', SwpmUtils::_('Send Email to Member When Added via Admin Dashboard'), array(&$this, 'checkbox_callback'), 'simple_wp_membership_settings', 'reg-email-settings', array('item' => 'enable-notification-after-manual-user-add',
|
| 148 |
'message' => ''));
|
| 149 |
|
| 370 |
$output = $this->settings;
|
| 371 |
$output['reg-complete-mail-subject'] = sanitize_text_field($input['reg-complete-mail-subject']);
|
| 372 |
$output['reg-complete-mail-body'] = wp_kses_data(force_balance_tags($input['reg-complete-mail-body']));
|
| 373 |
+
$output['reg-complete-mail-body-admin'] = wp_kses_data(force_balance_tags($input['reg-complete-mail-body-admin']));
|
| 374 |
|
| 375 |
$output['reset-mail-subject'] = sanitize_text_field($input['reset-mail-subject']);
|
| 376 |
$output['reset-mail-body'] = wp_kses_data(force_balance_tags($input['reset-mail-body']));
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://simple-membership-plugin.com/
|
|
| 4 |
Tags: member, members, members only, membership, memberships, register, WordPress membership plugin, content, content protection, paypal, restrict, restrict access, Restrict content, admin, access control, subscription, teaser, protection, profile, login, login page, bbpress, stripe
|
| 5 |
Requires at least: 4.0
|
| 6 |
Tested up to: 4.6
|
| 7 |
-
Stable tag: 3.3.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -127,6 +127,10 @@ Please visit the memberhsip plugin page to view screenshots:
|
|
| 127 |
https://simple-membership-plugin.com/
|
| 128 |
|
| 129 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
= 3.3.5 =
|
| 131 |
- Added nonce check on the edit profile form.
|
| 132 |
- Added an extra check for the membership level data on the registration form.
|
| 4 |
Tags: member, members, members only, membership, memberships, register, WordPress membership plugin, content, content protection, paypal, restrict, restrict access, Restrict content, admin, access control, subscription, teaser, protection, profile, login, login page, bbpress, stripe
|
| 5 |
Requires at least: 4.0
|
| 6 |
Tested up to: 4.6
|
| 7 |
+
Stable tag: 3.3.6
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 127 |
https://simple-membership-plugin.com/
|
| 128 |
|
| 129 |
== Changelog ==
|
| 130 |
+
|
| 131 |
+
= 3.3.6 =
|
| 132 |
+
- Added a new option so the admin notification email content can be customized from the email settings menu of the plugin.
|
| 133 |
+
|
| 134 |
= 3.3.5 =
|
| 135 |
- Added nonce check on the edit profile form.
|
| 136 |
- Added an extra check for the membership level data on the registration form.
|
simple-wp-membership.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Simple WordPress Membership
|
| 4 |
-
Version: 3.3.
|
| 5 |
Plugin URI: https://simple-membership-plugin.com/
|
| 6 |
Author: smp7, wp.insider
|
| 7 |
Author URI: https://simple-membership-plugin.com/
|
|
@@ -17,7 +17,7 @@ include_once('classes/class.simple-wp-membership.php');
|
|
| 17 |
include_once('classes/class.swpm-cronjob.php');
|
| 18 |
include_once('swpm-compat.php');
|
| 19 |
|
| 20 |
-
define('SIMPLE_WP_MEMBERSHIP_VER', '3.3.
|
| 21 |
define('SIMPLE_WP_MEMBERSHIP_DB_VER', '1.2');
|
| 22 |
define('SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL', home_url());
|
| 23 |
define('SIMPLE_WP_MEMBERSHIP_PATH', dirname(__FILE__) . '/');
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Simple WordPress Membership
|
| 4 |
+
Version: 3.3.6
|
| 5 |
Plugin URI: https://simple-membership-plugin.com/
|
| 6 |
Author: smp7, wp.insider
|
| 7 |
Author URI: https://simple-membership-plugin.com/
|
| 17 |
include_once('classes/class.swpm-cronjob.php');
|
| 18 |
include_once('swpm-compat.php');
|
| 19 |
|
| 20 |
+
define('SIMPLE_WP_MEMBERSHIP_VER', '3.3.6');
|
| 21 |
define('SIMPLE_WP_MEMBERSHIP_DB_VER', '1.2');
|
| 22 |
define('SIMPLE_WP_MEMBERSHIP_SITE_HOME_URL', home_url());
|
| 23 |
define('SIMPLE_WP_MEMBERSHIP_PATH', dirname(__FILE__) . '/');
|
