Huráá, máme novou chladící dopravu a doručujeme celoročně!

/* * Snippet: How to Add a Second Product Image to WooCommerce Shop Pages – 2024 * Author: John Cook * URL: https://wcsuccessacademy.com/?p=1357 * Tested with WooCommerce 9.3.3 * "Add secondary product image to WooCommerce loop" */ add_action('woocommerce_before_shop_loop_item_title', 'wcsuccess_display_secondary_product_image', 10); function wcsuccess_display_secondary_product_image() { global $product; $attachment_ids = $product->get_gallery_image_ids(); if ($attachment_ids && isset($attachment_ids[0])) { $secondary_image_id = $attachment_ids[0]; $secondary_image_src = wp_get_attachment_image_src($secondary_image_id, 'woocommerce_thumbnail')[0]; echo 'Secondary product image'; } }