Skip to content

Only check DOING_AJAX for AJAX requests #4767

Merged
merged 1 commit into from Feb 13, 2014
View
5 includes/wc-conditional-functions.php
@@ -206,10 +206,7 @@ function is_add_payment_method_page() {
* @return bool
*/
function is_ajax() {
- if ( defined('DOING_AJAX') )
- return true;
-
- return ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) == 'xmlhttprequest' ) ? true : false;
+ return defined( 'DOING_AJAX' );
}
}
Something went wrong with that request. Please try again.