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
$id
Setting page id.
protected
string
$id
= ''
$label
Setting page label.
protected
string
$label
= ''
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixedadd_settings_page()
Add this page to settings.
public
add_settings_page(array $pages) : array|mixed
Parameters
- $pages : array
-
Existing pages.
Return values
array|mixedget_id()
Get settings page ID.
public
get_id() : string
Tags
Return values
stringget_label()
Get settings page label.
public
get_label() : string
Tags
Return values
stringget_sections()
Get sections.
public
get_sections() : array
Return values
arrayget_settings()
Get settings array.
public
get_settings([string $current_section = '' ]) : array
Parameters
- $current_section : string = ''
-
Current section being shown.
Return values
arrayoutput()
Output the settings.
public
output() : mixed
Return values
mixedoutput_sections()
Output sections.
public
output_sections() : mixed
Return values
mixedoutput_tax_rates()
Output tax rate tables.
public
output_tax_rates() : mixed
Return values
mixedsave()
Save settings.
public
save() : mixed
Return values
mixedsave_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
nullsave_tax_rates()
Save tax rates.
public
save_tax_rates() : mixed
Return values
mixedget_current_tax_class()
Get tax class being edited.
private
static get_current_tax_class() : string
Return values
stringget_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.