I use this script for converting English numbers to Persian numbers:
window.onload = function persianModule(){
var els = document.querySelectorAll('.woocommerce-Price-amount, .amount ');
els.forEach(function(item) {
item.textContent = persianJs(item.textContent).englishNumber().toString();
});
};
When page reloads with an Ajax function, above script doesn’t work but after page refresh through browser it works very nice.
How can I force above script do the function even after an Ajax reload?