Commit 195349efb6d for woocommerce

commit 195349efb6d9c86df5cadb706a8a5047d602eef2
Author: SH Sajal Chowdhury <72102985+shsajalchowdhury@users.noreply.github.com>
Date:   Wed Apr 29 01:04:41 2026 +0600

    Fix: De-duplicate tfoot in order-details.php template (#64358)

    * Fix: De-duplicate tfoot in order-details.php template

    Merge two separate <tfoot> elements into a single valid <tfoot> block.
    The HTML spec states only one <tfoot> is allowed per table.

    The actions row (conditional on ) is now placed inside the
    main tfoot, before the order item totals.

    Fixes #60086

    Co-authored-by: SH Sajal Chowdhury <sajal.marketer@gmail.com>

    * Bump template version to 10.8.0 per CodeRabbit feedback

    * Add changelog entry

    * Fix order details footer row order and bump template version

    * Update plugins/woocommerce/changelog/pr-64358

    Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

    ---------

    Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

diff --git a/plugins/woocommerce/changelog/pr-64358 b/plugins/woocommerce/changelog/pr-64358
new file mode 100644
index 00000000000..0efb495baf8
--- /dev/null
+++ b/plugins/woocommerce/changelog/pr-64358
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Remove duplicate tfoot elements in the My Account order details template.
diff --git a/plugins/woocommerce/templates/order/order-details.php b/plugins/woocommerce/templates/order/order-details.php
index a52740590b0..a897fe36ecc 100644
--- a/plugins/woocommerce/templates/order/order-details.php
+++ b/plugins/woocommerce/templates/order/order-details.php
@@ -12,7 +12,7 @@
  *
  * @see     https://woocommerce.com/document/template-structure/
  * @package WooCommerce\Templates
- * @version 10.1.0
+ * @version 10.9.0
  *
  * @var bool $show_downloads Controls whether the downloads table should be rendered.
  */
@@ -89,31 +89,6 @@ if ( $show_downloads ) {
 			?>
 		</tbody>

-		<?php
-		if ( ! empty( $actions ) ) :
-			?>
-		<tfoot>
-			<tr>
-				<th class="order-actions--heading"><?php esc_html_e( 'Actions', 'woocommerce' ); ?>:</th>
-				<td>
-						<?php
-						$wp_button_class = wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '';
-						foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
-							if ( empty( $action['aria-label'] ) ) {
-								// Generate the aria-label based on the action name.
-								/* translators: %1$s Action name, %2$s Order number. */
-								$action_aria_label = sprintf( __( '%1$s order number %2$s', 'woocommerce' ), $action['name'], $order->get_order_number() );
-							} else {
-								$action_aria_label = $action['aria-label'];
-							}
-								echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button' . esc_attr( $wp_button_class ) . ' button ' . sanitize_html_class( $key ) . ' order-actions-button " aria-label="' . esc_attr( $action_aria_label ) . '">' . esc_html( $action['name'] ) . '</a>';
-								unset( $action_aria_label );
-						}
-						?>
-					</td>
-				</tr>
-			</tfoot>
-			<?php endif ?>
 		<tfoot>
 			<?php
 			foreach ( $order->get_order_item_totals() as $key => $total ) {
@@ -136,6 +111,29 @@ if ( $show_downloads ) {
 					</td>
 				</tr>
 			<?php endif; ?>
+			<?php
+			if ( ! empty( $actions ) ) :
+				?>
+			<tr>
+				<th class="order-actions--heading"><?php esc_html_e( 'Actions', 'woocommerce' ); ?>:</th>
+				<td>
+						<?php
+						$wp_button_class = wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '';
+						foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
+							if ( empty( $action['aria-label'] ) ) {
+								// Generate the aria-label based on the action name.
+								/* translators: %1$s Action name, %2$s Order number. */
+								$action_aria_label = sprintf( __( '%1$s order number %2$s', 'woocommerce' ), $action['name'], $order->get_order_number() );
+							} else {
+								$action_aria_label = $action['aria-label'];
+							}
+								echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button' . esc_attr( $wp_button_class ) . ' button ' . sanitize_html_class( $key ) . ' order-actions-button " aria-label="' . esc_attr( $action_aria_label ) . '">' . esc_html( $action['name'] ) . '</a>';
+								unset( $action_aria_label );
+						}
+						?>
+					</td>
+				</tr>
+			<?php endif; ?>
 		</tfoot>
 	</table>