I'm using WP All Import to download images from an API or XML source. When I try, I get a "File cannot be saved locally" error, along with cURL error 22 and HTTP 403. How can I set custom cURL headers in WP All Import to bypass this?
// Sample code illustrating the WP All Import setup
add_action('pmxi_before_post_import', 'custom_curl_headers');
function custom_curl_headers($import_id) {
// How to set custom cURL headers here?
}