Currently the function will complete with out problems via a button on the admin side / plugin folder.
Products information updates as expected but the image fails only via Cron, Throwing internal error:
$image_url = wc_rest_upload_image_from_url( $pic_url_r,$pro_id);
$image_id1 = wc_rest_set_uploaded_image_as_attachment($image_url, $pro_id);
The Error : Uncaught Error: Cannot use object of type WP_Error as array in /home/public_html/wp-content/plugins/woocommerce/includes/wc-rest-functions.php:135
thrown in /home/public_html/wp-content/plugins/woocommerce/includes/wc-rest-functions.php on line 135
The error lands at function:
function wc_rest_set_uploaded_image_as_attachment?
Thanks
I would like some insight on how to handles such issues and get more of an understanding on the error
Admin Grocorp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.