Answers for "woocommerce product gallery size"

0

auto images size of woocommerce products

@media (min-width: 768px) {
    .inside-wc-product-image {
        width: 100%;
    }
    .woocommerce ul.products li.product a img {
        height: 200px; /* adjust height */
        object-fit: cover;
    }
}
Posted by: Guest on November-26-2020
0

Woocommerce get image galleries by product id

<?php
    $product_id = '14';
    $product = new WC_product($product_id);
    $attachment_ids = $product->get_gallery_image_ids();

    foreach( $attachment_ids as $attachment_id ) 
        {
          // Display the image URL
          echo $Original_image_url = wp_get_attachment_url( $attachment_id );

          // Display Image instead of URL
          echo wp_get_attachment_image($attachment_id, 'full');

        }
?>
Posted by: Guest on August-04-2021

Code answers related to "woocommerce product gallery size"

Code answers related to "Objective-C"

Browse Popular Code Answers by Language