프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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. |
메소드 | 설명 | |
---|---|---|
__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. |
메소드 | 설명 | |
---|---|---|
get_hook_prefix ( ) : string | Prefix for action and filter hooks on data. |
public get_formatted_meta_data ( string $hideprefix = '_' ) : array | ||
$hideprefix | string | (default: _) |
리턴 | array |
protected get_hook_prefix ( ) : string | ||
리턴 | string |
public get_order_id ( string $context = 'view' ) : integer | ||
$context | string | |
리턴 | integer |
public offsetExists ( string $offset ) : boolean | ||
$offset | string | |
리턴 | boolean |
public offsetUnset ( string $offset ) | ||
$offset | string |
protected string $cache_group | ||
리턴 | string |
protected array $data | ||
리턴 | array |
protected object $order | ||
리턴 | object |