Skip to content

Commit 2f54b6b

Browse files
wjrosamalithsen
authored andcommitted
Fix fatal error for the Multibanco email instructions method (#4349)
* Fix fatal error for the Multibanco email instructions method * Changelog and readme entries
1 parent 65a0790 commit 2f54b6b

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Tweak - Track charge completed via webhooks in order notes
77
* Fix - Ensure that we migrate payment_request_button_size=medium on upgrade
88
* Fix - Show correct price in express checkout for zero decimal currencies
9+
* Fix - Fixes a possible fatal error with Multibanco purchases when generating the email instructions.
910

1011
= 9.5.2 - 2025-05-22 =
1112
* Add - Implement custom database cache for persistent caching with in-memory optimization.

includes/payment-methods/class-wc-gateway-stripe-multibanco.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ public function thankyou_page( $order_id ) {
225225
* @param bool $plain_text
226226
*/
227227
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
228+
if ( ! is_a( $order, 'WC_Order' ) ) {
229+
return;
230+
}
231+
228232
$order_id = $order->get_id();
229233

230234
$payment_method = $order->get_payment_method();

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
117117
* Tweak - Track charge completed via webhooks in order notes
118118
* Fix - Ensure that we migrate payment_request_button_size=medium on upgrade
119119
* Fix - Show correct price in express checkout for zero decimal currencies
120+
* Fix - Fixes a possible fatal error with Multibanco purchases when generating the email instructions.
120121

121122
[See changelog for full details across versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

0 commit comments

Comments
 (0)