Sanitize, but decode. UTF-8 Friendly. Fixes #5401
Originally changed 34db5d68b6
This commit is contained in:
parent
c9378cf092
commit
13caa07cc2
|
@ -252,7 +252,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
|
|||
|
||||
$extra_rate = $rate;
|
||||
|
||||
$extra_rate['id'] = $this->id . ':' . $this_option[0];
|
||||
$extra_rate['id'] = $this->id . ':' . urldecode( sanitize_title( $this_option[0] ) );
|
||||
$extra_rate['label'] = $this_option[0];
|
||||
$this_cost = $this_option[1];
|
||||
$this_cost_percents = '';
|
||||
|
@ -673,7 +673,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
|
|||
}
|
||||
|
||||
// Add to flat rates array
|
||||
$flat_rates[ $flat_rate_class[ $i ] ] = array(
|
||||
$flat_rates[ urldecode( sanitize_title( $flat_rate_class[ $i ] ) ) ] = array(
|
||||
'cost' => $flat_rate_cost[ $i ],
|
||||
'fee' => $flat_rate_fee[ $i ],
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue