Partially revert #31113
This commit reverts the deprecation if `is_ajax` that occurred in #31113. It leaves beind the changes to use the native function `wp_doing_ajax` instead.
This commit is contained in:
parent
c9696e66b9
commit
d39bd0eb54
|
@ -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' ) ) {
|
if ( ! function_exists( 'is_store_notice_showing' ) ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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' );
|
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 );
|
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' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue