mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-01 11:52:25 +08:00
8 lines
388 B
Text
8 lines
388 B
Text
add_filter( 'woocommerce_cart_item_name', 'wc_product_image_review_order_checkout', 9999, 3 );
|
|
|
|
function wc_product_image_review_order_checkout( $name, $cart_item, $cart_item_key ) {
|
|
if ( ! is_checkout() ) return $name;
|
|
$product = $cart_item['data'];
|
|
$thumbnail = $product->get_image( array( '50', '50' ), array( 'class' => 'alignleft' ) );
|
|
return $thumbnail . $name;
|
|
}
|