Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set a custom return URL for canceled orders on WooCommerce
/* 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