title: Woocommerce: how to use wp_ajax_woocommerce_update_order_review hook in order review page
body: <p>How i can use Ajax in checkout page in woocommerce. I am trying to add custom pricing just before Payment in Order Review Page.</p>
  
  <p>I have a check box when user will select the checkbox and pricing should be add in order.</p>
  
  <p>Here is my code </p>
  
  <pre><code>function woocommerce_update_order_review() {
  global $woocommerce;
          $prc = strip_tags($woocommerce-&gt;cart-&gt;get_cart_total());
          $priceValue = str_replace(",","",str_replace("#36;","",substr($prc,1)));
          if($priceValue&lt;=300 &amp;&amp; $priceValue&gt;200){
                      $rate_cost = 2.70;
          }
          else if($priceValue&gt;300){
                  $extraDvalue = 2.70;
                  $extraVal = ceil(round(($priceValue-300),0)/100)*.90;
                  $newPr = $extraDvalue+$extraVal;
                  $rate_cost = $newPr;    
          }
              if($priceValue&gt;100){
                  $woocommerce-&gt;cart-&gt;add_fee( 'Declared value', $rate_cost, false,  '' );
              }
  
  
  
      exit;
  }
  
  
  
  add_action('wp_ajax_woocommerce_update_order_review','woocommerce_update_order_review');
  add_action('wp_ajax_nopriv_woocommerce_update_order_review','woocommerce_update_order_review');
  </code></pre>
  
  <p>JS CODE</p>
  
  <pre><code>var ajaxurl = '&lt;?php echo admin_url('admin-ajax.php'); ?&gt;';
      // This does the ajax request
         jQuery.ajax({
      type: "POST",
      url: '&lt;?php echo admin_url('admin-ajax.php'); ?&gt;',
      data: {
              action: 'woocommerce_update_order_review', check: 'check'
          }
  }).done(function(value) {
    alert(value);
  });
  </code></pre>
  
  <p>Please suggest is this possible or not ?</p>
  
  <p>Thanks</p>