title: Send an email notification when order status change from pending to cancelled
body: <p>In previous versions of Woocommerce, an email notification was sent automatically when an order was changed from pending status to cancelled status (In my case, this happens after an allotted time set in the inventory section of the admin).</p>
  
  <p>In WooCommerce 3.0.8 they have removed this automation and labelled as a fix:
  <a href="https://github.com/woocommerce/woocommerce/blob/master/CHANGELOG.txt" rel="nofollow noreferrer">https://github.com/woocommerce/woocommerce/blob/master/CHANGELOG.txt</a></p>
  
  <p>And the pull request is here:
  <a href="https://github.com/woocommerce/woocommerce/pull/15170/files" rel="nofollow noreferrer">https://github.com/woocommerce/woocommerce/pull/15170/files</a></p>
  
  <p>I'm looking to restore this functionality, but obviously copy/pasting this line back in to the Woocommerce core files isn't a good idea as it will get overwritten when the platform updates.</p>
  
  <p>I know the best method would to be to create a function and hook into the cancelled order action via functions.php but after having a look I'm a bit lost about how to do this. Here is the line which was replaced:</p>
  
  <pre><code>add_action( 'woocommerce_order_status_pending_to_cancelled_notification', array( $this, 'trigger' ), 10, 2 );
  </code></pre>
  
  <p>How can I restore this old automated functionality?</p>