ho trovato questo, e sembra funzionare:

Codice PHP:
$order->get_checkout_payment_url(FALSE);