WC_Download_Handler::get_content_disposition()
- 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() 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; }