public function checkFulfillmentSettings($orderId) { $order = new Cart66Order($orderId); $data = array(); foreach ($order->getItems() as $item) { $data[] = $item->product_id; } $orderFulfillment = new Cart66OrderFulfillment(); $orderF = $orderFulfillment->getModels(); $notify = new Cart66AdvancedNotifications($orderId); foreach ($orderF as $of) { $products = array_filter(explode(',', $of->products)); if (array_intersect($data, $products) || empty($products)) { Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] THEY INTERSECT!"); $notify->sendOrderFulfillmentEmails($of->id); } } }