Merged in feature/280-dev-dev01 (pull request #21)
auto-patch 280-dev-dev01-2024-01-19T16_41_58 * auto-patch 280-dev-dev01-2024-01-19T16_41_58
This commit is contained in:
@@ -302,7 +302,9 @@ abstract class WC_Product_Importer implements WC_Importer_Interface {
|
||||
protected function set_image_data( &$product, $data ) {
|
||||
// Image URLs need converting to IDs before inserting.
|
||||
if ( isset( $data['raw_image_id'] ) ) {
|
||||
$product->set_image_id( $this->get_attachment_id_from_url( $data['raw_image_id'], $product->get_id() ) );
|
||||
$attachment_id = $this->get_attachment_id_from_url( $data['raw_image_id'], $product->get_id() );
|
||||
$product->set_image_id( $attachment_id );
|
||||
wc_product_attach_featured_image( $attachment_id, $product );
|
||||
}
|
||||
|
||||
// Gallery image URLs need converting to IDs before inserting.
|
||||
|
||||
Reference in New Issue
Block a user