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