Hey @kevinsmith0214,
How can I avoid this so that only 1 request is made?
It’s likely that WP All Import is pinging the feed a second time to try to get the feed type. Try adding this code to your child theme’s functions.php file:
add_filter( 'wp_all_import_curl_download_only', 'wpai_wp_all_import_curl_download_only', 10, 1 );
function wpai_wp_all_import_curl_download_only( $download_only ){
return true;
}
add_filter('wp_all_import_feed_type', 'wpai_wp_all_import_feed_type', 10, 2);
function wpai_wp_all_import_feed_type($feed_type, $url) {
if ($url == 'https://example.com/feed') {
return 'json';
}
return $feed_type;
}
add_filter('http_request_timeout', 'wpai_http_request_timeout', 10, 2);
function wpai_http_request_timeout($timeout, $url) {
return 60;
}
Make sure to change ‘https://example.com/feed’ and ‘json’ to your feed URL and the feed type (like ‘csv’ or ‘xml’).
Let me know how it goes.