diff --git a/readme.txt b/readme.txt index a0e44802..5f92b5fd 100644 --- a/readme.txt +++ b/readme.txt @@ -297,6 +297,9 @@ Yes! We're offering a [custom plugin development](https://bracketspace.com/custo == Changelog == += [Next] = +* [Changed] Notification data is now kept in the wp_posts table for easier reverting to previous version. + = 9.0.0 = **Compatibility Breaking Changes** diff --git a/src/Database/NotificationDatabaseService.php b/src/Database/NotificationDatabaseService.php index 3a0a63f8..60833507 100644 --- a/src/Database/NotificationDatabaseService.php +++ b/src/Database/NotificationDatabaseService.php @@ -220,7 +220,10 @@ public static function upsert(Notification $notification) 'ID' => $post === null ? 0 : $post->ID, 'post_title' => $notification->getTitle(), 'post_name' => $notification->getHash(), - 'post_content' => '', + /** + * @todo Remove backward compatibility content save. + */ + 'post_content' => $notification->to('json'), 'post_status' => $notification->isEnabled() ? 'publish' : 'draft', 'post_type' => 'notification', ]