is_ajax()
Is_ajax - Returns true when the page is loaded via ajax.
No Hooks.
Returns
true|false.
Usage
is_ajax();
Notes
- See: wp_doing_ajax() for an equivalent function provided by WordPress since 4.7.0
is_ajax() is ajax code WC 10.8.1
function is_ajax() {
return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : Constants::is_defined( 'DOING_AJAX' );
}