1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00

Added check for image data

This commit is contained in:
Ivan Chaplygin 2024-09-20 12:07:10 +03:00
parent 9413e73c7f
commit 67a0a4a653

View file

@ -191,7 +191,11 @@ if (!class_exists('WC_Retailcrm_Icml')) :
$images = [];
foreach ($idImages as $id) {
$images[] = wp_get_attachment_image_src($id, 'full')[0];
$attachmentImageSrc = wp_get_attachment_image_src($id, 'full');
if (is_array($attachmentImageSrc) && isset($attachmentImageSrc[0])) {
$images[] = $attachmentImageSrc[0];
}
}
$termList = $parent !== false