Automattic\WooCommerce\Blocks\BlockTypes

MiniCart::get_include_tax_label_markup()protectedWC 1.0

Returns the markup for render the tax label.

Method of the class: MiniCart{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_include_tax_label_markup( $attributes );
$attributes(array) (required)
Block attributes.

MiniCart::get_include_tax_label_markup() code WC 9.4.2

protected function get_include_tax_label_markup( $attributes ) {
	if ( empty( $this->tax_label ) ) {
		return '';
	}
	$price_color = array_key_exists( 'priceColor', $attributes ) ? $attributes['priceColor']['color'] : '';

	return '<small class="wc-block-mini-cart__tax-label" style="color:' . esc_attr( $price_color ) . ' " hidden>' . esc_html( $this->tax_label ) . '</small>';
}