Skip to content

Instantly share code, notes, and snippets.

@vanbo
Created February 17, 2021 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanbo/9de5c70f34288b10546a8c3de501b19d to your computer and use it in GitHub Desktop.
Save vanbo/9de5c70f34288b10546a8c3de501b19d to your computer and use it in GitHub Desktop.
WC Pay360 Modify Request 'register'
/**
* NOTЕ: Add the code to your "themes\child-theme\functions.php" file
*/
add_filter( 'pay360_hosted_cashier_get_parameters', 'vanbodevelops_do_not_register_profile', 10, 3 );
function vanbodevelops_do_not_register_profile( $args, $order, $get_gateway ) {
// Send the 'registered' parameter as false,
// so Pay360 will not create a profile for the customer in their system.
if ( ! empty( $args['customer'] ) ) {
$args['customer']['registered'] = false;
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment