Skip to content

Commit

Permalink
Add amount to payment instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gpressutto5 committed Feb 24, 2025
1 parent 7122eae commit 6814615
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/class-wc-payments-order-success-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function maybe_render_multibanco_payment_instructions( $order_id ) {
$expiry_date = date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $unix_expiry );
$days_remaining = max( 0, floor( ( $unix_expiry - time() ) / DAY_IN_SECONDS ) );
$formatted_order_total = $order->get_formatted_order_total();
$bank_formatted_amount = number_format( $order->get_total(), 2, ',', '.' );
wc_print_notice(
__( 'Your order is on hold until payment is received. Please follow the payment instructions by the expiry date.', 'woocommerce-payments' ),
'notice'
Expand Down Expand Up @@ -91,6 +92,10 @@ public function maybe_render_multibanco_payment_instructions( $order_id ) {
<span class="payment-box-label">Reference</span>
<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>
</div>
<div class="payment-box-row">
<span class="payment-box-label">Amount</span>
<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>
</div>
</div>

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

0 comments on commit 6814615

Please sign in to comment.