Plugin Directory

Changeset 3382485


Ignore:
Timestamp:
10/22/2025 09:56:22 AM (6 months ago)
Author:
jumptech
Message:

check if custom vendor list is correctly downloaded before processing blacklist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • avacy/trunk/src/PreemptiveBlock.php

    r3315332 r3382485  
    3333
    3434        $url = 'https://assets.avacy-cdn.com/config/' . $tenant . '/' . $webSpaceKey . '/custom-vendor-list.json';
    35         // $url = 'https://avacy-cdn.s3.eu-central-1.amazonaws.com/config/test-production/90990663-c953-493f-9311-97aeef0833dc/custom-vendor-list.json';
    3635        $customVendorListRequest = wp_remote_get($url);
    3736
    38         if($customVendorListRequest['response']['code'] === 200) {
     37        if(!is_wp_error($customVendorListRequest) && $customVendorListRequest['response']['code'] === 200) {
    3938            $vendors = json_decode($customVendorListRequest['body'], true)['vendors'];
    4039           
Note: See TracChangeset for help on using the changeset viewer.