Created
February 17, 2021 09:10
-
-
Save vanbo/9de5c70f34288b10546a8c3de501b19d to your computer and use it in GitHub Desktop.
WC Pay360 Modify Request 'register'
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
/** | |
* 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