wc_get_tax_rounding_mode()
Get rounding mode for internal tax calculations.
Хуков нет.
Возвращает
int.
Использование
wc_get_tax_rounding_mode();
Список изменений
| С версии 3.2.4 | Введена. |
Код wc_get_tax_rounding_mode() wc get tax rounding mode WC 11.2.2
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 );
}