Skip to content

Instantly share code, notes, and snippets.

@vanbo
Last active August 22, 2017 20:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanbo/c91e6a5c063af2f6200b to your computer and use it in GitHub Desktop.
Save vanbo/c91e6a5c063af2f6200b to your computer and use it in GitHub Desktop.
Exclude IP address from Paysafe Hosted API request
// 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