| @@ -29,9 +29,14 @@ | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public static function getMLCustomer() |
| 32 | 32 | { |
| 33 | - return WC()->session->get('woo_mailerlite_customer_data'); | |
| 33 | + $customer = WC()->session->get('woo_mailerlite_customer_data'); | |
| 34 | + if (empty($customer) || !isset($customer['customer'])) { | |
| 35 | + return ['customer' => ['email' => null]]; | |
| 36 | + } | |
| 37 | + | |
| 38 | + return $customer; | |
| 34 | 39 | } |
| 35 | 40 | |
| 36 | 41 | public static function getMLCartHash() |
| 37 | 42 | { |