Open kadinzimmerman opened 2 months ago
I can add that we have noticed same issue. Though our debug logs also show Fatal errors happening during that time, so there is something not ok.
[16-Sep-2024 13:03:18 UTC] PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, bool given in /home/user/domains/domain.com/public_html/wp-content/plugins/paid-memberships-pro/includes/checkout.php:156
Stack trace:
#0 /home/user/domains/domain.com/public_html/wp-content/plugins/paid-memberships-pro/includes/checkout.php(156): array_merge()
#1 /home/user/domains/domain.com/public_html/wp-content/plugins/paid-memberships-pro/services/stripe-webhook.php(677): pmpro_pull_checkout_data_from_order()
#2 /home/user/domains/domain.com/public_html/wp-content/plugins/paid-memberships-pro/services/stripe-webhook.php(518): pmpro_stripe_webhook_change_membership_level()
#3 /home/user/domains/domain.com/public_html/wp-content/plugins/paid-memberships-pro/includes/services.php(40): require_once('...')
#4 /home/user/domains/domain.com/public_html/wp-includes/class-wp-hook.php(324): pmpro_wp_ajax_stripe_webhook()
#5 /home/user/domains/domain.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#6 /home/user/domains/domain.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /home/user/domains/domain.com/public_html/wp-admin/admin-ajax.php(207): do_action()
#8 {main}
thrown in /home/user/domains/domain.com/public_html/wp-content/plugins/paid-memberships-pro/includes/checkout.php on line 156
Plugin version 3.1.3, WP version 6.6.2, PHP 8.1
I think this might have been an issue with Stripe webhooks not being updated correctly. Did the update procedure in Memberships -> Settings, will see if error disappears.
Events checkout.session.async_payment_succeeded
and checkout.session.async_payment_failed
were both status as N/A.
No, the issue is not gone with the webhooks update.
Stripe shows that checkout.session.completed
got the response of 500 Internal error
from Wordpress. So this is related to the error message in WP debug logs.
Changing line 156
of file includes/checkout.php
to this seems to fix the issue:
$_REQUEST = array_merge( $_REQUEST, $checkout_request_vars ?: array() );
@kimcoleman any insight / prioritization here? Thanks!
I can't exactly pinpoint if this is what is causing it but I believe it is. When a member checks out, we noticed some memberships not getting created (the user is getting created but no membership attached), the payment through stripe is successfully happening but membership not attaching. The order status in PMPRO is "Token". From what I can find as the common factor, is that the payment was done using stripe Link.
Link autofills your customer's payment details for faster checkout.
Can you check into this to see if it's a bug with Link payments vs non-link and the status being stuck as "Token" and the membership not fully finalized? Again the user is created and the payment is successfully captured. No issues with the payment side of things.