Developer Documentation

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

NameTypeDescription
$pricefloatTaxable product price.
$productWC_ProductProduct.

Return Value

TypeDescription
floatNew taxable product price.

wootax_shipping_price


Set the taxable price for a shipping rate.

Arguments

NameTypeDescription
$pricefloatTaxable shipping price.
$shipping_rateWC_Shipping_RateShipping rate.

Return Value

TypeDescription
floatNew taxable shipping price.

wootax_fee_price


Set the taxable price for a fee.

Arguments

NameTypeDescription
$pricefloatTaxable fee price.
$feeobjectFee.

Return Value

TypeDescription
floatNew 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

NameTypeDescription
$ticintProduct TIC.
$product_idintProduct ID.
$variation_idintVariation ID, if applicable.

Return Value

TypeDescription
intNew 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

NameTypeDescription
$ticintShipping TIC (Default: 11010)

Return Value

TypeDescription
intNew 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

NameTypeDescription
$ticintFee TIC (Default: 10010)

Return Value

TypeDescription
intNew 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

NameTypeDescription
$ticintTIC used for subscription sign up fees (Default: 91070).

Return Value

TypeDescription
intNew 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

NameTypeDescription
$originSST_Origin_AddressOrigin address for cart item.
$itemarray with keys product_id, variation_id, quantity, and dataCart item.
$destinationTaxCloud\AddressDestination address for item.

Return Value

TypeDescription
SST_Origin_AddressNew 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

NameTypeDescription
$pickup_addressSST_Origin_AddressDestination address used for local pickup orders.
$orderWC_OrderOrder object. NULL during checkout.

Return Value

TypeDescription
SST_Origin_AddressNew local pickup address.

wootax_add_fees


Should fees be included in the cart sent to TaxCloud?

Arguments

NameTypeDescription
$add_feesbooleanShould fees be included in the cart sent to TaxCloud? (Default: true)

Return Value

TypeDescription
booleanTrue 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

NameTypeDescription
$packagesarrayCart shipping packages.
$cartWC_CartCart.

Return Value

TypeDescription
arrayNew cart shipping packages.

wootax_cart_packages


Adjust the cart packages after they are split by origin address.

Arguments

NameTypeDescription
$packagesarrayCart shipping packages.
$cartWC_CartCart.

Return Value

TypeDescription
arrayNew cart shipping packages.

wootax_order_packages_before_split


Adjust order packages before they are split by origin address.

Arguments

NameTypeDescription
$packagesarrayOrder packages.
$orderWC_OrderOrder.

Return Value

TypeDescription
arrayNew order packages.

wootax_order_packages


Adjust order packages after they are split by origin address.

Arguments

NameTypeDescription
$packagesarrayOrder packages.
$orderWC_OrderOrder.

Return Value

TypeDescription
arrayNew order packages.

wootax_hide_tax_options


Should the “Tax Status” and “Tax Class” options be hidden while Simple Sales Tax is active?

Arguments

NameTypeDescription
$hide_tax_optionsbooleanShould the "Tax Class" and "Tax Status" options be hidden? (Default: true)

Return Value

TypeDescription
booleanTrue 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

NameTypeDescription
$methodsarrayArray containing IDs of local delivery methods. By default, contains values 'local_delivery' and 'legacy_local_delivery.'

Return Value

TypeDescription
arrayNew list of local delivery method IDs.

wootax_rate_code


Set the rate code for the Simple Sales Tax tax rate.

Argument

NameTypeDescription
$rate_codestringSimple Sales Tax rate code (Default: SALES-TAX).

Return Value

TypeDescription
stringNew rate code.

wootax_rate_label


Set the label for the Simple Sales Tax tax rate.

Argument

NameTypeDescription
$rate_labelstringSimple Sales Tax rate label (Default: Sales Tax).

Return Value

TypeDescription
stringNew rate label.