PluginProbe
Datafeedr API / 1.4.3
Datafeedr API v1.4.3
1.4.3 1.4.2 1.0.125 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.3 1.0.30 1.0.31 1.0.32 All 182 releases
← All changes | hooks/admin/merchants.php +7 -3 1.4.2 → 1.4.3 View file →
@@ -59,13 +59,17 @@
59 59 );
60 60 }
61 61
62 62 $url = sprintf(
63 - 'https://api.awin.com/publishers/%1$s/programmes?relationship=joined&accessToken=%2$s',
64 - $affiliate_id, $awin_access_token
63 + 'https://api.awin.com/publishers/%1$s/programmes?relationship=joined',
64 + rawurlencode( $affiliate_id )
65 65 );
66 66
67 - $response = wp_remote_get( $url, [ 'timeout' => 15 ] );
67 + // Send the token in a header so it isn't written to proxy and server access logs.
68 + $response = wp_remote_get( $url, [
69 + 'timeout' => 15,
70 + 'headers' => [ 'Authorization' => 'Bearer ' . $awin_access_token ],
71 + ] );
68 72 $code = (int) wp_remote_retrieve_response_code( $response );
69 73
70 74 if ( ! is_wp_error( $response ) && 200 === $code ) {
71 75 $programs = json_decode( wp_remote_retrieve_body( $response ), true );