Skip to content

Instantly share code, notes, and snippets.

@allycspf
Created Sep 16, 2020
Embed
What would you like to do?
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

allycspf commented Jul 12, 2021

@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