Skip to content

Commit ffdd745

Browse files
authored
fix: only flush app settings when updating app settings (#892)
1 parent fe83e66 commit ffdd745

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/new-swans-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@headstartwp/headstartwp": patch
3+
---
4+
5+
Fix: only flush app settings cache when updating app settings option

wp/headless-wp/includes/classes/API/AppEndpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function prepare_menus( $menu ) {
223223
* @return void
224224
*/
225225
public function maybe_invalidate_cache( $option_name ) {
226-
if ( self::$cache_key_store !== $option_name ) {
226+
if ( self::$cache_key_store === $option_name ) {
227227
$this->invalidate_cache();
228228
}
229229
}

0 commit comments

Comments
 (0)