WooCommerce Code Reference

WC_Product_Download
in package
implements ArrayAccess

Product download class.

Interfaces, Classes and Traits

ArrayAccess

Table of Contents

$data  : array
Data array.
file_exists()  : bool
Validate file exists.
get_allowed_mime_types()  : array
Get allowed mime types.
get_data()  : array
Returns all data for this object.
get_file()  : string
Get file.
get_file_extension()  : string
Get file extension.
get_file_type()  : string
Get file type.
get_id()  : string
Get id.
get_name()  : string
Get name.
get_previous_hash()  : string
Get previous_hash.
get_type_of_file_path()  : string
Get type of file path set.
is_allowed_filetype()  : bool
Check if file is allowed.
offsetExists()  : bool
OffsetExists.
offsetGet()  : mixed
OffsetGet.
offsetSet()  : mixed
OffsetSet.
offsetUnset()  : mixed
OffsetUnset.
set_file()  : mixed
Set file.
set_id()  : mixed
Set ID.
set_name()  : mixed
Set name.
set_previous_hash()  : mixed
Set previous_hash.

Properties

Methods

get_previous_hash()

Get previous_hash.

public get_previous_hash() : string
Tags
deprecated
3.3.0

No longer using filename based hashing to keep track of files.

Return values
string

get_type_of_file_path()

Get type of file path set.

public get_type_of_file_path([string $file_path = '' ]) : string
Parameters
$file_path : string = ''

optional.

Return values
stringabsolute, relative, or shortcode.

offsetSet()

OffsetSet.

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

Offset.

$value : mixed

Offset value.

Return values
mixed

set_previous_hash()

Set previous_hash.

public set_previous_hash(string $value) : mixed
Parameters
$value : string

Previous hash.

Tags
deprecated
3.3.0

No longer using filename based hashing to keep track of files.

Return values
mixed