PluginProbe
MailerLite – WooCommerce integration / trunk
MailerLite – WooCommerce integration vtrunk
3.1.27 3.1.25 3.1.26 3.1.24 3.1.23 3.1.22 3.1.21 3.1.20 3.1.19 3.1.18 3.1.17 3.1.16 3.1.15 1.8.7 1.8.8 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 All 148 releases
← All changes | includes/WooMailerLiteSession.php +6 -1 3.1.16 → trunk View file →
@@ -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 {