AJAX Doesn’t Work Under PHP8+
-
Hello,
When I’m switching to PHP 8.0, 8.1, 8.2 ajax search doesn’t work and in console log I see error:
jquery-3-6-0.min.js response 500
When I’m switching back to PHP 7.4 everything’s working fine.
Here’s how I enqueue my scripts in functions.php
function load_scripts(){
wp_deregister_script('jquery');
wp_register_script('jquery', get_template_directory_uri().'/js/jquery-3-6-0.min.js');
wp_enqueue_script('jquery');
wp_enqueue_script('lightslider-script', get_template_directory_uri().'/js/lightslider.min.js', array('jquery'));
}
add_action('wp_enqueue_scripts', 'load_scripts');Can you please fix this issue?
WP Version: 6.1.1
WC Version: 7.3.0
Plugin Version: 2.71Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘AJAX Doesn’t Work Under PHP8+’ is closed to new replies.