For our customization want to get woocommerce payment page url programmatically then place the following snippet!. Here the $payment_page having your woocommerce payment page url.

$payment_page = get_permalink( woocommerce_get_page_id( 'pay' ) );
if ( get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' )
{ 
    $payment_page = str_replace( 'http:', 'https:', $payment_page );
}

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *