I'm finishing my custom theme for wordpress. When I add a product with ajax to the cart I get a bootstrap.min.js error on the console. I am showing all the products through shortcodes.
This is what my functions.php looks like:
function tuwebeconomica_add_css_js()
{
wp_enqueue_style('bootstrap_css', get_stylesheet_directory_uri() . '/lib/bootstrap/css/bootstrap.min.css', array(), '4.6.2');
wp_enqueue_style('style', get_stylesheet_uri());
wp_enqueue_style('jquery_ui_css', get_stylesheet_directory_uri() . '/lib/jquery/css/jquery-ui.css', array());
wp_enqueue_style('fontawesome_css', get_stylesheet_directory_uri() . '/lib/fontawesome/css/all.min.css', array());
wp_enqueue_script('main_js', get_stylesheet_directory_uri() . '/js/app.js', array('jquery'), true);
wp_enqueue_script('popper_js', get_stylesheet_directory_uri() . '/lib/bootstrap/js/popper.min.js', array('jquery'), '1.16.1', true);
wp_enqueue_script('bootstrap_js', get_stylesheet_directory_uri() . '/lib/bootstrap/js/bootstrap.min.js', array('jquery'), '4.6.2', true);
}
add_action('wp_enqueue_scripts', 'tuwebeconomica_add_css_js');
add_theme_support('woocommerce');
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
This is the error that shows me when I try to add products to the cart with ajax enabled, however when ajax is disabled, I do not get an error and they are correctly added to the cart.
This is the link of my website, maybe it can help to replicate the problem: smarty.tuwebeconomica.es/
Thank you very much in advance.