Automattic\WooCommerce\Blocks\BlockTypes

MiniCart::get_cart_price_markupprotectedWC 1.0

Returns the markup for the cart price.

Method of the class: MiniCart{}

No Hooks.

Returns

String.

Usage

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

MiniCart::get_cart_price_markup() code WC 10.7.0

protected function get_cart_price_markup( $attributes ) {
	if ( isset( $attributes['hasHiddenPrice'] ) && false !== $attributes['hasHiddenPrice'] ) {
		return;
	}
	$price_color = isset( $attributes['priceColor']['color'] ) ? $attributes['priceColor']['color'] : '';

	return '<span class="wc-block-mini-cart__amount" style="color:' . esc_attr( $price_color ) . '"></span>' . $this->get_include_tax_label_markup( $attributes );
}