wc_help_tip
Filter the help tip.
Usage
add_filter( 'wc_help_tip', 'wp_kama_wc_help_tip_filter', 10, 4 );
/**
* Function for `wc_help_tip` filter-hook.
*
* @param string $tip_html Help tip HTML.
* @param string $sanitized_tip Sanitized help tip text.
* @param string $tip Original help tip text.
* @param bool $allow_html Allow sanitized HTML if true or escape.
*
* @return string
*/
function wp_kama_wc_help_tip_filter( $tip_html, $sanitized_tip, $tip, $allow_html ){
// filter...
return $tip_html;
}
- $tip_html(string)
- Help tip HTML.
- $sanitized_tip(string)
- Sanitized help tip text.
- $tip(string)
- Original help tip text.
- $allow_html(true|false)
- Allow sanitized HTML if true or escape.
Changelog
| Since 7.7.0 | Introduced. |
Where the hook is called
wc_help_tip
woocommerce/includes/wc-core-functions.php 1556
return apply_filters( 'wc_help_tip', '<span class="woocommerce-help-tip" tabindex="0" aria-label="' . esc_attr( $aria_label ) . '" data-tip="' . $sanitized_tip . '"></span>', $sanitized_tip, $tip, $allow_html );