From ccb4d048759f4af0e94f3b88eec2efa53a1c5b33 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 27 Nov 2019 12:51:50 +0300 Subject: [PATCH] skip new payments without type --- src/include/order/class-wc-retailcrm-order-payment.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/order/class-wc-retailcrm-order-payment.php b/src/include/order/class-wc-retailcrm-order-payment.php index c56e419..f16bf9b 100644 --- a/src/include/order/class-wc-retailcrm-order-payment.php +++ b/src/include/order/class-wc-retailcrm-order-payment.php @@ -76,6 +76,8 @@ class WC_Retailcrm_Order_Payment extends WC_Retailcrm_Abstracts_Data if ($this->is_new) { if (isset($this->settings[$order->get_payment_method()])) { $data['type'] = $this->settings[$order->get_payment_method()]; + } else { + $data = array(); } }