Index: wp-includes/post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/wp-includes/post.php b/wp-includes/post.php
--- a/wp-includes/post.php	(revision 3658bca7fde4ca8c01ac9f85928fda7fa60bbd85)
+++ b/wp-includes/post.php	(date 1709395455602)
@@ -6970,6 +6970,19 @@
 		return;
 	}
 
+	/**
+	 * Allowes to stop {@see wp_check_for_changed_slugs()} function functionality.
+	 *
+	 * @since 6.4.3
+	 *
+	 * @param bool    $is_skip      If true the {@see wp_check_for_changed_slugs()} will be stopped.
+	 * @param WP_Post $post         The post object.
+	 * @param WP_Post $post_before  The previous post object.
+	 */
+	if ( apply_filters( 'skip_wp_check_for_changed_slugs', false, $post, $post_before ) ) {
+		return;
+	}
+
 	$old_slugs = (array) get_post_meta( $post_id, '_wp_old_slug' );
 
 	// If we haven't added this old slug before, add it now.
