wc_get_tax_rounding_mode()

Get rounding mode for internal tax calculations.


Description Description


Return Return

(int)


Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_get_tax_rounding_mode() {
	$constant = WC_TAX_ROUNDING_MODE;

	if ( 'auto' === $constant ) {
		return 'yes' === get_option( 'woocommerce_prices_include_tax', 'no' ) ? 2 : 1;
	}

	return intval( $constant );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.2.4 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.