Forum Replies Created

Viewing 1 replies (of 1 total)
  • Had the same issue so I blocked the call in my theme’s function.php file. Not sure why it needs to call for the banner and stories on every page load but both API calls halted the admin panel for 20 seconds since they each have a timeout of 10 seconds

    function block_wpmet_api_call( $preempt, $args, $url ) {
    $api = "https://api.wpmet.com/public/";

    // Block stories API call
    if (strpos($url, $api . 'stories/cache/stories.json') !== false ) {
    return new WP_Error('http_request_not_executed');
    }
    // Block banner API call
    if (strpos($url, $api . 'jhanda/cache/elementskit-lite.json') !== false ) {
    return new WP_Error('http_request_not_executed');
    }
    return $preempt;
    }
    add_filter('pre_http_request', 'block_wpmet_api_call', 10, 3);
    • This reply was modified 2 months, 2 weeks ago by Geekxboy. Reason: Updated the code to be a little more specific since there are other API calls that are necessary after the developer fixes their API server
Viewing 1 replies (of 1 total)