Skip to content

Commit

Permalink
Category style transients deleted in wrong place
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed May 14, 2024
1 parent fa24407 commit 484f7ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/my-calendar-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function mc_update_category( $field, $data, $category ) {
$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
// Delete category caches.
delete_transient( 'mc_cat_' . $category );
delete_transient( 'mc_generated_category_styles' );

return $result;
}
Expand Down Expand Up @@ -334,6 +333,8 @@ function mc_update_cat( $category ) {

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

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

= 3.5.4 =
Expand Down

0 comments on commit 484f7ec

Please sign in to comment.