Open andrewlkho opened 1 year ago
From my limited knowledge of Paid Memberships Pro, I suspect that this is due to how the PayPal Standard gateway workflow operates. It looks to me like:
pmpro_before_send_to_paypal_standard
action runs the pmpro_after_checkout_save_fields
function in includes/fields.php
if ( ! pmpro_check_field_for_level( $field, "profile", $user_id ) ) {
continue;
}
pmpro_check_field_for_level
with those arguments checks to see if the submitted field's specified levels are one that the $user_id
holds.In the case of the PayPal Standard workflow, as the pmpro_before_send_to_paypal_standard
hook's name suggests, this is run before going to PayPal to checkout. Therefore, in step (3) it returns false because the field's allowed level's are not one that the current user ID holds, as the user has not yet checked out to acquire that level. Thus the field is not saved.
I have temporarily fixed this in my instance by changing the line in step 2 to:
if ( ! pmpro_check_field_for_level( $field, "default", $user_id ) ) {
continue;
but I am unclear on other ramifications of this.
@andrewlkho Sorry to hear about this issue you are facing here. Are you still facing this issue? I am going to try and replicate this issue before updating this issue status.
If you are still facing issues, I recommend to use PayPal Express instead. The only additional information needed would be more merchant details but any PayPal account that supports Standard can use Express.
Thanks for your patience @andrewlkho, all this information helps. I was able to replicate this and it needs to be resolved. We do recommend PayPal Express over PayPal Standard - https://www.paidmembershipspro.com/read-using-paypal-standard-paid-memberships-pro/
However, we are going to look into a solution for this.
this isn't reproducing for me in v3.0.4. User fields are stored just fine with paypal standard gateway @andrewlimaza
Received a report of textarea fields not saving when using PayPal Standard: #568735 (User resolved the issue by switching to PayPal Express)
User reported user fields are not saving when using PayPal Standard: #573404
Describe the bug Custom user fields created either using the admin interface or in code are displayed correctly on the membership sign-up page. However, these do not get saved to the database in the wp_usermeta table. I suspect that this is to do with the PayPal Standard gateway which is being used on the site in question.
To Reproduce Steps to reproduce the behavior:
Expected behaviour The value of the submitted user field is saved in the wp_usermeta table.
Isolating the problem (mark completed items with an [x]):
WordPress Environment