title: Woocommerce action hook to redirect to custom thank you page
body: <p>I want to redirect to a custom page after my customers make a payment. Now it goes to a very vanilla, "Your order has been received" page. I have been trying to figure this out for a bit and I'm pretty sure I have to add an action hook to my themes function file. And I found some code that I thought would work but it doesn't.</p>
  
  <pre><code>add_action( 'woocommerce_thankyou', function(){
  
  
  
  global $woocommerce;
  $order = new WC_Order();
  if ( $order-&gt;status != 'failed' ) {
  wp_redirect( home_url() ); exit; // or whatever url you want
  }
  });
  </code></pre>