woocommerce_get_return_url
The WooCommerce woocommerce get return url hook.
Description
Parameters (2)
- 0. $return_url (unknown)
- The return url.
- 1. $order (unknown)
- The order.
Usage
- To run the hook, copy the example below.
- $return_url = apply_filters( 'woocommerce_get_return_url', $return_url, $order );
- if ( !empty( $return_url ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the woocommerce_get_return_url callback
- function filter_woocommerce_get_return_url( $return_url, $order ) {
- // make filter magic happen here...
- return $return_url;
- };
- // add the filter
- add_filter( 'woocommerce_get_return_url', 'filter_woocommerce_get_return_url', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'woocommerce_get_return_url', 'filter_woocommerce_get_return_url', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /includes/abstracts/abstract-wc-payment-gateway.php
- return apply_filters( 'woocommerce_get_return_url', $return_url, $order );