GF User Registration Update Profile : If user meta already contain content add my value to another meta

Hi,

Sorry for my English.

We use Gravity Forms User Register + Stripe to collect membership payments and create / update our members accounts.

We would like the payments of our members to be stored in their account in a meta.
Is there a way that when the user makes a new membership the amount of the donation is sent to a usermeta AND if this usermeta is already fulfilled (by a previous membership) then the amount is sent to ANOTHER usermeta ?

Example :
Jack has already make one membership payment, he has a usermeta named: Payment1 filled in with the value 20€, he wishes to make a new payment of 30€ to renew his membership, we would like that the value 30€ does not replace the previous 20€ in the “Payment1” meta but rather that it is recorded in a “Payment2” field which will have already been created (by us in advance). If he want to make a third Payment so it need to be stored in the meta “Payement3” etc…

PS: we don’t mind creating all the necessary usermeta in advance (Payement1, Payment2 … Payment30…).

Thanks by advance :slight_smile: !

You will need to create custom user meta in the update user feed of the form you use to collect payments.

Here is the article explaining user meta. User meta in update user feeds

Depending on where/how you are using the payment details - instead of creating multiple meta keys you could store the different payment amounts (and dates?) as array within one key. gform_user_registration_signup_meta - Gravity Forms Documentation shows a basic example of the filter. You would have to check/retrieve the existing via get_user_meta and then create/update the array structure with new values to overwrite.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.