Webhooks of type "invoice.payment_failed" failing after upgrade to CiviCRM 5.21.2
Hi all, we ran into the issue in the title while trying to debug a separate issue where after multiple failed payments, a contribution gets a payment date of the first payment attempt upon a successful payment.
Our dev environment with the Stripe extension 6.2 was upgraded to CiviCRM 5.21.2 from 5.7.x ESR, and that's when the webhook failures began. We see the webhooks failing in the Stripe dashboard, and in the CiviCRM log, we see entries such as:
Feb 26 00:03:26 [debug] Stripe Exception: Event: invoice.payment_failed Error: Cannot find recurring contribution for subscription ID: sub_Ex8RD6j5wj3C4f. Expected one ContributionRecur but found 0
We believe it's due to this change in CiviCRM 5.20. Would appreciate any suggestions!