WordPress at Your Fingertips
function is not described

WC_Cart::get_product_price() public WC 1.0

Get the product row price per item.

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

Hooks from the method
Return

String. formatted price

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_product_price( $product );
$product(WC_Product) (required)
Product object.

Code of WC_Cart::get_product_price() WC 5.6.0

public function get_product_price( $product ) {
	if ( $this->display_prices_including_tax() ) {
		$product_price = wc_get_price_including_tax( $product );
	} else {
		$product_price = wc_get_price_excluding_tax( $product );
	}
	return apply_filters( 'woocommerce_cart_product_price', wc_price( $product_price ), $product );
}