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:

functions.php
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.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/abstracts/abstract-wc-payment-gateway.php:286
  2. Montonio for WooCommerce icon 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
  3. Payment Gateway for PayPal on WooCommerce icon 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
  4. WCPOS icon WCPOS5,000+ installs apply_filters( 'woocommerce_get_return_url', $received_url, $order ) includes/Orders.php:612
  5. RY Tools for WooCommerce icon RY Tools for WooCommerce4,000+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) woocommerce/abstracts/abstract-api.php:37
  6. Pay. Payment Methods for WooCommerce icon Pay. Payment Methods for WooCommerce3,000+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/classes/PPMFWC/Gateways.php:997
  7. Buckaroo Payments for WooCommerce icon Buckaroo Payments for WooCommerce2,000+ installs apply_filters( 'woocommerce_get_return_url', $return_url ) src/Gateways/AbstractPaymentGateway.php:780
  8. seQura icon seQura1,000+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) src/Services/Payment/class-sequra-payment-gateway.php:411
  9. Digital Signature Add-on for WooCommerce icon Digital Signature Add-on for WooCommerce900+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) admin/woocommerce-esig-admin.php:540
  10. Pay with LINE Pay icon Pay with LINE Pay800+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/gateways/class-linepay-tw-request.php:842
  11. Express Checkout via PayPal for WooCommerce icon 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
  12. PeachPay icon PeachPay300+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) core/payments/convesiopay/gateways/class-peachpay-convesiopay-card-gateway.php:1525
  13. Pagadito Payment Gateway for WooCommerce icon Pagadito Payment Gateway for WooCommerce200+ installs apply_filters( 'woocommerce_get_return_url', $return_url ) includes/class-wc-pagadito-payment-gateway.php:915
  14. Scanpay for WooCommerce icon Scanpay for WooCommerce200+ installs apply_filters( 'woocommerce_get_return_url', $wco->get_checkout_order_received_url(), $wco ) includes/payment-link.php:77
  15. sqrip.ch icon sqrip.ch100+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) inc/functions.php:1221
  16. Primer MyData for Woocommerce icon Primer MyData for Woocommerce100+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) payments/includes/class-primer-payments-gateway-helpers.php:27
  17. PayChangu Payment Gateway for WooCommerce icon PayChangu Payment Gateway for WooCommerce100+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/class-wc-paychangu-gateway.php:1048
  18. Yandex pay icon Yandex pay100+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/payment-methods/class-wc-ypay-method-base-abstract.php:62
  19. xMoney Crypto for WooCommerce icon xMoney Crypto for WooCommerce100+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/class-wc-gateway-utrust.php:174
  20. Complete PayPal Payments For WooCommerce icon 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
  21. ICEPAY for WooCommerce icon ICEPAY for WooCommerce60+ installs apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order ) src/Checkout/PaymentReturnController.php:61
  22. Pay Advantage icon Pay Advantage30+ installs apply_filters( 'woocommerce_get_return_url', $order->get_checkout_order_received_url(), $order ) public/ajax-payadvantage-woocommerce.php:73
  23. Transferencia Online icon Transferencia Online20+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) inespay.php:725
  24. Deprecated EMS Pay for WooCommerce plugin icon Deprecated EMS Pay for WooCommerce plugin20+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/class-emspay-gateway-response.php:193
  25. Jifiti Buy Now Pay Later icon Jifiti Buy Now Pay Later20+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) WC_Jifiti_Payment_Gateway.php:677
  26. NOTYD icon NOTYD10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/Controllers/class-biller-payment-redirection-controller.php:125
  27. StoreKeeper for WooCommerce icon StoreKeeper for WooCommerce10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) src/StoreKeeper/WooCommerce/B2C/PaymentGateway/PaymentGateway.php:522
  28. Appture Pay icon Appture Pay10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) class-wc-gateway-appture-pay.php:998
  29. GivePayments for WooCommerce icon 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
  30. GNUPAY icon GNUPAY10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) classes/lguplus_returnurl.class.php:22
  31. BS Authorize.net icon BS Authorize.net10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/class-bs-anet-wc-paypal-helper.php:133
  32. GNUPAY icon GNUPAY10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) classes/inicis_returnurl.class.php:21
  33. Gateway Payougo Checkout icon Gateway Payougo Checkout10+ installs apply_filters( 'woocommerce_get_return_url', $return_url, $order ) includes/class-wc-gateway-pyg-client.php:613
  34. Goopter advanced integration for PayPal Complete Payments and for WooCommerce icon 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
  35. Sovereign Settle icon 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
  36. Very Good Collection Payment Gateway for WooCommerce icon 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
  37. WooPaddle Light icon WooPaddle LightFewer than 10 installs apply_filters( 'woocommerce_get_return_url', $return_url ) includes/class-api.php:166
  38. EasyPayment Payment Gateway for Stripe for WooCommerce icon 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.