Fixed includes/class-wc-cart-totals.php PHPCS violations
This commit is contained in:
parent
8effbb11bd
commit
67cd6b8fbf
|
@ -9,8 +9,8 @@
|
|||
* - if something is being stored e.g. item total, store unrounded. This is so taxes can be recalculated later accurately.
|
||||
* - if calculating a total, round (if settings allow).
|
||||
*
|
||||
* @author Automattic
|
||||
* @package WooCommerce/Classes
|
||||
* @version 3.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -312,7 +312,6 @@ final class WC_Cart_Totals {
|
|||
$fee->taxes = wc_array_merge_recursive_numeric( $fee->taxes, WC_Tax::calc_tax( $fee->total * $proportion, WC_Tax::get_rates( $tax_class ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( $fee->object->taxable ) {
|
||||
$fee->taxes = WC_Tax::calc_tax( $fee->total, WC_Tax::get_rates( $fee->tax_class, $this->cart->get_customer() ), false );
|
||||
}
|
||||
|
@ -551,6 +550,7 @@ final class WC_Cart_Totals {
|
|||
* Get taxes merged by type.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @param bool $in_cents If returned value should be in cents.
|
||||
* @param array|string $types Types to merge and return. Defaults to all.
|
||||
* @return array
|
||||
*/
|
||||
|
@ -584,7 +584,7 @@ final class WC_Cart_Totals {
|
|||
* Combine item taxes into a single array, preserving keys.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @param array $taxes Taxes to combine.
|
||||
* @param array $item_taxes Taxes to combine.
|
||||
* @return array
|
||||
*/
|
||||
protected function combine_item_taxes( $item_taxes ) {
|
||||
|
|
Loading…
Reference in New Issue