plugin updates

This commit is contained in:
Tony Volpe
2024-02-21 16:19:46 +00:00
parent c72f206574
commit 21d4c85c00
1214 changed files with 102269 additions and 179257 deletions

View File

@@ -114,7 +114,14 @@ class WC_Legacy_API {
* @since 8.5.0
*/
if ( apply_filters( 'woocommerce_log_legacy_rest_api_usages', true ) ) {
wc_get_logger()->info( 'Version: ' . WC_API_REQUEST_VERSION . ", Route: $route, User agent: $user_agent", array( 'source' => 'legacy_rest_api_usages' ) );
$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";
}
wc_get_logger()->info( $info, array( 'source' => 'legacy_rest_api_usages' ) );
}
}