If you have deleted a payment gateway from the Dashboard > MemberPress > Settings > Payments tab that is currently associated with active, automatically recurring subscriptions, then those subscriptions will not update correctly in MemberPress after the payment occurs on the gateway. This is because the connection between the gateway and MemberPress was deleted when you deleted the payment gateway option.
If you have many automatically recurring subscriptions that were connected to the now deleted gateway, here is what you need to do to fix them:
- Recreate the gateway following the setup instructions for it. You can find links to setup instructions for any supported payment gateway here. (If you have already recreated the payment gateway, you may skip this step.)
- Follow the import instructions here to import the subscriptions. In this step, be sure to import them connected with the gateway you recreated in step #1 (or previously).
- (Optional, but recommended) Go through the Dashboard > MemberPress > Subscriptions page and delete all the subscriptions that were connected with the now deleted gateway. You can identify them because under the Gateway column on the MemberPress > Subscriptions page; you will see a unique ID number that was associated with your old gateway. For example, you may see something like “pea5pn-8cz” instead of “Stripe.” MemberPress forces you to delete these one by one; no mass delete option exists. This will help clean up your site and prevent any confusion in the future for you and other admins.
- If you are using Stripe, you will also want to run this SQL statement on your database to copy over customer id numbers.
- Replace [wp] (in both places) with your database's unique prefix.
- Replace [new gateway unique id] with the new gateway's unique identifier.
- Replace [old gateway unique id] with the old gateway's unique identifier.
- Replace [currency] (in both places) with the currency code you use in all caps. (Example USD).
INSERT INTO [wp]_usermeta(user_id, meta_key, meta_value) SELECT user_id, '_mepr_stripe_customer_id_[new gateway unique id]_[currency]' as meta_key, meta_value FROM [wp]_usermeta WHERE meta_key = '_mepr_stripe_customer_id_[old gateway unique id]_[currency]'
If you only had a few automatically recurring subscriptions that were connected to the now-deleted gateway, you may find these steps easier to follow:
- Recreate the gateway following the setup instructions for it. These can be found here. (If you have already recreated the payment gateway, you may skip this step.)
- Navigate to the MemberPress > Subscriptions page.
- Find the subscription associated with the old, now deleted gateway.
- Click edit on the Subscription after hovering over its unique ID.
- Find the Gateway: option, and using the drop-down, select your newly created gateway from step #1 (or that you created previously).
- Click the Update button at the bottom to save.
- Repeat for every automatically recurring subscription connected to the deleted gateway.
- If you are using Stripe, you will want to make the SQL statement in step 4 in the abovementioned process.