Skip to content

Instantly share code, notes, and snippets.

@woogist
Created December 24, 2014 14:01
Show Gist options
  • Save woogist/14a8a4b23826028814ed to your computer and use it in GitHub Desktop.
Save woogist/14a8a4b23826028814ed to your computer and use it in GitHub Desktop.
Show the payemnt page URL in the admin page of the order.
/**
* Show the payemnt page URL in the admin page of the order.
*
* @param object $order
* @return void
*/
function wc_admin_show_payment_url( $order ) {
if ( $order->get_status() != 'pending' ) {
return;
}
?>
<p class="form-field form-field-wide">
<label for="order_pay_url"><?php _e( 'Payment URL:', 'woocommerce' ) ?></label>
<p id="order_pay_url"><?php echo make_clickable( esc_url( $order->get_checkout_payment_url() ) ) ?></p>
</p>
<?php
}
add_action( 'woocommerce_admin_order_data_after_order_details', 'wc_admin_show_payment_url' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment