You appear to be a bot. Output may be restricted
Description
Get all applicable tax for the items in the cart
Usage
$float = EDD_Cart::get_tax();
Parameters
Returns
float Total tax amount
Source
File name: easy-digital-downloads/includes/cart/class-edd-cart.php
Lines:
1 to 23 of 23
public function get_tax() { $cart_tax = 0; $items = $this->get_contents_details(); if ( $items ) { $taxes = wp_list_pluck( $items, 'tax' ); if ( is_array( $taxes ) ) { $cart_tax = array_sum( $taxes ); } } $cart_tax += $this->get_tax_on_fees(); $subtotal = $this->get_subtotal(); if ( empty( $subtotal ) ) { $cart_tax = 0; } $cart_tax = apply_filters( 'edd_get_cart_tax', edd_sanitize_amount( $cart_tax ) ); return $cart_tax; }