title: WP All Export: how to pass exported data through PHP function
body: <p>I'm trying to build custom export column in WP All Export but I can not get what I'm trying to achieve. I need column 'For Payment', where I need to place actual order total in case the payment method is COD. Otherwise it should return 0 (required by couriers). I tried to modify code below but it doesn't work.</p>
  <pre><code>&lt;?php
  function cod_payment( $order_id ) {
      $total = get_total();
      $method = get_payment_method();
      if($method == &quot;cod&quot;) {
          return $total;
      } else {
          return &quot;0&quot;;
      }
  }
  ?&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/64gp8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/64gp8.png" alt="Edit Export Field dialogue in WP All Export" /></a></p>