I am trying to add images using the Woo Commerce API, but I am getting an error:
"A valid URL was not provided. [woocommerce_product_image_upload_error]"
My link has got the port on the address... is that the problem?
The Woocommerce API validates URLs using the wp_http_validate_url method.
Among other things, it does check for the port number in the URL and only allows ports 80, 443 and 8080.
You can change the allowed ports using the http_allowed_safe_ports filter.
Here's an example snippet you can use for changing the allowed ports:
add_filter("http_allowed_safe_ports", "custom_allowed_ports");
function custom_allowed_ports($ports){
$ports = [80, 443, 8080, 3000];
return $ports;
}