Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error in Mollie_WC_Gateway_Abstract->onOrderReceivedText when woocommerce_thankyou_order_received_text is called without valid $order #211

Closed
NielsdeBlaauw opened this issue Jun 5, 2018 · 0 comments

Comments

@NielsdeBlaauw
Copy link
Contributor

In the WooCommerce plugin there is a possibility the filter woocommerce_thankyou_order_received_text is called with null instead of a valid WC_Order object.

See https://github.com/woocommerce/woocommerce/blob/3.4.1/templates/checkout/thankyou.php#L83

This leads to the Mollie_WC_Gateway_Abstract->onOrderReceivedText method triggering the following fatal error.

2018/06/05 09:09:04 [error] 188#188: *874934 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get_payment_method() on null in /plugins/mollie-payments-for-woocommerce/includes/mollie/wc/gateway/abstract.php:1352
davdebcom pushed a commit that referenced this issue Jun 5, 2018
…elsdeBlaauw

Fixes #211 

This check prevents the mollie-for-woocommerce plugin from triggering a fatal error when the filter on https://github.com/woocommerce/woocommerce/blob/3.4.1/templates/checkout/thankyou.php#L83 is called.
davdebcom pushed a commit that referenced this issue Jun 28, 2018
…elsdeBlaauw

Fixes #211 

This check prevents the mollie-for-woocommerce plugin from triggering a fatal error when the filter on https://github.com/woocommerce/woocommerce/blob/3.4.1/templates/checkout/thankyou.php#L83 is called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant