Issue displaying the product image in WooCommerce My Account view order pages
I use Add the product image to Woocommerce my account order view answer code, to see the product image in WooCommerce My Account view order pages, but I only encounter a problem on the frontend side.
I use this code to see the product image in woocommerce my-account/view-order/ but I only encounter a problem on the customer side
// Display the product thumbnail in order view pages add_filter( ‘woocommerce_order_item_name’, ‘display_product_image_in_order_item’, 20, 3 ); function display_product_image_in_order_item( $item_name, $item, $is_visible ) { // Targeting view order pages only if( is_wc_endpoint_url( ‘view-order’ ) ) { $product = $item->get_product(); // Get the WC_Product object (from order item) $thumbnail = $product->get_image(array( 36, 36)); // Get the product thumbnail […]