title: Remove checkbox php
body: <p>I'm really new to PHP, and i'm currently making a small webshop (Locally) to try out my skills.</p>
  
  <p>I've got some code, where there is a checkbox if you are a danish citizen, but i want the checkbox to be removed and then just run the code which normally only would have been running if it was checked no matter what.</p>
  
  <p>Can you guys give me a hint or direction i should go?</p>
  
  <pre><code>function my_pmpro_tax($tax, $values, $order) {      
  
      $tax = round((float)$values[price]*0.8 * 0.25, 2);      
      return $tax;  
  
  }
  
  function my_pmpro_level_cost_text($cost, $level)
  {
      //only applicable for levels &gt; 1
      $cost .= "Inkl. moms";
  
      return $cost;
  }
  
  add_filter("pmpro_level_cost_text", "my_pmpro_level_cost_text", 10, 2);
  //add Danish checkbox to the checkout page
  function my_pmpro_checkout_boxes()
  {
  ?&gt;
  
  &lt;table id="pmpro_pricing_fields" class="pmpro_checkout" width="100%" cellpadding="0" cellspacing="0" border="0"&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;
              Do you live in Denmark?
          &lt;/th&gt;                       
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;                
      &lt;tr&gt;    
          &lt;td&gt;
              &lt;div&gt;               
                  &lt;input id="danish" name="danish" type="checkbox" value="1" &lt;?php if(!empty($_REQUEST['danish']) || !empty($_SESSION['danish'])) {?&gt;checked="checked"&lt;?php } ?&gt; /&gt; Check this box if your billing address is in Denmark.
              &lt;/div&gt;              
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;?php
  }
  
  add_action("pmpro_checkout_boxes", "my_pmpro_checkout_boxes");
  //update tax calculation if buyer is danish
  function my_danish_tax_check()
  {
      //check request and session
      if(isset($_REQUEST['danish']))
      {
          //update the session var
          $_SESSION['danish'] = $_REQUEST['danish'];  
  
          //not empty? setup the tax function
          if(!empty($_REQUEST['danish']))
              add_filter("pmpro_tax", "my_pmpro_tax", 10, 3);
      }
      elseif(!empty($_SESSION['danish']))
      {
          //add the filter
          add_filter("pmpro_tax", "my_pmpro_tax", 10, 3);
      }
  }
  
  add_action("init", "my_danish_tax_check");
  //remove the danish session var on checkout
  function my_pmpro_after_checkout()
  {
      if(isset($_SESSION['danish']))
          unset($_SESSION['danish']);
  }
  
  add_action("pmpro_after_checkout", "my_pmpro_after_checkout");
  </code></pre>