title: how to insert if statement in Wordpress Functions.php file
body: <p>I am using woocommerce and I am editing the wordpress <strong>functions.php</strong> file. </p>
  
  <p>My store has two checkout pages, one before admins review orders (<strong>CHECKOUT</strong>) and the other after admins approve orders (<strong>final-checkout</strong>). </p>
  
  <p>I'd like to remove the billing info from the first checkout page, and only display it in the second (final) checkout page. </p>
  
  <p>In the <strong>functions.php</strong> page, I used the following <strong>if statement</strong>, but its not working. I think the if statement is being tested against the <strong>functions.php</strong> page, rather than the checkout page.</p>
  
  <pre><code>if ( is_page( 'checkout' )){
  
      add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
  
      function custom_override_checkout_fields( $fields ) {
          unset($fields['billing']['billing_first_name']);
          unset($fields['billing']['billing_last_name']);
          unset($fields['billing']['billing_company']);
          unset($fields['billing']['billing_address_1']);
  
          return $fields;
      }
  
  }
  </code></pre>
  
  <p>If someone can help me only show the billing info on the second checkout page and not the first, it would be very much appreciated </p>
  
  <p>THANKS</p>