в (class-wc-fronted-script.php) вот код, который у меня есть:
Код: Выделить всё
case 'wc-add-to-cart-variation':
// We also need the wp.template for this script :).
wc_get_template( 'single-product/add-to-cart/variation.php' );
$params = array(
'wc_ajax_url' => WC_AJAX::get_endpoint( '%%endpoint%%' ),
'i18n_no_matching_variations_text' => esc_attr__( 'Sorry, no products matched your selection. Please choose a different combination.', 'woocommerce' ),
'i18n_make_a_selection_text' => esc_attr__( 'Please select some product options before adding this product to your cart.', 'woocommerce' ),
'i18n_unavailable_text' => esc_attr__( 'Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce' ),
);
break;
Спасибо!
Я попробовал эту функцию:
Код: Выделить всё
add_action('wp_enqueue_scripts', function () {
// Remove WooCommerce's add-to-cart variation script
wp_dequeue_script('wc-add-to-cart-variation');
}, 100);
Подробнее здесь: https://stackoverflow.com/questions/792 ... oocommerce
Мобильная версия