WooCommerce Code Reference

WC_Settings_Tax extends WC_Settings_Page
in package

WC_Settings_Tax.

Table of Contents

$id  : string
Setting page id.
$label  : string
Setting page label.
__construct()  : mixed
Constructor.
add_settings_page()  : array|mixed
Add this page to settings.
get_id()  : string
Get settings page ID.
get_label()  : string
Get settings page label.
get_sections()  : array
Get sections.
get_settings()  : array
Get settings array.
output()  : mixed
Output the settings.
output_sections()  : mixed
Output sections.
output_tax_rates()  : mixed
Output tax rate tables.
save()  : mixed
Save settings.
save_tax_classes()  : null
Saves tax classes defined in the textarea to the tax class table instead of an option.
save_tax_rates()  : mixed
Save tax rates.
get_current_tax_class()  : string
Get tax class being edited.
get_posted_tax_rate()  : array
Get a posted tax rate.

Properties

Methods

save_tax_classes()

Saves tax classes defined in the textarea to the tax class table instead of an option.

public save_tax_classes(string $raw_tax_classes) : null
Parameters
$raw_tax_classes : string

Posted value.

Return values
null

get_posted_tax_rate()

Get a posted tax rate.

private get_posted_tax_rate(string $key, int $order, string $class) : array
Parameters
$key : string

Key of tax rate in the post data array.

$order : int

Position/order of rate.

$class : string

Tax class for rate.

Return values
array