woocommerce_get_return_url

Hook Filter

Allow modifying the return URL after payment has been processed

Description

Allow modifying the return URL after payment has been processed

ParameterTypeDescription
$return_urlstringReturn URL
$orderWC_OrderWooCommerce order

Changelog

VersionDescription
2.0.0Introduced

Usage Example

add_filter('woocommerce_get_return_url', function($url, $order){
  return 'https://your.awesome.url.com'; // Set your custom value.
}, 10, 2);