Skip to content

Commit 6814615

Browse files
committed
Add amount to payment instructions
1 parent 7122eae commit 6814615

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

includes/class-wc-payments-order-success-page.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function maybe_render_multibanco_payment_instructions( $order_id ) {
5454
$expiry_date = date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $unix_expiry );
5555
$days_remaining = max( 0, floor( ( $unix_expiry - time() ) / DAY_IN_SECONDS ) );
5656
$formatted_order_total = $order->get_formatted_order_total();
57+
$bank_formatted_amount = number_format( $order->get_total(), 2, ',', '.' );
5758
wc_print_notice(
5859
__( 'Your order is on hold until payment is received. Please follow the payment instructions by the expiry date.', 'woocommerce-payments' ),
5960
'notice'
@@ -91,6 +92,10 @@ public function maybe_render_multibanco_payment_instructions( $order_id ) {
9192
<span class="payment-box-label">Reference</span>
9293
<button type="button" class="payment-box-value copy-btn" data-copy-value="<?php echo $multibanco_info['reference']; ?>"><?php echo $multibanco_info['reference']; ?><i class="copy-icon"></i></button>
9394
</div>
95+
<div class="payment-box-row">
96+
<span class="payment-box-label">Amount</span>
97+
<button type="button" class="payment-box-value copy-btn" data-copy-value="<?php echo esc_attr( $bank_formatted_amount ); ?>"><?php echo $bank_formatted_amount; ?><i class="copy-icon"></i></button>
98+
</div>
9499
</div>
95100

96101
<button type="button" class="button alt print-btn">Print</button>

0 commit comments

Comments
 (0)