public function isAvailableForCategory($obCategoryItem) : bool
    {
        $arCategoryIDList = (array) $this->category_id_list;
        if (empty($arCategoryIDList) || empty($obCategoryItem)) {
            return false;
        }

        if (in_array($obCategoryItem->id, $arCategoryIDList)) {
            return true;
        }

        if ($obCategoryItem->parent->isNotEmpty()) {
            return $this->isAvailableForCategory($obCategoryItem->parent);
        }

        return false;
    }
public function isAvailableForCategory($obCategoryItem) : bool
    {
        $arCategoryIDList = (array) $this->category_id_list;
        if (empty($arCategoryIDList) || empty($obCategoryItem)) {
            return false;
        }

        if (in_array($obCategoryItem->id, $arCategoryIDList)) {
            return true;
        }

        if ($obCategoryItem->parent->isNotEmpty()) {
            return $this->isAvailableForCategory($obCategoryItem->parent);
        }

        return false;
    }
public function isAvailableForCategory ( $ obCategoryItem ) : bool { $ arCategoryIDList = ( array ) $ this -> category_id_list ; if ( empty ( $ arCategoryIDList ) || empty ( $ obCategoryItem ) ) { return false ; } if ( in_array ( $ obCategoryItem -> id , $ arCategoryIDList ) ) { return true ; } if ( $ obCategoryItem -> parent -> isNotEmpty ( ) ) { return $ this -> isAvailableForCategory ( $ obCategoryItem -> parent ) ; } return false ; }
Check tax is available for category
@param \Lovata\Shopaholic\Classes\Item\CategoryItem $obCategoryItem
@return bool
Check tax is available for category