title: How to refresh/reload WooCommerce checkout page after adding a coupon code (wordpress)?
body: <p>I need to reload the entire WooCommerce checkout page after adding a coupon code.<br />
  I tried the following code but it doesn't reload it.</p>
  <p>The reason why I need this function:<br />
  Prices of the review table turns to defalut language prices after adding the coupon code.<br />
  When I refresh the page, it shows translated language prices, so I need to reload it.</p>
  <p>Would you please let me know how to reload it?</p>
  <p><strong>Added this code in a checkout page:</strong></p>
  <pre><code>jQuery(document).ajaxComplete(function(event, xhr, settings) {
      if (settings.url === '/?wc-ajax=apply_coupon') {
          location.reload();
      }
  });
  </code></pre>
  <p>
  <pre><code>jQuery(document).ajaxComplete(function(event, xhr, settings) {
      if (settings.url === '/?wc-ajax=apply_coupon') {
      jQuery('body').trigger('update_checkout');
      }
  });
  </code></pre>
  <p><strong>Order review table:</strong></p>
  <pre><code>&lt;div class=&quot;ea-woo-checkout-order-review&quot;&gt;
          &lt;div class=&quot;ea-checkout-review-order-table&quot;&gt;
              &lt;ul class=&quot;ea-order-review-table&quot;&gt;
                                      &lt;li class=&quot;table-header&quot;&gt;
                          &lt;div class=&quot;table-col-1&quot;&gt;&lt;/div&gt;
                          &lt;div class=&quot;table-col-2&quot;&gt;&lt;/div&gt;
                          &lt;div class=&quot;table-col-3&quot;&gt;&lt;/div&gt;
                                     &lt;/li&gt;
                  
          &lt;li class=&quot;table-row cart_item&quot;&gt;
          &lt;div class=&quot;table-col-1 product-thum-name&quot;&gt;
          &lt;div class=&quot;product-thumbnail&quot;&gt;
          &lt;img width=&quot;300&quot; height=&quot;200&quot; src=&quot;https://www.myweb.com/wp-content/uploads/2021/06/LineOne_22-300x200.jpg&quot; class=&quot;attachment-woocommerce_thumbnail size-woocommerce_thumbnail&quot; alt=&quot;&quot; loading=&quot;lazy&quot;&gt;                              &lt;/div&gt;
          &lt;div class=&quot;product-name&quot;&gt;Template Type&amp;nbsp;&amp;nbsp;&lt;/div&gt;
          &lt;/div&gt;
                                  &lt;div class=&quot;table-col-2 product-quantity&quot;&gt;1&lt;/div&gt;
                                  &lt;div class=&quot;table-col-3 product-total&quot;&gt;&lt;span class=&quot;woocommerce-Price-amount amount&quot;&gt;&lt;bdi&gt;&lt;span class=&quot;woocommerce-Price-currencySymbol&quot;&gt;$&lt;/span&gt;820,000&lt;/bdi&gt;&lt;/span&gt;&lt;/div&gt;
          &lt;/li&gt;
          &lt;/ul&gt;
  
          &lt;div class=&quot;ea-order-review-table-footer&quot;&gt;
          &lt;div class=&quot;footer-content&quot;&gt;
          &lt;div class=&quot;cart-subtotal&quot;&gt;
              &lt;div&gt;&lt;/div&gt;
              &lt;div&gt;&lt;span class=&quot;woocommerce-Price-amount amount&quot;&gt;&lt;bdi&gt;&lt;span class=&quot;woocommerce-Price-currencySymbol&quot;&gt;$&lt;/span&gt;820,000&lt;/bdi&gt;&lt;/span&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;order-total&quot;&gt;
          &lt;div&gt;&lt;/div&gt;
          &lt;div&gt;&lt;strong&gt;&lt;span class=&quot;woocommerce-Price-amount amount&quot;&gt;&lt;bdi&gt;&lt;span class=&quot;woocommerce-Price-currencySymbol&quot;&gt;$&lt;/span&gt;820,000&lt;/bdi&gt;&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;
          &lt;/div&gt;
                          &lt;/div&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>Apply coupon:</strong></p>
  <pre><code>&lt;div class=&quot;woo-checkout-coupon&quot;&gt;
              &lt;div class=&quot;ea-coupon-icon&quot;&gt;&lt;i aria-hidden=&quot;true&quot; class=&quot;fas fa-percent&quot;&gt;&lt;/i&gt;&lt;/div&gt;
                              &lt;div class=&quot;woocommerce-form-coupon-toggle&quot;&gt;
      &lt;div class=&quot;woocommerce-info&quot;&gt;
          Have a coupon? &lt;a href=&quot;#&quot; class=&quot;showcoupon&quot;&gt;Click here to enter your code&lt;/a&gt; &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;form class=&quot;checkout_coupon woocommerce-form-coupon&quot; method=&quot;post&quot; style=&quot;&quot;&gt;
  
                      &lt;p&gt;If you have a coupon code, please apply it below.&lt;/p&gt;
  
                      &lt;p class=&quot;form-row form-row-first&quot;&gt;
                          &lt;input type=&quot;text&quot; name=&quot;coupon_code&quot; class=&quot;input-text&quot; placeholder=&quot;Coupon code&quot; id=&quot;coupon_code&quot; value=&quot;&quot;&gt;
                      &lt;/p&gt;
  
                      &lt;p class=&quot;form-row form-row-last&quot;&gt;
                          &lt;button type=&quot;submit&quot; class=&quot;button&quot; name=&quot;apply_coupon&quot; value=&quot;Apply Coupon&quot;&gt;Apply Coupon&lt;/button&gt;
                      &lt;/p&gt;
  
                      &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
                  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>