title: What hook to use once order is created in Woocommerce 3
body: <p>I have created the following plugin, which is supposed to send a POST HTTP request to an external server when a Woocommerce order is created. However, this is not happening: no request received on the external server, nothing is showing up in <code>wp-content/debug.log</code> (I do have <code>define( 'WP_DEBUG_LOG', true );</code> in <code>wp-config.php</code>). What am I doing wrong?</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  /**
   * Plugin Name: MyPlugin
   */
  
  
  function my_hook($order_id) {
      $url = &quot;https://example.com/do_something&quot;;
      $data = wp_remote_post($url, array(
          'headers'     =&gt; array(
              'Authorization' =&gt; &quot;Token my_token&quot;,
              'Content-Type'  =&gt; 'application/json; charset=utf-8',
          ),
          'body'        =&gt; json_encode(array('order_id' =&gt; $order_id)),
          'method'      =&gt; 'POST',
          'data_format' =&gt; 'body',
      ));
  }
  add_action(
      'woocommerce_new_order',
      'my_hook'
  );
  
  ?&gt;
  </code></pre>