WooCommerce Checkout page customization [closed]

To add the product image to the checkout review order page, you want to add the following into your functions.php file of your theme.

function my_add_order_review_product_image( $product, $product_obj ) {
    $image = wp_get_attachment_image( get_post_thumbnail_id( $product_obj->post->ID ), 'shop_thumbnail' );

    return $image . $product;
}

 add_filter( 'woocommerce_checkout_product_title', 'my_add_order_review_product_image', 10, 2 );

This is utilizing the filter hook that is present in order reviews file template of WooCommerce.

Leave a Comment

tech