Created
February 25, 2019 17:43
-
-
Save vanbo/d30261be5dc6888a01458cc33edbdeac to your computer and use it in GitHub Desktop.
WC Paysafe Custom redirect url
This file contains 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
add_filter( 'wc_paysafe_payment_customer_redirect_url', 'prefix_custom_redirect_url', 10, 3 ); | |
function prefix_custom_redirect_url( $url, $status, $order_id ) { | |
/** | |
* $status possible values are: | |
* 'success', | |
* 'error', | |
* 'hold', | |
* 'timeout', | |
* 'decline', | |
*/ | |
if ( 'decline' == $status ) { | |
$url = 'https://your-domain-url.com'; | |
} | |
return $url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment