Skip to content

Commit

Permalink
Update the cached settings after an update
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonascalves committed Oct 11, 2024
1 parent 53a00e5 commit 4394589
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions admin/settings/class-admin-apple-settings-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 4394589

Please sign in to comment.