Last active
August 22, 2017 20:51
-
-
Save vanbo/c91e6a5c063af2f6200b to your computer and use it in GitHub Desktop.
Exclude IP address from Paysafe Hosted API request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Normal order | |
add_filter( 'wc_paysafe_request_params', 'prefix_remove_ip_address', 10, 2 ); | |
// Subscriptions/Pre-Orders order | |
add_filter( 'wc_paysafe_addons_request_params', 'prefix_remove_ip_address', 10, 2 ); | |
function prefix_remove_ip_address( $params, $order ) { | |
if ( isset( $params['customerIp'] ) ) { | |
unset( $params['customerIp'] ); | |
} | |
return $params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment