Don't sanitise rate ID - breaks utf8 chars

Fixes #5376
This commit is contained in:
Mike Jolley 2014-04-25 12:31:26 +01:00
parent 85ccd2a788
commit cb61f703e6
1 changed files with 5 additions and 4 deletions

View File

@ -252,9 +252,10 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
$extra_rate = $rate;
$extra_rate['id'] = $this->id . ':' . sanitize_title( $this_option[0] );
$extra_rate['label'] = $this_option[0];
$this_cost = $this_option[1];
$extra_rate['id'] = $this->id . ':' . $this_option[0];
$extra_rate['label'] = $this_option[0];
$this_cost = $this_option[1];
$this_cost_percents = '';
$pattern =
'/' . // start regex
@ -664,7 +665,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
}
// Add to flat rates array
$flat_rates[ sanitize_title($flat_rate_class[$i]) ] = array(
$flat_rates[ $flat_rate_class[ $i ] ] = array(
'cost' => $flat_rate_cost[ $i ],
'fee' => $flat_rate_fee[ $i ],
);