woocommerce_geolocation_ip_lookup_api_response

The WooCommerce woocommerce geolocation ip lookup api response hook.

Description

apply_filters( 'woocommerce_geolocation_ip_lookup_api_response', (unknown) $wc_clean, (string) $service_name ); 

Parameters (2)

0. $wc_clean (unknown) => wc_clean( $response['body'] )
The wc clean.
1. $service_name (string)
The service name.

Usage

To run the hook, copy the example below.
  1. $wc_clean = apply_filters( 'woocommerce_geolocation_ip_lookup_api_response', $wc_clean, $service_name ); 
  2.  
  3. if ( !empty( $wc_clean ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_geolocation_ip_lookup_api_response callback 
  2. function filter_woocommerce_geolocation_ip_lookup_api_response( $wc_clean, $service_name ) { 
  3. // make filter magic happen here... 
  4. return $wc_clean
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_geolocation_ip_lookup_api_response', 'filter_woocommerce_geolocation_ip_lookup_api_response', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_geolocation_ip_lookup_api_response', 'filter_woocommerce_geolocation_ip_lookup_api_response', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/class-wc-geolocation.php  
  1. $external_ip_address = apply_filters( 'woocommerce_geolocation_ip_lookup_api_response', wc_clean( $response['body'] ), $service_name );