• Resolved donatasok

    (@donatasok)


    Hi,

    Can someone give me a code to remove image of a product only in checkout page?

    Thank you !

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey, I just did something similar this morning. I changed the image to the image from my envira gallery. this is the snippet of code that did the changing, you might be able to tweak it to your needs!

    add_filter( ‘woocommerce_cart_item_thumbnail’, ‘envira_woocommerce_cart_item_thumbnail’, 5, 3 );
    function envira_woocommerce_cart_item_thumbnail( $image_url, $cart_item, $cart_key ) {
    if ( isset( $cart_item[‘envira_woocommerce_image_id’] ) ) {
    $envira_image_id = $cart_item[‘envira_woocommerce_image_id’];
    return ‘‘;
    } else {
    return $image_url;
    }
    }

    the full documentation for this method is here, but I believe this is the general block of code (plus some tweaks) that you’ll be needing

    https://enviragallery.com/docs/how-to-customize-woocommerce-envira-galleries/

    Hi @donatasok

    Please note that this forum is intended to provide support for the default functionality of the WooCommerce core plugin, and providing custom codes falls outside our scope of support.

    That said, if the suggestion above from @jdawwgy doesn’t work, I’d recommend that you try to remove the image with some custom CSS, under Appearance ? Customize ? Additional CSS, using the display:none property / value pair.
    More info about custom CSS here:
    https://wordpress.com/support/editing-css/

    And for continued support with customizations, I recommend hiring a developer or one of the customization experts listed here:
    https://woocommerce.com/customizations/

    Best

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, the above info was helpful.

    If you have further questions, please feel free to open a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove thumbnail product image’ is closed to new replies.