Skip to content

Commit

Permalink
Fix the name of this function to avoid fatal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
donnchawp committed May 1, 2024
1 parent 28bb772 commit 8c5c043
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ public function invalidate_cache_by_post_id( $post_id, $action = Filesystem_Util
* @param string $old_status - The old status of the comment.
* @param WP_Comment $comment - The comment that transitioned.
*/
public function rebuild_on_comment_transition( $new_status, $old_status, $comment ) {
public function invalidate_on_comment_transition( $new_status, $old_status, $comment ) {
if ( $new_status === $old_status ) {
return;
}
Logger::debug( "rebuild_on_comment_transition: $new_status, $old_status" );
Logger::debug( "invalidate_on_comment_transition: $new_status, $old_status" );

if ( $new_status !== 'approved' && $old_status !== 'approved' ) {
Logger::debug( 'rebuild_on_comment_transition: comment not approved' );
Logger::debug( 'invalidate_on_comment_transition: comment not approved' );
return;
}

Expand Down

0 comments on commit 8c5c043

Please sign in to comment.