Filter
rpress_use_taxes
On this page
Filters whether taxes are enabled.
Runs in rpress_use_taxes(), which is called throughout cart, checkout and payment code. The default is the enable_taxes setting. Return false to disable all tax calculation, or true to force it on.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$use_taxes | bool | Value of the enable_taxes setting. |
Return value#
bool. True if taxes are enabled.
Example#
function my_disable_taxes_for_staff( $use_taxes ) {
if ( current_user_can( 'manage_options' ) ) {
return false;
}
return $use_taxes;
}
add_filter( 'rpress_use_taxes', 'my_disable_taxes_for_staff' );
Source#
Applied in:
includes/tax-functions.php(line 27), inrpress_use_taxes()
See also#
Was this page helpful?
