Skip to content

Instantly share code, notes, and snippets.

@allycspf
Created September 16, 2020 11:16
Show Gist options
  • Save allycspf/7b5f562a2f706e44a63177c6803f14a3 to your computer and use it in GitHub Desktop.
Save allycspf/7b5f562a2f706e44a63177c6803f14a3 to your computer and use it in GitHub Desktop.
MemberPress Override Stripe Statement Descriptor
add_filter('mepr_stripe_statement_descriptor', function($descriptor, $product) {
return 'Custom Descriptor';
}, 10, 2);
@msmithng
Copy link

msmithng commented Jul 4, 2021

Where exactly would this go in order to work?

@allycspf
Copy link
Author

allycspf commented Jul 6, 2021

@msmithng You can use a plugin like Code Snippets or add it to the WordPress theme functions.php file.

@msmithng
Copy link

msmithng commented Jul 9, 2021

Hi @allycspf. I'm sorry but I'm a little green on mepr.

I cam here off a link on the Memberpress documentation. Would this expose an alternate section in which I can add a description? Do you have any examples of it in action? Thanks in advance, Michael

@allycspf
Copy link
Author

@msmithng The code itself sets the statement descriptor, it doesn't add a section for it. To set it up you can install the plugin Code Snippets plugin then add a new snippet then copy and paste the 3 lines of code above into the Code field of the snippet, then change the text Custom Descriptor to the statement descriptor you want, for example My Company. Set the snippet to "Run everywhere" and save it.

If you are having any issues with this, feel free to open a ticket https://memberpress.com/support/

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