Commit 52833336702 for woocommerce

commit 52833336702b799e334d0292e3130163012a3a17
Author: Ricardo Sawir <37329575+sawirricardo@users.noreply.github.com>
Date:   Thu Jun 18 19:21:24 2026 +0700

    Fix PHP 8.5 deprecation: null array offset in html-order-items.php (#65706)

diff --git a/plugins/woocommerce/changelog/65706-fix-order-items-null-tax-rate-id b/plugins/woocommerce/changelog/65706-fix-order-items-null-tax-rate-id
new file mode 100644
index 00000000000..d8211d02fdf
--- /dev/null
+++ b/plugins/woocommerce/changelog/65706-fix-order-items-null-tax-rate-id
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Prevent PHP 8.5 deprecation notices when an order tax item has no matching tax rate.
diff --git a/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php b/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php
index 1c2160da276..64d673a6acc 100644
--- a/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php
+++ b/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php
@@ -52,7 +52,7 @@ if ( wc_tax_enabled() ) {
 				<?php
 				if ( ! empty( $order_taxes ) ) :
 					foreach ( $order_taxes as $tax_id => $tax_item ) :
-						$tax_class      = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
+						$tax_class      = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] ?? 0 ) ?? '';
 						$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
 						$column_label   = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
 						/* translators: %1$s: tax item name %2$s: tax class name  */