WC_Cart::get_product_price( WC_Product $product )

Get the product row price per item.


Description Description


Parameters Parameters

$product

(Required) Product object.


Top ↑

Return Return

(string) formatted price


Top ↑

Source Source

File: includes/class-wc-cart.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.