Hi,
I am using this script for converting woocommerce prices to arabic/english format:
jQuery(document).ready( function(){
var els = document.querySelectorAll('.woocommerce-Price-amount, .amount, .product-quantity');
els.forEach(function(item) {
item.textContent = persianJs(item.textContent).englishNumber().toString();
});
});
jQuery(document).ready( function(){
jQuery( 'body' )
.on( 'init init_checkout updated_checkout checkout_error wc_cart_emptied update_checkout updated_wc_div adding_to_cart added_to_cart removed_from_cart ', function() {
var els = document.querySelectorAll('.woocommerce-Price-amount, .amount, .product-quantity');
els.forEach(function(item) {
item.textContent = persianJs(item.textContent).englishNumber().toString();
});
});
});
It works nice on Shop front page, Cart page and Checkout page but I am not able to run it in Cart Modal elements.
Is there any JavaScript event trigger for Cart Modal and for using in above jquery code?
You may check my shop here: gandom.vip/fa/
Regards