Simple Sales Tax provides several filters for developers. All available filters are documented below.
wootax_product_price
Set the taxable price for a product.
Arguments
Name | Type | Description |
$price | float | Taxable product price. |
$product | WC_Product | Product. |
Return Value
Type | Description |
float | New taxable product price. |
wootax_shipping_price
Set the taxable price for a shipping rate.
Arguments
Name | Type | Description |
$price | float | Taxable shipping price. |
$shipping_rate | WC_Shipping_Rate | Shipping rate. |
Return Value
Type | Description |
float | New taxable shipping price. |
wootax_fee_price
Set the taxable price for a fee.
Arguments
Name | Type | Description |
$price | float | Taxable fee price. |
$fee | object | Fee. |
Return Value
Type | Description |
float | New taxable fee price. |
wootax_product_tic
Set the Taxability Information Code (TIC) for a product. A full list of available TICs can be found here.
Arguments
Name | Type | Description |
$tic | int | Product TIC. |
$product_id | int | Product ID. |
$variation_id | int | Variation ID, if applicable. |
Return Value
Type | Description |
int | New product TIC. |
wootax_shipping_tic
Set the Taxability Information Code (TIC) for a shipping rate. A full list of available TICs can be found here.
Arguments
Name | Type | Description |
$tic | int | Shipping TIC (Default: 11010) |
Return Value
Type | Description |
int | New shipping TIC. |
wootax_fee_tic
Set the Taxability Information Code (TIC) for a fee. A full list of available TICs can be found here.
Arguments
Name | Type | Description |
$tic | int | Fee TIC (Default: 10010) |
Return Value
Type | Description |
int | New fee TIC. |
wootax_sign_up_fee_tic
Set the Taxability Information Code (TIC) for subscription sign up fees. A full list of available TICs can be found here.
Arguments
Name | Type | Description |
$tic | int | TIC used for subscription sign up fees (Default: 91070). |
Return Value
Type | Description |
int | New sign up fee TIC. |
wootax_origin_address
Set the origin address for a product. The origin address is the address from which the product is shipped.
Arguments
Name | Type | Description |
$origin | SST_Origin_Address | Origin address for cart item. |
$item | array with keys product_id, variation_id, quantity, and data | Cart item. |
$destination | TaxCloud\Address | Destination address for item. |
Return Value
Type | Description |
SST_Origin_Address | New origin address for item. |
wootax_pickup_address
Set the address used for tax calculations for local pickup orders. By default, the first business address marked as default is used.
Arguments
Name | Type | Description |
$pickup_address | SST_Origin_Address | Destination address used for local pickup orders. |
$order | WC_Order | Order object. NULL during checkout. |
Return Value
Type | Description |
SST_Origin_Address | New local pickup address. |
wootax_add_fees
Should fees be included in the cart sent to TaxCloud?
Arguments
Name | Type | Description |
$add_fees | boolean | Should fees be included in the cart sent to TaxCloud? (Default: true) |
Return Value
Type | Description |
boolean | True if fees should be included in cart, otherwise false. |
wootax_cart_packages_before_split
Adjust the cart packages before they are split by origin address.
Arguments
Name | Type | Description |
$packages | array | Cart shipping packages. |
$cart | WC_Cart | Cart. |
Return Value
Type | Description |
array | New cart shipping packages. |
wootax_cart_packages
Adjust the cart packages after they are split by origin address.
Arguments
Name | Type | Description |
$packages | array | Cart shipping packages. |
$cart | WC_Cart | Cart. |
Return Value
Type | Description |
array | New cart shipping packages. |
wootax_order_packages_before_split
Adjust order packages before they are split by origin address.
Arguments
Name | Type | Description |
$packages | array | Order packages. |
$order | WC_Order | Order. |
Return Value
Type | Description |
array | New order packages. |
wootax_order_packages
Adjust order packages after they are split by origin address.
Arguments
Name | Type | Description |
$packages | array | Order packages. |
$order | WC_Order | Order. |
Return Value
Type | Description |
array | New order packages. |
wootax_hide_tax_options
Should the “Tax Status” and “Tax Class” options be hidden while Simple Sales Tax is active?
Arguments
Name | Type | Description |
$hide_tax_options | boolean | Should the "Tax Class" and "Tax Status" options be hidden? (Default: true) |
Return Value
Type | Description |
boolean | True if the tax options should be hidden, otherwise false. |
wootax_local_delivery_methods
Set the list of shipping methods considered to be Local Delivery methods by Simple Sales Tax.
Arguments
Name | Type | Description |
$methods | array | Array containing IDs of local delivery methods. By default, contains values 'local_delivery' and 'legacy_local_delivery.' |
Return Value
Type | Description |
array | New list of local delivery method IDs. |
wootax_rate_code
Set the rate code for the Simple Sales Tax tax rate.
Argument
Name | Type | Description |
$rate_code | string | Simple Sales Tax rate code (Default: SALES-TAX). |
Return Value
Type | Description |
string | New rate code. |
wootax_rate_label
Set the label for the Simple Sales Tax tax rate.
Argument
Name | Type | Description |
$rate_label | string | Simple Sales Tax rate label (Default: Sales Tax). |
Return Value
Type | Description |
string | New rate label. |