PHP Class WC_Order_Item_Fee

Since: 2.7.0
Author: WooThemes
Inheritance: extends WC_Order_Item
Mostrar archivo 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_name ( string $context = 'view' ) : string Get order item name.
get_tax_class ( string $context = 'view' ) : string Get tax class.
get_tax_status ( string $context = 'view' ) : string Get tax status.
get_taxes ( string $context = 'view' ) : array Get fee taxes.
get_total ( string $context = 'view' ) : string Get total fee.
get_total_tax ( string $context = 'view' ) : string Get total tax.
get_type ( ) : string Get order item type.
offsetExists ( string $offset ) : boolean offsetExists for ArrayAccess
offsetGet ( string $offset ) : mixed offsetGet for ArrayAccess/Backwards compatibility.
offsetSet ( string $offset, mixed $value ) offsetSet for ArrayAccess/Backwards compatibility.
set_tax_class ( string $value ) Set tax class.
set_tax_status ( string $value ) Set tax_status.
set_taxes ( array $raw_tax_data ) Set taxes.
set_total ( string $value ) Set total.

Protected Methods

Method Description
set_total_tax ( string $value ) Set total tax.

Method Details

get_name() public method

Get order item name.
public get_name ( string $context = 'view' ) : string
$context string
return string

get_tax_class() public method

Get tax class.
public get_tax_class ( string $context = 'view' ) : string
$context string
return string

get_tax_status() public method

Get tax status.
public get_tax_status ( string $context = 'view' ) : string
$context string
return string

get_taxes() public method

Get fee taxes.
public get_taxes ( string $context = 'view' ) : array
$context string
return array

get_total() public method

Get total fee.
public get_total ( string $context = 'view' ) : string
$context string
return string

get_total_tax() public method

Get total tax.
public get_total_tax ( string $context = 'view' ) : string
$context string
return string

get_type() public method

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

offsetExists() public method

offsetExists for ArrayAccess
public offsetExists ( string $offset ) : boolean
$offset string
return boolean

offsetGet() public method

offsetGet for ArrayAccess/Backwards compatibility.
Deprecation: Add deprecation notices in future release.
public offsetGet ( string $offset ) : mixed
$offset string
return mixed

offsetSet() public method

offsetSet for ArrayAccess/Backwards compatibility.
Deprecation: Add deprecation notices in future release.
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed

set_tax_class() public method

Set tax class.
public set_tax_class ( string $value )
$value string

set_tax_status() public method

Set tax_status.
public set_tax_status ( string $value )
$value string

set_taxes() public method

This is an array of tax ID keys with total amount values.
public set_taxes ( array $raw_tax_data )
$raw_tax_data array

set_total() public method

Set total.
public set_total ( string $value )
$value string

set_total_tax() protected method

Set total tax.
protected set_total_tax ( string $value )
$value string

Property Details

$extra_data protected_oe 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