woocommerce_api_request_url
Filter to adjust the url of an incoming API request.
Использование
add_filter( 'woocommerce_api_request_url', 'wp_kama_woocommerce_api_request_url_filter', 10, 3 ); /** * Function for `woocommerce_api_request_url` filter-hook. * * @param $api_request_url * @param $request * @param $ssl * * @return */ function wp_kama_woocommerce_api_request_url_filter( $api_request_url, $request, $ssl ){ // filter... return $api_request_url; }
- $api_request_url
- -
- $request
- -
- $ssl
- -
Где вызывается хук
woocommerce_api_request_url
woocommerce/includes/class-woocommerce.php 995
return esc_url_raw( apply_filters( 'woocommerce_api_request_url', $api_request_url, $request, $ssl ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment