PHP Class WC_Order_Item_Coupon

Since: 2.7.0
Author: WooThemes
Inheritance: extends WC_Order_Item
Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Protected Properties

Свойство Type Description
$extra_data array Order Data array. This is the core order data exposed in APIs since 2.7.0.

Méthodes publiques

Méthode Description
get_code ( string $context = 'view' ) : string Get coupon code.
get_discount ( string $context = 'view' ) : string Get discount amount.
get_discount_tax ( $context = 'view' ) : string Get discounted tax amount.
get_name ( string $context = 'view' ) : string Get order item name.
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_code ( string $value ) Set code.
set_discount ( string $value ) Set discount amount.
set_discount_tax ( string $value ) Set discounted tax amount.
set_name ( string $value ) Set order item name.

Method Details

get_code() public méthode

Get coupon code.
public get_code ( string $context = 'view' ) : string
$context string
Résultat string

get_discount() public méthode

Get discount amount.
public get_discount ( string $context = 'view' ) : string
$context string
Résultat string

get_discount_tax() public méthode

Get discounted tax amount.
public get_discount_tax ( $context = 'view' ) : string
Résultat string

get_name() public méthode

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

get_type() public méthode

Get order item type.
public get_type ( ) : string
Résultat string

offsetExists() public méthode

offsetExists for ArrayAccess
public offsetExists ( string $offset ) : boolean
$offset string
Résultat boolean

offsetGet() public méthode

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

offsetSet() public méthode

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

set_code() public méthode

Set code.
public set_code ( string $value )
$value string

set_discount() public méthode

Set discount amount.
public set_discount ( string $value )
$value string

set_discount_tax() public méthode

Set discounted tax amount.
public set_discount_tax ( string $value )
$value string

set_name() public méthode

Set order item name.
public set_name ( 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
Résultat array