rebase code on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:51:46 -04:00
parent b16ad94b69
commit 8f1a2c3a66
2197 changed files with 184921 additions and 35568 deletions

View File

@@ -301,7 +301,6 @@ class WC_Shortcode_Checkout {
// For non-guest orders, require the user to be logged in before showing this page.
if ( $order_customer_id && get_current_user_id() !== $order_customer_id ) {
wc_get_template( 'checkout/order-received.php', array( 'order' => false ) );
wc_print_notice( esc_html__( 'Please log in to your account to view this order.', 'woocommerce' ), 'notice' );
woocommerce_login_form( array( 'redirect' => $order->get_checkout_order_received_url() ) );
return;
@@ -309,7 +308,6 @@ class WC_Shortcode_Checkout {
// For guest orders, request they verify their email address (unless we can identify them via the active user session).
if ( self::guest_should_verify_email( $order, 'order-received' ) ) {
wc_get_template( 'checkout/order-received.php', array( 'order' => false ) );
wc_get_template(
'checkout/form-verify-email.php',
array(
@@ -387,9 +385,8 @@ class WC_Shortcode_Checkout {
return false;
}
$email = filter_input( INPUT_POST, 'email' );
$nonce = filter_input( INPUT_POST, 'check_submission' );
if ( $email && ! wp_verify_nonce( $nonce, 'wc_verify_email' ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
if ( ! empty( $_POST ) && ! wp_verify_nonce( $_POST['check_submission'] ?? '', 'wc_verify_email' ) ) {
return true;
}