Last active
November 27, 2023 12:37
-
-
Save ideadude/16983fdfa0da12fc40ef36d870f4cbd0 to your computer and use it in GitHub Desktop.
Change the statement descriptor for Stripe charges and subscriptions.
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
<?php | |
/** | |
* Change the statement descriptor for Stripe charges and subscriptions. | |
* This is the message shown on the customer's credit card statement. | |
* Must contain at least one letter, 22 characters max. | |
* | |
* Requires PMPro 2.4.1+ | |
* | |
* Note: If your descriptor includes invalid characters or | |
* more than 22 chacters, checkout will fail. | |
* | |
* Copy this code into a custom plugin or code snippet. | |
*/ | |
function my_update_pmpro_stripe_statement_descriptor( $params, $order ) { | |
// can check the $order->membership_id if you want something level-specific | |
$params['statement_descriptor'] = 'Business - Product'; | |
return $params; | |
} | |
add_filter( 'pmpro_stripe_payment_intent_params', 'my_update_pmpro_stripe_statement_descriptor', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Set a Unique Statement Descriptor for Payments Through the Stripe Gateway" at Paid Memberships Pro here: https://www.paidmembershipspro.com/set-a-unique-statement-descriptor-for-payments-through-the-stripe/