From 4394589bf5cb92cdccb898cceff5cf7470cc493b Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:43:11 -0300 Subject: [PATCH] Update the cached settings after an update --- admin/settings/class-admin-apple-settings-section.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/admin/settings/class-admin-apple-settings-section.php b/admin/settings/class-admin-apple-settings-section.php index 5ad1c7d6..9f6c540d 100644 --- a/admin/settings/class-admin-apple-settings-section.php +++ b/admin/settings/class-admin-apple-settings-section.php @@ -643,5 +643,13 @@ public function save_settings() { // Save to options. update_option( self::$section_option_name, $settings, 'no' ); + + /** + * Update the cached settings with new one after an update. + * + * The `self::get_value` method uses this cached data. By resetting it, we ensure + * that the new value is used after an update instead of the old value. + */ + self::$loaded_settings = $settings; } }