WC_Admin_Report::get_currency_tooltip()publicWC 1.0

Return currency tooltip JS based on WooCommerce currency position settings.

Method of the class: WC_Admin_Report{}

No Hooks.

Return

String.

Usage

$WC_Admin_Report = new WC_Admin_Report();
$WC_Admin_Report->get_currency_tooltip();

WC_Admin_Report::get_currency_tooltip() code WC 8.7.0

public function get_currency_tooltip() {
	switch ( get_option( 'woocommerce_currency_pos' ) ) {
		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;
}