How to Automatically Update Cart on Quantity Change Using jQuery in WooCommerce WordPress

preview_player
Показать описание
In this woocommerce tutorial for beginners you will learn how to auto update cart on quantities change in website without click on update cart button using custom javascript code.

Add this javascript snippet to update product quantity:

jQuery( function( $ ) {
let timeout;
if ( timeout !== undefined ) {
clearTimeout( timeout );
}
timeout = setTimeout(function() {
$("[name='update_cart']").trigger("click");
}, 500 );
});
} );

#woocommerce #cart #quantity #autoupdate #wordpress #wordpresstutorial #webtaskwithhassan #hassangilani
Рекомендации по теме
Комментарии
Автор

Allah Razı olsun kardeşim çok işime yaradı

ismailkurt
Автор

I tired, it allow only one time, then every thing is not clickable

Menasaat
Автор

Thank you very much. Can you give me an e-mail address where I can reach you?😊

kafkefumut
welcome to shbcf.ru