title: Redirecting to different page for mobile is not working on checkout page
body: <p>I wanted to reedirect my homepage to another static page for mobile. So i incorprated this code in the code snippet.</p>
  <pre><code>add_action( 'wp', 'tu_redirect_mobile' );
  function tu_redirect_mobile() {
      if ( is_front_page() &amp;&amp; wp_is_mobile()) {
          wp_redirect( 'https://asharficlothing.com/mobile/', 301 );
          exit;
      }
  }
  </code></pre>
  <p>Now the code works for every page and i am having no problem except on checkout page where the cursor goes to infinite wait stage and keeps on revolving and remain in the wait stage</p>
  <p>Below is the screenshot of it:
  <a href="https://i.stack.imgur.com/yBUyJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yBUyJ.png" alt="enter image description here" /></a></p>
  <p>Now when i was looking into the network section of chrome i found this:
  <a href="https://i.stack.imgur.com/o9G3F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o9G3F.png" alt="enter image description here" /></a></p>