WC_Download_Handler::get_content_disposition
- Get selected content disposition
- Defaults to attachment if
woocommerce_downloads_deliver_inlinesetting is not selected. - @return string Content disposition value.
Method of the class: WC_Download_Handler{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Download_Handler::get_content_disposition() : string;
WC_Download_Handler::get_content_disposition() WC Download Handler::get content disposition code WC 10.5.0
private static function get_content_disposition() : string {
$disposition = 'attachment';
if ( 'yes' === get_option( 'woocommerce_downloads_deliver_inline' ) ) {
$disposition = 'inline';
}
return $disposition;
}