Fix potential bug

Added `default` to prevent notices and reordered the code.
This commit is contained in:
Nicola Mustone 2014-10-16 08:56:28 +02:00
parent 342f5e9472
commit 437e041d3d
1 changed files with 5 additions and 4 deletions

View File

@ -540,14 +540,15 @@ class WC_Admin_Report {
*/
public function get_currency_tooltip() {
switch( get_option( 'woocommerce_currency_pos' ) ) {
case 'left':
$currency_tooltip = 'prepend_tooltip: "' . get_woocommerce_currency_symbol() . '"'; break;
case 'left_space':
$currency_tooltip = 'prepend_tooltip: "' . get_woocommerce_currency_symbol() . ' "'; break;
case 'right':
$currency_tooltip = 'append_tooltip: "' . get_woocommerce_currency_symbol() . '"'; break;
case 'right_space':
$currency_tooltip = 'append_tooltip: " ' . get_woocommerce_currency_symbol() . '"'; break;
case 'left':
$currency_tooltip = 'prepend_tooltip: "' . get_woocommerce_currency_symbol() . '"'; break;
case 'left_space':
default:
$currency_tooltip = 'prepend_tooltip: "' . get_woocommerce_currency_symbol() . ' "'; break;
}
return $currency_tooltip;