WC_Download_Handler::init │ public static │ WC 1.0

Hook in methods.

Метод класса: WC_Download_Handler{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WC_Download_Handler::init();

Код WC_Download_Handler::init() WC 11.3.0

public static function init() {
	if ( isset( $_GET['download_file'], $_GET['order'] ) && ( isset( $_GET['email'] ) || isset( $_GET['uid'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Emailed download links are bearer URLs; download_product() verifies the order key and email hash.
		add_action( 'init', array( __CLASS__, 'download_product' ) );
	}
	add_action( 'woocommerce_download_file_redirect', array( __CLASS__, 'download_file_redirect' ), 10, 2 );
	add_action( 'woocommerce_download_file_xsendfile', array( __CLASS__, 'download_file_xsendfile' ), 10, 2 );
	add_action( 'woocommerce_download_file_force', array( __CLASS__, 'download_file_force' ), 10, 2 );
	add_action( self::TRACK_DOWNLOAD_CALLBACK, array( __CLASS__, 'track_download' ), 10, 3 );
}