-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checkout: show "thank you" message regardless of verification status
As an alternative to #39406, this tries to solve the same issue in a simpler way: break the "thank you" message out into its own small template file and just include it in more places, so that no matter the context, the order confirmation screen will always say thank you, acknowledging that the order data has been received.
- Loading branch information
1 parent
ad94610
commit be605c0
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* "Order received" message. | ||
* | ||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.php. | ||
* | ||
* HOWEVER, on occasion WooCommerce will need to update template files and you | ||
* (the theme developer) will need to copy the new files to your theme to | ||
* maintain compatibility. We try to do this as little as possible, but it does | ||
* happen. When this occurs the version of the template file will be bumped and | ||
* the readme will list any important changes. | ||
* | ||
* @see https://docs.woocommerce.com/document/template-structure/ | ||
* @package WooCommerce\Templates | ||
* @version 8.1.0 | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
/** @var WC_Order|false $order */ | ||
?> | ||
|
||
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"> | ||
<?php | ||
/** | ||
* Filter the message shown after a checkout is complete. | ||
* | ||
* @param string $message The message. | ||
* @param WC_Order|false $order The order created during checkout, or false if order data is not available. | ||
*/ | ||
$message = apply_filters( | ||
'woocommerce_thankyou_order_received_text', | ||
__( 'Thank you. Your order has been received.', 'woocommerce' ), | ||
$order | ||
); | ||
|
||
echo esc_html( $message ); | ||
?> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters