To add images to Woocommerce checkout just add the following code to your functions.php file:

Reading Time: 0 min.

Adding product images to Woocommerce checkout

To add images to Woocommerce checkout just add the following code to your functions.php file:

// Adding product images to Woocommerce checkout
add_filter('woocommerce_cart_item_name', 'fa_add_checkout_product_thumbnail', 10, 3);
function fa_add_checkout_product_thumbnail($product_name, $cart_item, $cart_item_key) {
    if (is_checkout()) {
        $product = $cart_item['data'];
        $thumbnail = $product->get_image(array(50, 50)); // Change the value to 50 if you want to change the thumbnail size.
        $product_name = $thumbnail . ' ' . $product_name;
    }
    return $product_name;
}

Related posts

Improving the Bricks Builder Color Palette

Reading Time: 1 min.

In this post, we’ll explore how to improve the visibility of the Bricks Builder color palette using CSS.

Leer artículo
Sticky sidebar | Floating column - Bricks Builder

Sticky sidebar | Floating column – Bricks Builder

Reading Time: 2 min.

In this post I will show you how to create a sticky sidebar in the right way, no more hiding…

Leer artículo
Automatic FAQ Schema for Bricks Builder

Create an automatic FAQ Schema for an Nestable Accordion

Reading Time: 1 min.

I was looking for how to create a Squema type FAQ in Bricks with a nestable accordion but I didn’t…

Leer artículo