WC_Admin_Upload_Downloadable_Product
in package
WC_Admin_Upload_Downloadable_Product Class.
Table of Contents
- __construct() : mixed
- Add hooks.
- unique_filename() : string
- Change filename to append random text.
- update_filename() : string
- Change filename for WooCommerce uploads and prepend unique chars for security.
- upload_dir() : array<string|int, mixed>
- Change upload dir for downloadable files.
- woocommerce_media_upload_downloadable_product() : mixed
- Run a filter when uploading a downloadable product.
Methods
__construct()
Add hooks.
public
__construct() : mixed
Return values
mixed —unique_filename()
Change filename to append random text.
public
unique_filename(string $full_filename, string $ext) : string
Parameters
- $full_filename : string
-
Original filename with extension.
- $ext : string
-
Extension.
Return values
string — Modified filename.update_filename()
Change filename for WooCommerce uploads and prepend unique chars for security.
public
update_filename(string $full_filename, string $ext, string $dir) : string
Parameters
- $full_filename : string
-
Original filename.
- $ext : string
-
Extension of file.
- $dir : string
-
Directory path.
Tags
Return values
string — New filename with unique hash.upload_dir()
Change upload dir for downloadable files.
public
upload_dir(array<string|int, mixed> $pathdata) : array<string|int, mixed>
Parameters
- $pathdata : array<string|int, mixed>
-
Array of paths.
Return values
array<string|int, mixed> —woocommerce_media_upload_downloadable_product()
Run a filter when uploading a downloadable product.
public
woocommerce_media_upload_downloadable_product() : mixed