WordPress filter hook
woocommerce_get_return_url
Defined by WooCommerce and fired by 38 plugins in total, running on 7M+ sites between them.
“Filter the return url.”
How to use woocommerce_get_return_url
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_get_return_url', function( $return_url, $order ) {
// Change $return_url here.
return $return_url;
}, 10, 2 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
38 plugins that fire woocommerce_get_return_url
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/abstracts/abstract-wc-payment-gateway.php:286 -
Montonio for WooCommerce10,000+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )includes/payment/class-wc-montonio-callbacks.php:345 -
Payment Gateway for PayPal on WooCommerce10,000+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )ppcp/includes/class-ppcp-paypal-checkout-for-woocommerce-request.php:4664 -
WCPOS5,000+ installs
apply_filters( 'woocommerce_get_return_url', $received_url, $order )includes/Orders.php:612 -
RY Tools for WooCommerce4,000+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )woocommerce/abstracts/abstract-api.php:37 -
Pay. Payment Methods for WooCommerce3,000+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/classes/PPMFWC/Gateways.php:997 -
Buckaroo Payments for WooCommerce2,000+ installs
apply_filters( 'woocommerce_get_return_url', $return_url )src/Gateways/AbstractPaymentGateway.php:780 -
seQura1,000+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )src/Services/Payment/class-sequra-payment-gateway.php:411 -
Digital Signature Add-on for WooCommerce900+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )admin/woocommerce-esig-admin.php:540 -
Pay with LINE Pay800+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/gateways/class-linepay-tw-request.php:842 -
Express Checkout via PayPal for WooCommerce800+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )ppcp/public/class-ppcp-paypal-checkout-for-woocommerce-button-manager.php:1189 -
PeachPay300+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )core/payments/convesiopay/gateways/class-peachpay-convesiopay-card-gateway.php:1525 -
Pagadito Payment Gateway for WooCommerce200+ installs
apply_filters( 'woocommerce_get_return_url', $return_url )includes/class-wc-pagadito-payment-gateway.php:915 -
Scanpay for WooCommerce200+ installs
apply_filters( 'woocommerce_get_return_url', $wco->get_checkout_order_received_url(), $wco )includes/payment-link.php:77 -
sqrip.ch100+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )inc/functions.php:1221 -
Primer MyData for Woocommerce100+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )payments/includes/class-primer-payments-gateway-helpers.php:27 -
PayChangu Payment Gateway for WooCommerce100+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-wc-paychangu-gateway.php:1048 -
Yandex pay100+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/payment-methods/class-wc-ypay-method-base-abstract.php:62 -
xMoney Crypto for WooCommerce100+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-wc-gateway-utrust.php:174 -
Complete PayPal Payments For WooCommerce80+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )public/class-complete-paypal-payments-for-woocommerce-button-manager.php:1198 -
ICEPAY for WooCommerce60+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )src/Checkout/PaymentReturnController.php:61 -
Pay Advantage30+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )public/ajax-payadvantage-woocommerce.php:73 -
Transferencia Online20+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )inespay.php:725 -
Deprecated EMS Pay for WooCommerce plugin20+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-emspay-gateway-response.php:193 -
Jifiti Buy Now Pay Later20+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )WC_Jifiti_Payment_Gateway.php:677 -
NOTYD10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/Controllers/class-biller-payment-redirection-controller.php:125 -
StoreKeeper for WooCommerce10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )src/StoreKeeper/WooCommerce/B2C/PaymentGateway/PaymentGateway.php:522 -
Appture Pay10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )class-wc-gateway-appture-pay.php:998 -
GivePayments for WooCommerce10+ installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )includes/Payment/class-givepayments-payment-processor.php:823 -
GNUPAY10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )classes/lguplus_returnurl.class.php:22 -
BS Authorize.net10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-bs-anet-wc-paypal-helper.php:133 -
GNUPAY10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )classes/inicis_returnurl.class.php:21 -
Gateway Payougo Checkout10+ installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-wc-gateway-pyg-client.php:613 -
Goopter advanced integration for PayPal Complete Payments and for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )ppcp-gateway/class-goopter-paypal-ppcp-front-action.php:562 -
Sovereign SettleFewer than 10 installs
apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order )includes/ajax/class-ajax-handler.php:545 -
Very Good Collection Payment Gateway for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-waf-wc-vgc-gateway.php:440 -
WooPaddle LightFewer than 10 installs
apply_filters( 'woocommerce_get_return_url', $return_url )includes/class-api.php:166 -
EasyPayment Payment Gateway for Stripe for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_get_return_url', $return_url, $order )includes/class-wc-gateway-epspgw.php:753
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.