woocommerce_is_rest_api_request
Whether this is a REST API request.
Usage
add_filter( 'woocommerce_is_rest_api_request', 'wp_kama_woocommerce_is_rest_api_request_filter' ); /** * Function for `woocommerce_is_rest_api_request` filter-hook. * * @param $is_rest_api_request * * @return */ function wp_kama_woocommerce_is_rest_api_request_filter( $is_rest_api_request ){ // filter... return $is_rest_api_request; }
- $is_rest_api_request
- -
Changelog
Since 3.6.0 | Introduced. |
Where the hook is called
woocommerce_is_rest_api_request
woocommerce/includes/class-woocommerce.php 524
return apply_filters( 'woocommerce_is_rest_api_request', $is_rest_api_request );