Open Mayisha opened 1 year ago
Hi, This issue has gone 150 days (5 months) without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest version, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.
This issue has gone 180 days (6 months) without any activity.
Describe the bug In zen-7233913 the store is reportedly having the following error
PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to WC_Stripe_Helper::is_reusable_payment_method() must be an instance of stdClass, instance of WP_Error given...
This fatal error is happening in this line because
is_reusable_payment_method
function is receiving an error object as the argument instead of thesource_object
. This traces back to theget_source_object
function called here which is returning this error object becauseget_payment_method
is returning the error here.To prevent this fatal error we need to catch and gracefully handle any error thrown from the
get_payment_method
function call in theget_source_object
function. Also in the other places where this function is called, if needed.To Reproduce Could not reproduce the issue locally.
Expected behavior Though it was not locally reproducible, we should gracefully handle the error case.