WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

AbstractProductGrid::get_price_html() protected WC 1.0

Get the price.

{} It's a method of the class: AbstractProductGrid{}

No Hooks.

Return

String. Rendered product output.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_price_html( $product );
$product(\WC_Product) (required)
Product.

Code of AbstractProductGrid::get_price_html() WC 5.7.1

protected function get_price_html( $product ) {
	if ( empty( $this->attributes['contentVisibility']['price'] ) ) {
		return '';
	}
	return sprintf(
		'<div class="wc-block-grid__product-price price">%s</div>',
		wp_kses_post( $product->get_price_html() )
	);
}