cart->get_taxes() as $tax_id => $tax_total ) { foreach ( $recurring_carts as $recurring_cart_key => $recurring_cart ) { foreach ( $recurring_cart->get_tax_totals() as $recurring_code => $recurring_tax ) { if ( ! isset( $recurring_tax->tax_rate_id ) || $recurring_tax->tax_rate_id !== $tax_id ) { continue; } /** * Allow third-parties to filter the tax displayed. * * @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.0 * @param string $tax_amount The recurring cart's tax total price string for this tax code. * @param WC_Cart $recurring_cart The recurring cart. * @param string $recurring_code The tax code. * @param object $recurring_tax The recurring tax data generated by @see WC_Cart::get_tax_totals() */ $tax_amount = wp_kses_post( apply_filters( 'wcs_recurring_cart_itemized_tax_totals_html', wcs_cart_price_string( $recurring_tax->formatted_amount, $recurring_cart ), $recurring_cart, $recurring_code, $recurring_tax ) ); // If the returned amount is empty, skip it. if ( empty( $tax_amount ) ) { continue; } ?>