Back to PhocacartTax class

Method getTaxKey

public static string
getTaxKey
(mixed $id, mixed $countryId = 0, mixed $regionId = 0)
In case that the tax is overriden by country or region we need to identify it, this is why we don't use tax id as key but whole key: tax id:country tax id:region tax id
Parameters
  • \unknown $id
  • \number $countryId
  • \number $regionId
Returns
  • string

Method getTaxKey - Source code

/**
 * In case that the tax is overriden by country or region we need to identify it, this is why we don't use tax id as key but whole key: tax id:country tax id:region tax id
 * @param unknown $id
 * @param number $countryId
 * @param number $regionId
 * @return string
 */
public static function getTaxKey($id, $countryId = 0, $regionId = 0)
{
    $key = (int) $id . ':';
    $key .= (int) $countryId . ':';
    $key .= (int) $regionId;
    return $key;
}