Recently one of our MemberFix customers decided to close off access to the members area of their MemberPress based membership site.
Since members of this particular site receive their product via email, there is no need for a members area and therefore no real reason to grant members access.
But members still need to be able to update their payment details to keep their credit card on file current and their subscription active.
So we came up with a way to let members update their card information without logging to their Memberpress accounts.
And now you’ll learn how to do this for your site as well!
What You’ll Need For This Tutorial
1 – Stripe account.
2 – Stripe API installed on your hosting.
3 – MemberPress WordPress membership plugin
//SQL query to get custommer ID
$result = $wpdb->get_results(
2 – Create a new page on your membership site and in the Page Attributes section of the document widget, find and select the template you created.
Publish the page.
This new page shows visitors a form where you enter a member’s email address.
When you submit the form it will generate a unique link specifically for that member to securely update his payment details.
Create a page template for the Stripe API form that will change member’s payment data
Now we need create a /payment-details-update/ page.
But before that we need install Stripe API to your hosting.
IMPORTANT: I highly recommend that you first create a child theme, or use the My Custom Functions WordPress plugin whenever you add custom code to your theme files. Otherwise, any time you update your theme your changes will get wiped out!
3 – Download Stripe API files from this link.
4 – Put the files to your theme folder into /your-child-theme/stripe/ folder.
5 – Then create another template (for example payment_update.php. ).
Put the code below into that file:
Now we need to link that template to your new page as we did before with payment_update_link.php in step 2.
After that, you will get a page where the member can change his payment data without logging into WordPress / MemberPress at all.
7. Be sure you are using the https protocol when you are working with any payment data.
To do it you need to install SSL certificate.
You can find more information about SSL certificates and how to use it on this article.
If you want our team to do this integration for you, just visit our MemberFix services page and leave us a message!
Now let’s hear from you!
Have you ever had a situation when you needed make changes in Stripe on your website?
Tell us about it in the comments section below!
What do you think of this tutorial?
Book Title: Allow logout Memberpress user to change Stripe payment data by email
Book Description: Create a special page on your MemberPress site where the member will be able to change his Stripe payment information without logging in to the website.
Book Author: Victor Barannik
Publisher - Orgnization: MemberFix