This code retrieves the first image from a product image gallery, and then outputs the image URL. The product image gallery is retrieved from the post meta, and is then split into individual IDs, which are used to get the first image URL from the WordPress attachment library. Finally, the URL is outputted.
Was this code snippet helpful?
YesNo