Skip to content

Instantly share code, notes, and snippets.

@ideadude
Last active November 27, 2023 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ideadude/16983fdfa0da12fc40ef36d870f4cbd0 to your computer and use it in GitHub Desktop.
Save ideadude/16983fdfa0da12fc40ef36d870f4cbd0 to your computer and use it in GitHub Desktop.
Change the statement descriptor for Stripe charges and subscriptions.
<?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 );
@laurenhagan0306
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment