Created
October 5, 2021 10:17
-
-
Save spasicm/c13aaa3a4208d7d66031b786579feb29 to your computer and use it in GitHub Desktop.
Woocommerce append a text to total price on the "Cart", "Check out", "Thank you" pages & "Order recived" email
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
<?php | |
// This code should be added to your WordPress child theme functions.php | |
// Woocommerce append a text to total price on the "Cart" & "Check out" page | |
add_filter( 'woocommerce_cart_totals_order_total_html', 'eworkshop_custom_total_message_html', 10, 1 ); | |
function eworkshop_custom_total_message_html( $value ) { | |
$value .= __('<br>some custom TXT') . '<br>'; | |
return $value; | |
} | |
// Woocommerce append a text to total price on the "Thank you" page & "Order recived" email | |
add_filter( 'woocommerce_get_formatted_order_total', 'eworkshop_custom_order_total_message_html', 10, 1 ); | |
function eworkshop_custom_order_total_message_html( $total ) { | |
$total .= __('<br>some custom TXT') . '<br>'; | |
return $total; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment