WC_Payment_Gateway::get_transaction_url( WC_Order $order )

Get a link to the transaction on the 3rd party gateway site (if applicable).


Description Description


Parameters Parameters

$order

(Required) the order object.


Top ↑

Return Return

(string) transaction URL, or empty string.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-payment-gateway.php

	public function get_transaction_url( $order ) {

		$return_url     = '';
		$transaction_id = $order->get_transaction_id();

		if ( ! empty( $this->view_transaction_url ) && ! empty( $transaction_id ) ) {
			$return_url = sprintf( $this->view_transaction_url, $transaction_id );
		}

		return apply_filters( 'woocommerce_get_transaction_url', $return_url, $order, $this );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.