Change newsletter and template saving to JSON encode body separately
This commit is contained in:
@@ -30,10 +30,6 @@ class NewsletterTemplates {
|
||||
}
|
||||
|
||||
function save($data = array()) {
|
||||
if (isset($data['body'])) {
|
||||
$data['body'] = json_encode($data['body']);
|
||||
}
|
||||
|
||||
$result = NewsletterTemplate::createOrUpdate($data);
|
||||
if($result !== true) {
|
||||
wp_send_json($result);
|
||||
|
@@ -59,10 +59,6 @@ class Newsletters {
|
||||
unset($data['options']);
|
||||
}
|
||||
|
||||
if (isset($data['body'])) {
|
||||
$data['body'] = json_encode($data['body']);
|
||||
}
|
||||
|
||||
$errors = array();
|
||||
$result = false;
|
||||
|
||||
|
Reference in New Issue
Block a user