Replace the product name by the Sku in My account view order pages
问题 Using Woocommerce, I would like to add SKU instead of the product name in the order view page of My Account /my-account/view-order/[orderid]/ I am able to add the SKU with a link using the code below. The SKU is displayed just after the product name on the same line. add_filter( 'woocommerce_order_item_name', 'display_sku_in_order_item', 20, 3 ); function display_sku_in_order_item( $item_name, $item, $is_visible ) { if( is_wc_endpoint_url( 'view-order' ) ) { $product = $item->get_product();