Skip to content

Instantly share code, notes, and snippets.

@JarrydLong
Created August 22, 2023 06:01
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 JarrydLong/c9ff1b888b5451fcdd5aee9c89ee75ec to your computer and use it in GitHub Desktop.
Save JarrydLong/c9ff1b888b5451fcdd5aee9c89ee75ec to your computer and use it in GitHub Desktop.
<?php //do not copy
/**
* This recipe will add the Sofort payment method in Stripe Connect.
* Note that this will only work with EUR payments
*
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Works for PayPal Express and Stripe payment gateways.
* www.paidmembershipspro.com
*/
function mypmpro_set_sofort( $checkout_session_params, $morder, $customer ) {
$checkout_session_params['payment_method_types'] = ['card', 'sofort'];
return $checkout_session_params;
}
add_filter( 'pmpro_stripe_checkout_session_parameters', 'mypmpro_set_sofort', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment