Filter
rpress_paypal_link_payment_details_transaction_id
On this page
Filters the HTML link shown for a PayPal transaction ID on the order details screen.
Runs inside the callback that turns a PayPal transaction ID into a link to the transaction in the PayPal account history. The default value is an anchor tag pointing at the sandbox or live PayPal history page depending on the payment mode. Return different markup to change the link target or attributes.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$transaction_url | string | HTML anchor tag linking the transaction ID to PayPal. |
Return value#
string. The HTML to display for the transaction ID.
Example#
function my_paypal_txn_link( $transaction_url ) {
return str_replace( 'target="_blank"', 'target="_blank" rel="noopener noreferrer"', $transaction_url );
}
add_filter( 'rpress_paypal_link_payment_details_transaction_id', 'my_paypal_txn_link' );
Notes#
The order details screen passes the result of the rpress_payment_details_transaction_id-paypal filter through esc_html() before output, so markup returned here may be displayed as escaped text there.
Source#
Applied in:
includes/gateways/paypal-standard.php(line 2076), inrpress_paypal_link_transaction_id()
See also#
Was this page helpful?
