O
O
obemgcabazn2018-06-13 17:24:53
WooCommerce
obemgcabazn, 2018-06-13 17:24:53

How to change thumbnail size in woocommerce cart through filter?

Good afternoon!
The thumbnails in the basket have their own size, which I registered with the code

add_image_size( 'my_cart_image_size', 60, 60, false );

Now I want to pass this size through a filter that outputs thumbnails in cart.php:
apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );

It is necessary that the get_image() function be called with the parameter - get_image( 'my_cart_image_size' );
Can a filter be used for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Way, 2018-06-14
@obemgcabazn

Alternatively, insert a filter and try

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question