Created
August 20, 2021 09:03
-
-
Save stuartduff/ddad6c86936437d4c0ebf5bf88880770 to your computer and use it in GitHub Desktop.
Set a custom return URL for canceled orders on WooCommerce
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
/* Paypal cancel order redirect */ | |
add_filter( 'woocommerce_get_cancel_order_url_raw', 'paypal_canceled_redirect' ); | |
function paypal_canceled_redirect(){ | |
// Replace the URL below with the one you'd like to return to after a canceled order. | |
return "https://woocommerce.com"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment