fixed subscribe on registration not using the proper setting
This commit is contained in:
@@ -190,6 +190,8 @@ class Menu {
|
||||
}
|
||||
|
||||
function welcome() {
|
||||
if((bool)(defined('DOING_AJAX') && DOING_AJAX)) return;
|
||||
|
||||
global $wp;
|
||||
$current_url = home_url(add_query_arg($wp->query_string, $wp->request));
|
||||
$redirect_url =
|
||||
|
@@ -44,7 +44,8 @@ class Registration {
|
||||
$errors = null
|
||||
) {
|
||||
if(
|
||||
isset($_POST['mailpoet']['subscribe_on_register'])
|
||||
empty($errors->errors)
|
||||
&& isset($_POST['mailpoet']['subscribe_on_register'])
|
||||
&& (bool)$_POST['mailpoet']['subscribe_on_register'] === true
|
||||
) {
|
||||
static::subscribeNewUser(
|
||||
@@ -56,7 +57,7 @@ class Registration {
|
||||
|
||||
private static function subscribeNewUser($name, $email) {
|
||||
$segment_ids = Setting::getValue(
|
||||
'subscribe.on_comment.segments',
|
||||
'subscribe.on_register.segments',
|
||||
array()
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user