Property | Type | Description | |
---|---|---|---|
$cache_group | string | A group must be set to to enable caching. | |
$data | array | Order Data array. This is the core order data exposed in APIs since 2.7.0. | |
$meta_type | WP defines 'post', 'user', 'comment', and 'term'. | ||
$order | object | May store an order to prevent retriving it multiple times. |
Method | Description | |
---|---|---|
__construct ( integer | object | array $item ) | Constructor. | |
get_formatted_meta_data ( string $hideprefix = '_' ) : array | Expands things like term slugs before return. | |
get_name ( string $context = 'view' ) : string | Get order item name. | |
get_order ( ) : integer | Get parent order object. | |
get_order_id ( string $context = 'view' ) : integer | Get order ID this meta belongs to. | |
get_quantity ( ) : integer | Get quantity. | |
get_type ( ) : string | Get order item type. Overridden by child classes. | |
is_type ( $type ) : boolean | Type checking | |
offsetExists ( string $offset ) : boolean | offsetExists for ArrayAccess | |
offsetGet ( string $offset ) : mixed | offsetGet for ArrayAccess | |
offsetSet ( string $offset, mixed $value ) | offsetSet for ArrayAccess | |
offsetUnset ( string $offset ) | offsetUnset for ArrayAccess | |
set_name ( string $value ) | Set order item name. | |
set_order_id ( integer $value ) | Set order ID. |
Method | Description | |
---|---|---|
get_hook_prefix ( ) : string | Prefix for action and filter hooks on data. |
public get_formatted_meta_data ( string $hideprefix = '_' ) : array | ||
$hideprefix | string | (default: _) |
return | array |
protected get_hook_prefix ( ) : string | ||
return | string |
public get_order_id ( string $context = 'view' ) : integer | ||
$context | string | |
return | integer |
public offsetExists ( string $offset ) : boolean | ||
$offset | string | |
return | boolean |
public offsetUnset ( string $offset ) | ||
$offset | string |
protected string $cache_group | ||
return | string |
protected array $data | ||
return | array |
protected $meta_type |
protected object $order | ||
return | object |