Skip to content

Commit 484f7ec

Browse files
committed
Category style transients deleted in wrong place
1 parent fa24407 commit 484f7ec

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/my-calendar-categories.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function mc_update_category( $field, $data, $category ) {
2828
$result = $wpdb->query( $wpdb->prepare( 'UPDATE ' . my_calendar_categories_table() . " SET $field = %d WHERE category_id=%d", $data, $category ) ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared
2929
// Delete category caches.
3030
delete_transient( 'mc_cat_' . $category );
31-
delete_transient( 'mc_generated_category_styles' );
3231

3332
return $result;
3433
}
@@ -334,6 +333,8 @@ function mc_update_cat( $category ) {
334333

335334
$result = $wpdb->update( my_calendar_categories_table(), $category, $where, $formats, '%d' );
336335
delete_transient( 'mc_cat_' . $category_id );
336+
// Delete category style caches.
337+
delete_transient( 'mc_generated_category_styles' );
337338

338339
return $result;
339340
}

src/readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Translating my plugins is always appreciated. Visit <a href="https://translate.w
102102
* Bug fix: Only show Pro promo inside My Calendar pages.
103103
* Bug fix: Remove support for InnoDB search on pre 5.5 MySQL; add support for Fulltext search on InnoDB otherwise.
104104
* Bug fix: Event title not rendered unless 'read more' enabled.
105+
* Bug fix: Category color styles cache deleted in wrong place.
105106
* Change: Move sqlite check to existing db engine check function.
106107

107108
= 3.5.4 =

0 commit comments

Comments
 (0)