PHP Class WC_Customer_Download

Since: 2.7.0
Author: WooThemes
Inheritance: extends WC_Data, implements ArrayAccess
Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Protected Properties

Свойство Type Description
$data array Download Data array.

Méthodes publiques

Méthode Description
__construct ( integer | object | array $download ) Constructor.
get_access_expires ( string $context = 'view' ) : integer Get access_expires.
get_access_granted ( string $context = 'view' ) : integer Get access_granted.
get_download_count ( string $context = 'view' ) : integer Get download_count.
get_download_id ( string $context = 'view' ) : string Get download id.
get_downloads_remaining ( string $context = 'view' ) : integer Get downloads_remaining.
get_order_id ( string $context = 'view' ) : integer Get order_id.
get_order_key ( string $context = 'view' ) : string Get order_key.
get_product_id ( string $context = 'view' ) : integer Get product id.
get_user_email ( string $context = 'view' ) : string Get user_email.
get_user_id ( string $context = 'view' ) : integer Get user id.
offsetExists ( string $offset ) : boolean offsetExists
offsetGet ( string $offset ) : mixed offsetGet
offsetSet ( string $offset, mixed $value ) offsetSet
offsetUnset ( string $offset ) offsetUnset
save ( ) : integer Save data to the database.
set_access_expires ( integer $timestamp ) Get access_expires.
set_access_granted ( integer $timestamp ) Get access_granted.
set_download_count ( integer $value ) Get download_count.
set_download_id ( string $value ) Set download id.
set_downloads_remaining ( integer $value ) Get downloads_remaining.
set_order_id ( integer $value ) Get order_id.
set_order_key ( string $value ) Get order_key.
set_product_id ( integer $value ) Set product id.
set_user_email ( integer $value ) Get user_email.
set_user_id ( integer $value ) Get user id.

Méthodes protégées

Méthode Description
get_hook_prefix ( ) : string Prefix for action and filter hooks on data.

Method Details

__construct() public méthode

Constructor.
public __construct ( integer | object | array $download )
$download integer | object | array

get_access_expires() public méthode

Get access_expires.
public get_access_expires ( string $context = 'view' ) : integer
$context string
Résultat integer

get_access_granted() public méthode

Get access_granted.
public get_access_granted ( string $context = 'view' ) : integer
$context string
Résultat integer

get_download_count() public méthode

Get download_count.
public get_download_count ( string $context = 'view' ) : integer
$context string
Résultat integer

get_download_id() public méthode

Get download id.
public get_download_id ( string $context = 'view' ) : string
$context string
Résultat string

get_downloads_remaining() public méthode

Get downloads_remaining.
public get_downloads_remaining ( string $context = 'view' ) : integer
$context string
Résultat integer

get_hook_prefix() protected méthode

Prefix for action and filter hooks on data.
Since: 2.7.0
protected get_hook_prefix ( ) : string
Résultat string

get_order_id() public méthode

Get order_id.
public get_order_id ( string $context = 'view' ) : integer
$context string
Résultat integer

get_order_key() public méthode

Get order_key.
public get_order_key ( string $context = 'view' ) : string
$context string
Résultat string

get_product_id() public méthode

Get product id.
public get_product_id ( string $context = 'view' ) : integer
$context string
Résultat integer

get_user_email() public méthode

Get user_email.
public get_user_email ( string $context = 'view' ) : string
$context string
Résultat string

get_user_id() public méthode

Get user id.
public get_user_id ( string $context = 'view' ) : integer
$context string
Résultat integer

offsetExists() public méthode

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

offsetGet() public méthode

offsetGet
public offsetGet ( string $offset ) : mixed
$offset string
Résultat mixed

offsetSet() public méthode

offsetSet
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed

offsetUnset() public méthode

offsetUnset
public offsetUnset ( string $offset )
$offset string

save() public méthode

Save data to the database.
Since: 2.7.0
public save ( ) : integer
Résultat integer Item ID

set_access_expires() public méthode

Get access_expires.
public set_access_expires ( integer $timestamp )
$timestamp integer

set_access_granted() public méthode

Get access_granted.
public set_access_granted ( integer $timestamp )
$timestamp integer

set_download_count() public méthode

Get download_count.
public set_download_count ( integer $value )
$value integer

set_download_id() public méthode

Set download id.
public set_download_id ( string $value )
$value string

set_downloads_remaining() public méthode

Get downloads_remaining.
public set_downloads_remaining ( integer $value )
$value integer

set_order_id() public méthode

Get order_id.
public set_order_id ( integer $value )
$value integer

set_order_key() public méthode

Get order_key.
public set_order_key ( string $value )
$value string

set_product_id() public méthode

Set product id.
public set_product_id ( integer $value )
$value integer

set_user_email() public méthode

Get user_email.
public set_user_email ( integer $value )
$value integer

set_user_id() public méthode

Get user id.
public set_user_id ( integer $value )
$value integer

Property Details

$data protected_oe property

Download Data array.
Since: 2.7.0
protected array $data
Résultat array