Created
May 16, 2019 20:01
-
-
Save LMNTL/b567123b55f027a32a94e680e46e514b to your computer and use it in GitHub Desktop.
Use the short version of the 2Checkout signup form when checking out with PMPro.
This file contains hidden or 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
/* | |
Use the short version of the 2Checkout signup form when checking out. | |
After installing and activating this, you'll also need to enable "SHORT_FORM" in your 2Checkout settings. | |
See: https://knowledgecenter.2checkout.com/Documentation/05Ordering/10Minimize_required_checkout_data | |
*/ | |
function my_pmpro_twocheckout_short_billing( $request_array ) { | |
$short_form = array( | |
"SHORT_FORM" => "1" | |
); | |
return array_merge( $short_form, $request_array ); | |
} | |
add_filter('pmpro_twocheckout_return_url_parameters', 'my_pmpro_twocheckout_short_billing', 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment