From ae09922ff1e032f2d1902cb9a1a4813079c520a6 Mon Sep 17 00:00:00 2001 From: Romario Raffington Date: Thu, 20 Jul 2023 06:23:49 -0500 Subject: [PATCH] Whitelist `jetpack_memberships_site_subscriber` post meta (#31956) * Whitelist jetpack_memberships_site_subscriber * changelog * Move magic string to constants file * Register site_subscriber meta in get_plan_property_mapping --- .../changelog/add-whitelist-site-subscriber-post-meta | 4 ++++ .../modules/memberships/class-jetpack-memberships.php | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/add-whitelist-site-subscriber-post-meta diff --git a/projects/plugins/jetpack/changelog/add-whitelist-site-subscriber-post-meta b/projects/plugins/jetpack/changelog/add-whitelist-site-subscriber-post-meta new file mode 100644 index 0000000000000..b63389d09ed38 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-whitelist-site-subscriber-post-meta @@ -0,0 +1,4 @@ +Significance: minor +Type: bugfix + +Whitelist jetpack_memberships_site_subscriber post meta to allow for syncing to WordPress.com diff --git a/projects/plugins/jetpack/modules/memberships/class-jetpack-memberships.php b/projects/plugins/jetpack/modules/memberships/class-jetpack-memberships.php index eba8c204725ba..e22529b0d5c68 100644 --- a/projects/plugins/jetpack/modules/memberships/class-jetpack-memberships.php +++ b/projects/plugins/jetpack/modules/memberships/class-jetpack-memberships.php @@ -142,12 +142,15 @@ public static function get_instance() { private static function get_plan_property_mapping() { $meta_prefix = 'jetpack_memberships_'; $properties = array( - 'price' => array( + 'price' => array( 'meta' => $meta_prefix . 'price', ), - 'currency' => array( + 'currency' => array( 'meta' => $meta_prefix . 'currency', ), + 'site_subscriber' => array( + 'meta' => $meta_prefix . 'site_subscriber', + ), ); return $properties; }