Model/Apiconnector/ContactData.php
public function getFirstCategoryPur()
    {
        $firstOrderId = $this->model->getFirstOrderId();
        $order = $this->orderFactory->create();
        $this->orderResource->load($order, $firstOrderId);
        $categoryIds = $this->getCategoriesFromOrderItems($order->getAllItems());

        return $this->getCategoryNames($categoryIds);
    }
public function getFirstCategoryPur()
    {
        $firstOrderId = $this->model->getFirstOrderId();
        $order = $this->orderFactory->create();
        $this->orderResource->load($order, $firstOrderId);
        $categoryIds = $this->getCategoriesFromOrderItems($order->getAllItems());

        return $this->getCategoryNames($categoryIds);
    }
public function getFirstCategoryPur ( ) { $ firstOrderId = $ this -> model -> getFirstOrderId ( ) ; $ order = $ this -> orderFactory -> create ( ) ; $ this -> orderResource -> load ( $ order , $ firstOrderId ) ; $ categoryIds = $ this -> getCategoriesFromOrderItems ( $ order -> getAllItems ( ) ) ; return $ this -> getCategoryNames ( $ categoryIds ) ; }
Get first purchased category.

@return string
Get first purchased category .