Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_AJAX::wc_ajax_headers()
Send headers for WC Ajax Requests.
Description Description
Source Source
File: includes/class-wc-ajax.php
60 61 62 63 64 65 66 67 68 69 70 71 72 | private static function wc_ajax_headers() { if ( ! headers_sent() ) { send_origin_headers(); send_nosniff_header(); wc_nocache_headers(); header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); header( 'X-Robots-Tag: noindex' ); status_header( 200 ); } elseif ( Constants::is_true( 'WP_DEBUG' ) ) { headers_sent( $file , $line ); trigger_error( "wc_ajax_headers cannot set headers - headers already sent by {$file} on line {$line}" , E_USER_NOTICE ); // @codingStandardsIgnoreLine } } |
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |