PHP Class WC_Order_Item_Tax

Since: 2.7.0
Author: WooThemes
Inheritance: extends WC_Order_Item
Show file Open project: woocommerce/woocommerce Class Usage Examples

Protected Properties

Property Type Description
$extra_data array Order Data array. This is the core order data exposed in APIs since 2.7.0.

Public Methods

Method Description
get_compound ( string $context = 'view' ) : boolean Get compound.
get_label ( string $context = 'view' ) : string Get label.
get_name ( string $context = 'view' ) : string Get rate code/name.
get_rate_code ( string $context = 'view' ) : string Get rate code/name.
get_rate_id ( string $context = 'view' ) : integer Get tax rate ID.
get_shipping_tax_total ( string $context = 'view' ) : string Get shipping_tax_total
get_tax_total ( string $context = 'view' ) : string Get tax_total
get_type ( ) : string Get order item type.
is_compound ( ) : boolean Is this a compound tax rate?
set_compound ( boolean $value ) Set compound
set_label ( string $value ) Set item name.
set_name ( string $value ) Set order item name.
set_rate ( integer $tax_rate_id ) Set properties based on passed in tax rate by ID.
set_rate_code ( string $value ) Set item name.
set_rate_id ( integer $value ) Set tax rate id.
set_shipping_tax_total ( string $value ) Set shipping_tax_total
set_tax_total ( string $value ) Set tax total.

Method Details

get_compound() public method

Get compound.
public get_compound ( string $context = 'view' ) : boolean
$context string
return boolean

get_label() public method

Get label.
public get_label ( string $context = 'view' ) : string
$context string
return string

get_name() public method

Get rate code/name.
public get_name ( string $context = 'view' ) : string
$context string
return string

get_rate_code() public method

Get rate code/name.
public get_rate_code ( string $context = 'view' ) : string
$context string
return string

get_rate_id() public method

Get tax rate ID.
public get_rate_id ( string $context = 'view' ) : integer
$context string
return integer

get_shipping_tax_total() public method

Get shipping_tax_total
public get_shipping_tax_total ( string $context = 'view' ) : string
$context string
return string

get_tax_total() public method

Get tax_total
public get_tax_total ( string $context = 'view' ) : string
$context string
return string

get_type() public method

Get order item type.
public get_type ( ) : string
return string

is_compound() public method

Is this a compound tax rate?
public is_compound ( ) : boolean
return boolean

set_compound() public method

Set compound
public set_compound ( boolean $value )
$value boolean

set_label() public method

Set item name.
public set_label ( string $value )
$value string

set_name() public method

Set order item name.
public set_name ( string $value )
$value string

set_rate() public method

Set properties based on passed in tax rate by ID.
public set_rate ( integer $tax_rate_id )
$tax_rate_id integer

set_rate_code() public method

Set item name.
public set_rate_code ( string $value )
$value string

set_rate_id() public method

Set tax rate id.
public set_rate_id ( integer $value )
$value integer

set_shipping_tax_total() public method

Set shipping_tax_total
public set_shipping_tax_total ( string $value )
$value string

set_tax_total() public method

Set tax total.
public set_tax_total ( string $value )
$value string

Property Details

$extra_data protected property

Order Data array. This is the core order data exposed in APIs since 2.7.0.
Since: 2.7.0
protected array $extra_data
return array