Creating Custom Upgrade Flows - YourMembers/yourmembers GitHub Wiki
[ym_upgrade id=xx]
Upgrade flows use the custom registration flow feature, but unlike initial registration you don't need to add email, user login or indeed any user data.
To recreate the standard upgrade button
go to Membership -> Registration Flows
Create a new flow page

Next create a Flow, select the page you created drag it over Give it a name and Save, jot down the flow id.
Now to make use of this flow use the following shortcode
[ym_register id=xx flow=xx]
Where id is your package and the flow is the flow ID.
The above recreates the simple upgrade button, and as you can see it's a lot more work to get the same result, but we can use the above code as a basis for more complicated upgrade flows.
The advantage of using flows for upgrades is you can collect additional information. For example you can collect additional custom field data that you did not collect during registration. It's important to remember that custom registration flows will overwrite any existing data so you must make sure a user entering a custom registration flow does not have email, login or password fields exposed to them, or they will be overwritten.To collect additional data you will need to create a separate flow page to the payment button. You cannot have any data collection on a payment page. You may also want to change the payment action from payment button to payment action. So once the form is completed they are taken straight to payment processing.