WooCommerce:
I have jQuery that loads on document.ready, which affects the quantity input field. It works great.
My problem is that when I update the cart / delete element, jQuery needs to be run again because an AJAX call kills it (updates it). Is there any hook / filter that I can add that will run my script again after updating the basket? I searched and can’t find anything (or maybe I don’t know what I'm looking for).
Thank!!!!
WooCommerce . script , . updated_cart_totals, updated_wc_div , . .
updated_cart_totals
updated_wc_div
$( document.body ).on( 'updated_cart_totals', function(){ //re-do your jquery });
, , updated_cart_totals updated_wc_div .
Woocommerce
[/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js]
:
$(document.body).on('added_to_cart removed_from_cart', do_magic);
!
Source: https://habr.com/ru/post/1653556/More articles:How to set mathematical constraints using the GenSA function in R - optimizationThe statement is returned true regardless of the condition - phpЧто в объективе я должен использовать для создания только для чтения по индексу? - haskellAny differences between the three dependency injection methods? - javaМожно ли использовать альтернативный CDN для AMP, поскольку ampproject.org заблокирован в Китае? - amp-htmlCost control lambda + kinesite - amazon-web-servicesRunning webdriver with Firefox Python - pythonSelenium 3.0.2 error with Firefox 50: executable file may have incorrect permissions - pythonC ++ default parameter for another parameter - c ++Find a counter of all points in three-dimensional space that are strictly less than any of the points in this space? - algorithmAll Articles