Use get_transaction_id
This commit is contained in:
parent
f6b78be21c
commit
5b6c574664
|
@ -162,7 +162,7 @@ class WC_Meta_Box_Order_Data {
|
|||
if ( $payment_method ) {
|
||||
printf( __( 'Payment via %s', 'woocommerce' ), ( isset( $payment_gateways[ $payment_method ] ) ? esc_html( $payment_gateways[ $payment_method ]->get_title() ) : esc_html( $payment_method ) ) );
|
||||
|
||||
if ( $transaction_id = get_post_meta( $order->id, '_transaction_id', true ) ) {
|
||||
if ( $transaction_id = $order->get_transaction_id() ) {
|
||||
if ( isset( $payment_gateways[ $payment_method ] ) && ( $url = $payment_gateways[ $payment_method ]->get_transaction_url( $transaction_id ) ) ) {
|
||||
echo ' (<a href="' . esc_url( $url ) . '" target="_blank">' . esc_html( $transaction_id ) . '</a>)';
|
||||
} else {
|
||||
|
|
|
@ -147,7 +147,7 @@ class WC_Meta_Box_Order_Totals {
|
|||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
<button type="button" class="button calc_line_taxes"><?php _e( 'Calculate Tax', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="button calc_totals button-primary"><?php _e( 'Calculate Total', 'woocommerce' ); ?></button>
|
||||
<button type="button" class="button calc_totals"><?php _e( 'Calculate Total', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue