public function getFormat($country, $only_enabled = false)
    {
        $data = is_string($country) ? $this->get($country) : (array) $country;

        if (empty($data['format'])) {
            $format = $this->getDefaultFormat();
            gplcart_array_sort($format);
        } else {
            $format = $data['format'];
        }

        if ($only_enabled) {
            return array_filter($format, function ($item) {
                return !empty($item['status']);
            });
        }

        return $format;
    }
public function getFormat($country, $only_enabled = false)
    {
        $data = is_string($country) ? $this->get($country) : (array) $country;

        if (empty($data['format'])) {
            $format = $this->getDefaultFormat();
            gplcart_array_sort($format);
        } else {
            $format = $data['format'];
        }

        if ($only_enabled) {
            return array_filter($format, function ($item) {
                return !empty($item['status']);
            });
        }

        return $format;
    }
public function getFormat ( $ country , $ only_enabled = false ) { $ data = is_string ( $ country ) ? $ this -> get ( $ country ) : ( array ) $ country ; if ( empty ( $ data [ 'format' ] ) ) { $ format = $ this -> getDefaultFormat ( ) ; gplcart_array_sort ( $ format ) ; } else { $ format = $ data [ 'format' ] ; } if ( $ only_enabled ) { return array_filter ( $ format , function ( $ item ) { return ! empty ( $ item [ 'status' ] ) ; } ) ; } return $ format ; }
Returns an array of country format
@param string|array $country
@param bool $only_enabled
@return array
Returns an array of country format