woocommerce_cart_contents_total
Gets the cart contents total (after calculation).
Usage
add_filter( 'woocommerce_cart_contents_total', 'wp_kama_woocommerce_cart_contents_total_filter' ); /** * Function for `woocommerce_cart_contents_total` filter-hook. * * @param $wc_price * * @return */ function wp_kama_woocommerce_cart_contents_total_filter( $wc_price ){ // filter... return $wc_price; }
- $wc_price
- -
Where the hook is called
woocommerce_cart_contents_total
woocommerce/includes/class-wc-cart.php 1972
return apply_filters( 'woocommerce_cart_contents_total', wc_price( wc_prices_include_tax() ? $this->get_cart_contents_total() + $this->get_cart_contents_tax() : $this->get_cart_contents_total() ) );