Commit 95b198f143d for woocommerce
commit 95b198f143d75f1f73098154f51e677c5c6a0776
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date: Wed Mar 4 13:08:59 2026 +0000
Prevent "Order again" button showing on order confirmation page (#63499)
* Add changelog
* Prevent "Order again" button showing on order confirmation page
diff --git a/plugins/woocommerce/changelog/woothme-277-order-again-button-appears-on-confirmation b/plugins/woocommerce/changelog/woothme-277-order-again-button-appears-on-confirmation
new file mode 100644
index 00000000000..ff20cb7f904
--- /dev/null
+++ b/plugins/woocommerce/changelog/woothme-277-order-again-button-appears-on-confirmation
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Prevent "Order again" button showing on order confirmation page
diff --git a/plugins/woocommerce/includes/wc-template-functions.php b/plugins/woocommerce/includes/wc-template-functions.php
index 618b1aa1121..571ccd57e33 100644
--- a/plugins/woocommerce/includes/wc-template-functions.php
+++ b/plugins/woocommerce/includes/wc-template-functions.php
@@ -3107,7 +3107,7 @@ if ( ! function_exists( 'woocommerce_order_again_button' ) ) {
* @param array $statuses_for_reordering Array of valid order statuses for reordering.
*/
$statuses_for_reordering = apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( OrderStatus::COMPLETED ) );
- if ( ! $order || ! $order->has_status( $statuses_for_reordering ) || ! is_user_logged_in() ) {
+ if ( ! $order || ! $order->has_status( $statuses_for_reordering ) || ! is_user_logged_in() || is_order_received_page() ) {
return;
}