WC_Product_Download::get_file_extension()publicWC 1.0

Get file extension.

Method of the class: WC_Product_Download{}

No Hooks.

Return

String.

Usage

$WC_Product_Download = new WC_Product_Download();
$WC_Product_Download->get_file_extension();

WC_Product_Download::get_file_extension() code WC 8.7.0

public function get_file_extension() {
	$parsed_url = wp_parse_url( $this->get_file(), PHP_URL_PATH );
	return pathinfo( $parsed_url, PATHINFO_EXTENSION );
}