You appear to be a bot. Output may be restricted
Description
Retrieves all rates available for the selected country groupNow supports separators of '/' forward slash and ',' comma as well as vertical bar Also trims off blanks.
Usage
$array = OIK_Shipping_Pro::get_rates_by_countrygroup( $country_group );
Parameters
- $country_group
- ( integer ) optional –
Returns
array $countrygroup_rate – the subset of options for the given country group returned in array formSource
File name: oik-weightcountry-shipping-pro/class-oik-shipping-pro.phpLines:
1 to 22 of 22
function get_rates_by_countrygroup( $country_group = null ) { $countrygroup_rate = array(); if ( sizeof( $this->options ) > 0) { foreach ( $this->options as $option => $value ) { $value = trim( $value ); $value = str_replace( array( "/", "," ), "|", $value ); $rate = explode( "|", $value ); foreach ( $rate as $key => $val ) { $rate[$key] = trim( $val ); } if ( isset( $rate[2] ) && $rate[2] == $country_group ) { if ( !isset( $rate[3] ) ) { $rate[3] = null; } $countrygroup_rate[] = $rate; $this->set_countrygroup_title( $rate ); } } } return( $countrygroup_rate ); }View on GitHub