Home > front end >  Problem in use WordPress Media Library image URL to upload with wc_rest_upload_image_from_url
Problem in use WordPress Media Library image URL to upload with wc_rest_upload_image_from_url

Time:04-25

When I use wc_rest_upload_image_from_url and add an image url from wordpress media library e.g. .../wp-content/uploads/2022/04... I get following error:

woocommerce_rest_invalid_remote_image_url

Unauthorized

Error Status 400

CodePudding user response:

The URL provided is htpasswd protected - you cannot use it inside wc_rest_upload_image_from_url() function - ( Unauthorized Access ).

  • Related