Shortly after releasing 2.2.6, we became aware of a issue that may prevent user upgrade payments for legacy (XenForo 1.x-based) subscriptions from being processed. This only affects user upgrade subscriptions that were setup when the site was running XenForo 1.x and are still active. XenForo 2.2.6 Patch 1 resolves this issue.
For more details on the issue, see this bug report:
2.2.6 regression: legacy user upgrade payment failure
If a PayPal payment is received for a user upgrade subscription that was created in XenForo 1.x, it may fail to process and the following error will be logged in the control panel:
ErrorException: [E_WARNING] Attempt to read property "extra_data" on null src/XF/Purchasable/UserUpgrade.php:50
This error may be logged a number of times for a single payment due to PayPal retrying the IPN callback a number of times.
This issue has been resolved with 2.2.6 Patch 1, but it can be manually resolved by making the following change. In src/XF/Payment/PayPal.php, find:
Code:
$state->purchasableHandler = $purchasable->handler;
Immediately after it, add:
If the error has been received, in most cases, you can update or manually patch the issue and simply wait for PayPal to attempt the callback again. This should allow the payment to go through and be processed successfully.