PHP Class WC_Order_Item_Shipping

Since: 2.7.0
Author: WooThemes
Inheritance: extends WC_Order_Item
Mostra 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_method_id ( string $context = 'view' ) : string Get method ID.
get_method_title ( string $context = 'view' ) : string Get title.
get_name ( string $context = 'view' ) : string Get order item name.
get_taxes ( string $context = 'view' ) : array Get taxes.
get_total ( string $context = 'view' ) : string Get total cost.
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_method_id ( string $value ) Set shipping method id.
set_method_title ( string $value ) Set method title.
set_name ( string $value ) Set order item name.
set_shipping_rate ( $shipping_rate ) Set properties based on passed in shipping rate object.
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_method_id() public method

Get method ID.
public get_method_id ( string $context = 'view' ) : string
$context string
return string

get_method_title() public method

Get title.
public get_method_title ( string $context = 'view' ) : string
$context string
return string

get_name() public method

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

get_taxes() public method

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

get_total() public method

Get total cost.
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_method_id() public method

Set shipping method id.
public set_method_id ( string $value )
$value string

set_method_title() public method

Set method title.
public set_method_title ( string $value )
$value string

set_name() public method

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

set_shipping_rate() public method

Set properties based on passed in shipping rate object.
public set_shipping_rate ( $shipping_rate )

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