WC_Product_Download::get_file_extension
Get file extension.
Method of the class: WC_Product_Download{}
No Hooks.
Returns
String.
Usage
$WC_Product_Download = new WC_Product_Download(); $WC_Product_Download->get_file_extension();
WC_Product_Download::get_file_extension() WC Product Download::get file extension code WC 10.8.1
public function get_file_extension() {
$parsed_url = wp_parse_url( $this->get_file(), PHP_URL_PATH );
return pathinfo( $parsed_url, PATHINFO_EXTENSION );
}