mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-04 12:22:24 +08:00
https://stackoverflow.com/questions/62717939/change-place-order-button-text-to-include-order-total
4 lines
254 B
Text
4 lines
254 B
Text
add_filter('woocommerce_order_button_text', 'place_order_button_with_order_total');
|
|
function place_order_button_with_order_total(){
|
|
return sprintf( '%s %s', __( 'Place Order & Pay', 'custom-order-button' ), strip_tags( WC()->cart->get_total() ) );
|
|
}
|