From eab77938c0a7975febe84d60249a79e2f82f9aa5 Mon Sep 17 00:00:00 2001 From: Abdalsalaam Halawa Date: Thu, 20 Apr 2023 17:29:35 +0200 Subject: [PATCH] Add order note as a list of products --- plugins/woocommerce/src/Checkout/Helpers/ReserveStock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/src/Checkout/Helpers/ReserveStock.php b/plugins/woocommerce/src/Checkout/Helpers/ReserveStock.php index 971c6e22ded..b3ea924a631 100644 --- a/plugins/woocommerce/src/Checkout/Helpers/ReserveStock.php +++ b/plugins/woocommerce/src/Checkout/Helpers/ReserveStock.php @@ -115,7 +115,7 @@ final class ReserveStock { $item_quantity = apply_filters( 'woocommerce_order_item_quantity', $item->get_quantity(), $order, $item ); $rows[ $managed_by_id ] = isset( $rows[ $managed_by_id ] ) ? $rows[ $managed_by_id ] + $item_quantity : $item_quantity; - $held_stock_notes[] = $product->get_formatted_name() . ' : ' . $rows[ $managed_by_id ]; + $held_stock_notes[] = $product->get_formatted_name() . ' x ' . $rows[ $managed_by_id ]; } if ( ! empty( $rows ) ) { @@ -131,7 +131,7 @@ final class ReserveStock { // Add order note after successfully holding the stock. if ( ! empty( $held_stock_notes ) ) { // translators: %s is a time in minutes - $order->add_order_note( sprintf( __( 'Stock is held for %s minutes for payment:', 'woocommerce' ), $minutes ) . ' ' . implode( ', ', $held_stock_notes ) ); + $order->add_order_note( sprintf( __( 'Stock is held for %s minutes for payment:', 'woocommerce' ), $minutes ) . '
- ' . implode( '
- ', $held_stock_notes ) ); } }