wc_get_tax_rounding_mode()
Get rounding mode for internal tax calculations.
No Hooks.
Return
Int
.
Usage
wc_get_tax_rounding_mode();
Changelog
Since 3.2.4 | Introduced. |
wc_get_tax_rounding_mode() wc get tax rounding mode code WC 9.8.1
function wc_get_tax_rounding_mode() { $constant = WC_TAX_ROUNDING_MODE; if ( 'auto' === $constant ) { return 'yes' === get_option( 'woocommerce_prices_include_tax', 'no' ) ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP; } return intval( $constant ); }