jQuery compatibility messed up with my theme
-
Hi, your last update totally messed up my website because of this function (1240 in RTMedia.php) :
public function wp67_compatibility_scripts() {
global $wp_version;
// Enqueue jQuery Migrate for WordPress 6.7+ compatibility
if ( version_compare( $wp_version, '6.7', '>=' ) ) {
if ( ! wp_script_is( 'jquery-migrate', 'enqueued' ) ) {
wp_enqueue_script( 'jquery-migrate' );
}
}
}If I patch it like this then it’s ok :
public function wp67_compatibility_scripts() {
global $wp_version;
// Enqueue jQuery Migrate for WordPress 6.7+ compatibility
if ( version_compare( $wp_version, '6.7', '>=' ) ) {
if ( wp_script_is('jquery', 'enqueued') && !wp_script_is('jquery-migrate', 'enqueued') ) {
wp_enqueue_script( 'jquery-migrate' );
}
}
}Please be careful next time, it made me lost a bunch of money as people couldn’t suscribe to my services anymore and it took me a while to find the reason.
You must be logged in to reply to this topic.