Last active
August 29, 2015 14:27
-
-
Save eltondev/ddc4965e12892f23cf62 to your computer and use it in GitHub Desktop.
WooCommerce Checkout Redirect Thank You
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_thankyou', 'redirectcustom'); | |
function redirectcustom( $order_id ){ | |
$order = new WC_Order( $order_id ) | |
$url = 'http://marcelototoso.com/custom-url'; | |
if ( $order->status != 'failed' ) { | |
wp_redirect($url); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment