Don't send signup confirmation when signup confirmation is disabled
Fixed issue with select2 not selecting values by default on newsletter send step
This commit is contained in:
@ -89,10 +89,17 @@ function(
|
||||
if(this.props.field['selected'] !== undefined) {
|
||||
return this.props.field['selected'](this.props.item);
|
||||
} else if(this.props.item !== undefined && this.props.field.name !== undefined) {
|
||||
return this.props.item[this.props.field.name];
|
||||
} else {
|
||||
return null;
|
||||
if (this.allowMultipleValues()) {
|
||||
if (Array.isArray(this.props.item[this.props.field.name])) {
|
||||
return this.props.item[this.props.field.name].map(function(item) {
|
||||
return item.id;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return this.props.item[this.props.field.name];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
loadCachedItems: function() {
|
||||
if(typeof(window['mailpoet_'+this.props.field.endpoint]) !== 'undefined') {
|
||||
|
@ -75,6 +75,10 @@ class Subscriber extends Model {
|
||||
function sendConfirmationEmail() {
|
||||
$signup_confirmation = Setting::getValue('signup_confirmation');
|
||||
|
||||
if((bool)$signup_confirmation['enabled'] === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$segments = $this->segments()->findMany();
|
||||
$segment_names = array_map(function($segment) {
|
||||
return $segment->name;
|
||||
|
Reference in New Issue
Block a user