woocommerce_log_legacy_rest_api_usages
woocommerce_log_legacy_rest_api_usages
Appears in: woocommerce.8.5.1, woocommerce.8.5.2, woocommerce.8.6.0, woocommerce.8.6.1, woocommerce.8.7.0, woocommerce.8.8.3, woocommerce.8.9.2, woocommerce.8.9.3
Hook Type: filter
Displaying hooks found in version: woocommerce.8.9.3apply_filters('woocommerce_log_legacy_rest_api_usages') is found 1 times:
- /includes/legacy/class-wc-legacy-api.php line 116
* @param bool $do_logging True to enable the logging of all the Legacy REST API usages (default), false to disable. * * @since 8.5.0 */ if ( apply_filters( 'woocommerce_log_legacy_rest_api_usages', true ) ) { $user_agent = sanitize_text_field( wp_unslash( $user_agent ) ); $route = sanitize_text_field( wp_unslash( $route ) ); $info = 'Version: ' . WC_API_REQUEST_VERSION . ", Route: $route, User agent: $user_agent"; $ip_address = WC_Geolocation::get_ip_address(); if( '' !== $ip_address ) { $info .= ", IP: $ip_address";