wc_help_tip( string $tip, bool $allow_html = false )

Display a WooCommerce help tip.


Description Description


Parameters Parameters

$tip

(Required) Help tip text.

$allow_html

(Optional) Allow sanitized HTML if true or escape.

Default value: false


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_help_tip( $tip, $allow_html = false ) {
	if ( $allow_html ) {
		$tip = wc_sanitize_tooltip( $tip );
	} else {
		$tip = esc_attr( $tip );
	}

	return '<span class="woocommerce-help-tip" data-tip="' . $tip . '"></span>';
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.