Allow saving forms without name

[MAILPOET-2450]
This commit is contained in:
Rostislav Wolny
2019-10-31 15:58:28 +01:00
committed by Jack Kitterhing
parent 96f71416b4
commit b0ef65a1eb
8 changed files with 21 additions and 28 deletions

View File

@@ -14,14 +14,6 @@ use MailPoet\WP\Functions as WPFunctions;
class Form extends Model {
public static $_table = MP_FORMS_TABLE;
function __construct() {
parent::__construct();
$this->addValidations('name', [
'required' => __('Please specify a name.', 'mailpoet'),
]);
}
function getSettings() {
return WPFunctions::get()->isSerialized($this->settings) ? unserialize($this->settings) : $this->settings;
}