Title: Custom JavaScript doesn&#8217;t work on Checkout page
Last modified: February 19, 2020

---

# Custom JavaScript doesn’t work on Checkout page

 *  [otoraby](https://wordpress.org/support/users/otoraby/)
 * (@otoraby)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-javascript-doesnt-work-on-checkout-page/)
 * I use this script for converting English numbers to Persian numbers:
 *     ```
       jQuery(document).ready(function($) {
       $(window).on('load', function persianModule(){
             var els = document.querySelectorAll('.woocommerce-Price-amount, .amount ');
             els.forEach(function(item) {
               item.textContent = persianJs(item.textContent).englishNumber().toString();
             });
           });
       });
       $(".woocommerce-Price-amount, .amount ").replaceAll($(".woocommerce-Price-amount, .amount "));
       ```
   
 * It works for Shop front page and I can see the prices in Persian format but it
   doesn’t work for Checkout page (after Ajax reload).
 * Could you please guide me to modify my script and get it working in all pages
   of WooCommerce?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-javascript-doesnt-work-on-checkout-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [woowamp](https://wordpress.org/support/users/woowamp/)
 * (@woowamp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-javascript-doesnt-work-on-checkout-page/#post-12455275)
 * Where do you put this script?
 *  Thread Starter [otoraby](https://wordpress.org/support/users/otoraby/)
 * (@otoraby)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-javascript-doesnt-work-on-checkout-page/#post-12455957)
 * In footer area, I have tested in header too but there is no difference.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom JavaScript doesn’t work on Checkout page’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [price](https://wordpress.org/support/topic-tag/price/)

 * 2 replies
 * 2 participants
 * Last reply from: [otoraby](https://wordpress.org/support/users/otoraby/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/custom-javascript-doesnt-work-on-checkout-page/#post-12455957)
 * Status: not resolved