SwedbankPay / swedbank-pay-woocommerce-checkout

Swedbank Pay Checkout for WooCommerce (Beta)
https://wordpress.org/plugins/swedbank-pay-checkout/
Apache License 2.0
5 stars 1 forks source link

Critical error when a product have been deleted #152

Closed craftycrafter90 closed 1 year ago

craftycrafter90 commented 1 year ago

If a customer have purchased a product which then have been removed from the shop the order can't be opened properly. The Swedbank window shows "Critical error message".

If Swedbank is deactivated the order with info and products shows as usual. error

craftycrafter90 commented 1 year ago

When trying to open the order in WC, this email is triggered as well.

Ett fel av typen E_ERROR uppstod på rad 271 i följande fil: /wp-content/plugins/swedbank-pay-checkout-new/vendor/swedbank-pay/swedbank-pay-woocommerce-core/src/SwedbankPay/Core/Adapter/WC_Adapter.php. Felorsak: Uncaught Error: Call to a member function get_image_id() on bool in /wp-content/plugins/swedbank-pay-checkout-new/vendor/swedbank-pay/swedbank-pay-woocommerce-core/src/SwedbankPay/Core/Adapter/WC_Adapter.php:271 Stack trace:

0 /wp-content/plugins/swedbank-pay-checkout-new/vendor/swedbank-pay/swedbank-pay-woocommerce-core/src/SwedbankPay/Core/Core.php(146): SwedbankPay\Core\Adapter\WC_Adapter->getOrderData(185315)

1 /wp-content/plugins/swedbank-pay-checkout-new/vendor/swedbank-pay/swedbank-pay-woocommerce-core/src/SwedbankPay/Core/Library/OrderAction.php(39): SwedbankPay\Core\Core->getOrder(185315)

2 /wp-content/plugins/swedbank-pay-checkout-new/templates/admin/payment-actions.php(36): SwedbankPay\Core\Core->canCapture(185315)

3 /wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/folder/...')

4 /wp-content/plugins/swed

olegisk commented 1 year ago

The fix is there https://github.com/SwedbankPay/swedbank-pay-woocommerce-core/pull/93