You appear to be a bot. Output may be restricted
Description
Check if the shipping tax is included in the total according to $shipping_tax_included.
Usage
WC_Tests_Paypal_Gateway_Request::check_shipping_tax( $query_array, $shipping_tax_included );
Parameters
- $query_array
- ( array ) required – Request URL parsed into associative array.
- $shipping_tax_included
- ( bool ) required – Whether the shipping tax should be included or not.
Returns
void
Source
File name: woocommerce/tests/unit-tests/gateways/paypal/request.php
Lines: 1 to 13 of 13
protected function check_shipping_tax( $query_array, $shipping_tax_included ) { $shipping_total = $this->order->get_shipping_total(); if ( $shipping_tax_included ) { $shipping_total += $this->order->get_shipping_tax(); } $epsilon = 0.01; $this->assertTrue( abs( $shipping_total - floatval( $query_array['shipping_1'] ) ) < $epsilon, 'Shipping tax mismatch: shipping total=' . $shipping_total . ' vs request shipping=' . $query_array['shipping_1'] ); }