title: How to trigger woocommerce callback function?
body: <p>I am trying to test that my callback function works by visiting the callback URL in my browser <a href="http://localhost:90/wordpress-payment-demo/wc-api/callback_handler/" rel="nofollow noreferrer">http://localhost:90/wordpress-payment-demo/wc-api/callback_handler/</a> but I keep getting -1. Here is my callback function.</p>
  
  <pre><code>$this-&gt;id = 'paymentplugin';
  
  add_action( 'woocommerce_api_wc_' . $this-&gt;id , array( $this, 'callback_handler' ) );
  
  function callback_handler() { 
      header( 'HTTP/1.1 200 OK' );
      echo "callback";
      die();
  }
  </code></pre>
  
  <p>I also tried posting to the URL with Postman and I get a status code of 400 bad request. </p>