Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Last active October 18, 2021 13:44
Show Gist options
  • Save reachkamrul/6cbc5a85a9e25d2c1b689d40a1e8b7de to your computer and use it in GitHub Desktop.
Save reachkamrul/6cbc5a85a9e25d2c1b689d40a1e8b7de to your computer and use it in GitHub Desktop.
changeStripeDescriptor.php
// The code will be applied to form id 286 only
add_filter('wppayform/stripe_checkout_session_args', function ($checkoutArgs, $submission) {
if ($submission->form_id === '286') {
$descriptor = 'My stripe descriptor';
$checkoutArgs['payment_intent_data']['statement_descriptor'] = $descriptor;
};
return $checkoutArgs;
}, 1, 2);
// The code will be applied to all forms
add_filter('wppayform/stripe_checkout_session_args', function ($checkoutArgs, $submission) {
$descriptor = 'My stripe descriptor';
$checkoutArgs['payment_intent_data']['statement_descriptor'] = $descriptor;
return $checkoutArgs;
}, 1, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment