WC_Settings_API::get_tooltip_htmlpublicWC 1.0

Get HTML for tooltips.

Method of the class: WC_Settings_API{}

No Hooks.

Returns

String.

Usage

$WC_Settings_API = new WC_Settings_API();
$WC_Settings_API->get_tooltip_html( $data );
$data(array) (required)
Data for the tooltip.

WC_Settings_API::get_tooltip_html() code WC 9.9.4

public function get_tooltip_html( $data ) {
	if ( true === $data['desc_tip'] ) {
		$tip = $data['description'];
	} elseif ( ! empty( $data['desc_tip'] ) ) {
		$tip = $data['desc_tip'];
	} else {
		$tip = '';
	}

	return $tip ? wc_help_tip( $tip, true ) : '';
}