WC_Download_Handler::get_content_disposition()private staticWC 1.0

  • Get selected content disposition
  • Defaults to attachment if woocommerce_downloads_deliver_inline setting is not selected.
  • @return string Content disposition value.

Method of the class: WC_Download_Handler{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Download_Handler::get_content_disposition() : string;

WC_Download_Handler::get_content_disposition() code WC 9.4.2

private static function get_content_disposition() : string {
	$disposition = 'attachment';
	if ( 'yes' === get_option( 'woocommerce_downloads_deliver_inline' ) ) {
		$disposition = 'inline';
	}
	return $disposition;
}