diff --git a/plugins/woocommerce/includes/wc-conditional-functions.php b/plugins/woocommerce/includes/wc-conditional-functions.php index 1cb0cca5bad..070ec53b686 100644 --- a/plugins/woocommerce/includes/wc-conditional-functions.php +++ b/plugins/woocommerce/includes/wc-conditional-functions.php @@ -256,6 +256,18 @@ if ( ! function_exists( 'is_lost_password_page' ) ) { } } +if ( ! function_exists( 'is_ajax' ) ) { + + /** + * Is_ajax - Returns true when the page is loaded via ajax. + * + * @return bool + */ + function is_ajax() { + return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : Constants::is_defined( 'DOING_AJAX' ); + } +} + if ( ! function_exists( 'is_store_notice_showing' ) ) { /** diff --git a/plugins/woocommerce/includes/wc-deprecated-functions.php b/plugins/woocommerce/includes/wc-deprecated-functions.php index fe195c292a5..71c00b38513 100644 --- a/plugins/woocommerce/includes/wc-deprecated-functions.php +++ b/plugins/woocommerce/includes/wc-deprecated-functions.php @@ -1123,17 +1123,3 @@ function get_woocommerce_term_meta( $term_id, $key, $single = true ) { wc_deprecated_function( 'get_woocommerce_term_meta', '3.6', 'get_term_meta' ); return function_exists( 'get_term_meta' ) ? get_term_meta( $term_id, $key, $single ) : get_metadata( 'woocommerce_term', $term_id, $key, $single ); } - -if ( ! function_exists( 'is_ajax' ) ) { - - /** - * Is_ajax - Returns true when the page is loaded via ajax. - * - * @deprecated 6.1.0 - * @return bool - */ - function is_ajax() { - wc_deprecated_function( 'is_ajax', '6.1.0', 'wp_doing_ajax' ); - return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : Constants::is_defined( 'DOING_AJAX' ); - } -}