Automattic\WooCommerce\Blocks\BlockTypes

MiniCart::get_include_tax_label_markup()protectedWC 1.0

Returns the markup for render the tax label.

Метод класса: MiniCart{}

Хуков нет.

Возвращает

Строку.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_include_tax_label_markup( $attributes );
$attributes(массив) (обязательный)
Block attributes.

Код MiniCart::get_include_tax_label_markup() WC 8.7.0

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>';
}