| @@ 335-340 (lines=6) @@ | ||
| 332 | */ |
|
| 333 | function wc_get_checkout_url() { |
|
| 334 | $checkout_url = wc_get_page_permalink( 'checkout' ); |
|
| 335 | if ( $checkout_url ) { |
|
| 336 | // Force SSL if needed |
|
| 337 | if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) { |
|
| 338 | $checkout_url = str_replace( 'http:', 'https:', $checkout_url ); |
|
| 339 | } |
|
| 340 | } |
|
| 341 | ||
| 342 | return apply_filters( 'woocommerce_get_checkout_url', $checkout_url ); |
|
| 343 | } |
|
| @@ 2023-2025 (lines=3) @@ | ||
| 2020 | ||
| 2021 | $pay_url = wc_get_endpoint_url( 'order-pay', $this->id, wc_get_page_permalink( 'checkout' ) ); |
|
| 2022 | ||
| 2023 | if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) { |
|
| 2024 | $pay_url = str_replace( 'http:', 'https:', $pay_url ); |
|
| 2025 | } |
|
| 2026 | ||
| 2027 | if ( $on_checkout ) { |
|
| 2028 | $pay_url = add_query_arg( 'key', $this->order_key, $pay_url ); |
|
| @@ 2045-2047 (lines=3) @@ | ||
| 2042 | ||
| 2043 | $order_received_url = wc_get_endpoint_url( 'order-received', $this->id, wc_get_page_permalink( 'checkout' ) ); |
|
| 2044 | ||
| 2045 | if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) { |
|
| 2046 | $order_received_url = str_replace( 'http:', 'https:', $order_received_url ); |
|
| 2047 | } |
|
| 2048 | ||
| 2049 | $order_received_url = add_query_arg( 'key', $this->order_key, $order_received_url ); |
|
| 2050 | ||
| @@ 143-145 (lines=3) @@ | ||
| 140 | $return_url = wc_get_endpoint_url( 'order-received', '', wc_get_page_permalink( 'checkout' ) ); |
|
| 141 | } |
|
| 142 | ||
| 143 | if ( is_ssl() || get_option('woocommerce_force_ssl_checkout') == 'yes' ) { |
|
| 144 | $return_url = str_replace( 'http:', 'https:', $return_url ); |
|
| 145 | } |
|
| 146 | ||
| 147 | return apply_filters( 'woocommerce_get_return_url', $return_url, $order ); |
|
| 148 | } |
|