Merge pull request #31672 from woocommerce/update/partially-revert-31113
Partially revert #31113 `is_ajax` deprecation.
This commit is contained in:
commit
5239cf62e7
|
@ -256,6 +256,19 @@ if ( ! function_exists( 'is_lost_password_page' ) ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'is_ajax' ) ) {
|
||||
|
||||
/**
|
||||
* Is_ajax - Returns true when the page is loaded via ajax.
|
||||
*
|
||||
* @see wp_doing_ajax() for an equivalent function provided by WordPress since 4.7.0
|
||||
* @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' ) ) {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue