title: How can i refresh woocomerce checkout page every 20 seconds?
body: <p>I have a problem with a <code>woocommerce</code> site I have.</p>
  
  <p>The <strong>problem</strong> is that I need to refresh the checkout page every <code>20</code> seconds when I hit the <strong>place order</strong> button. </p>
  
  <p>The main reason is that I have a plugin that informs in real time the user for the order. Also it process the order to be from "<strong>onhold</strong>" to "<strong>completed</strong>" automatically. </p>
  
  <p>But for some reason in <code>iPad</code> -<code>iPhones</code> it isn't refreshing, so is there any possible solution to refresh the checkout page automatically?</p>
  
  <p>This is the code I use to update the checkout status automatically:</p>
  
  <pre><code>/* Reset status of new orders from "on-hold" to "complete" */
  add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
  function custom_woocommerce_auto_complete_order( $order_id ) {
      global $woocommerce;
       if ( !$order_id )
          return;
      $order = new WC_Order( $order_id );
      $order-&gt;update_status( 'completed' );
  }
  </code></pre>
  
  <p>Thanks all for your time :)</p>