I am fetching data from API about 800 products are fetching across 200 categories all is done but in fetching feature images i am getting error i need to set URL of product thumbnail as featured image.
Let me explain this in detail:
I have develop plugin to fetch data from API through CURL all is done perfectly but product images are fetching as URL due to this i need to set these url as product featured image when is use WordPress given function wp_handle_sideload() it try to download from the API image links and due to huge import it show error with “Status 4” along with current page html.
Any hint will be very helpful.
I also use wp_insert_attachment function but there is still same error.