Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ( $rates as $key => $rate ) {
- $ny = $price-17500;
- if ($state == 'NY')
- $tax_amount = ( $ny * $rate['rate'] / 100 );
- else
- $tax_amount = ($price * $rate['rate'] / 100 );
- // ADVANCED: Allow third parties to modify this rate
- $tax_amount = apply_filters( 'woocommerce_price_ex_tax_amount', $tax_amount, $key, $rate, $price);
- // Back to pounds
- $tax_amount = ( $tax_amount / 100 );
- // Rounding
- if ( get_option( 'woocommerce_tax_round_at_subtotal' ) == 'no' && ! $suppress_rounding ) {
- $tax_amount = $this->round( $tax_amount );
- }
- // Add rate
- if ( ! isset( $taxes[ $key ] ) )
- $taxes[ $key ] = $tax_amount;
- else
- $taxes[ $key ] += $tax_amount;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement