Code Duplication    Length = 3-6 lines in 3 locations

includes/abstracts/abstract-wc-payment-gateway.php 1 location

@@ 151-153 (lines=3) @@
148
			$return_url = wc_get_endpoint_url( 'order-received', '', wc_get_page_permalink( 'checkout' ) );
149
		}
150
151
		if ( is_ssl() || get_option('woocommerce_force_ssl_checkout') == 'yes' ) {
152
			$return_url = str_replace( 'http:', 'https:', $return_url );
153
		}
154
155
		return apply_filters( 'woocommerce_get_return_url', $return_url, $order );
156
	}

includes/wc-core-functions.php 1 location

@@ 907-912 (lines=6) @@
904
 */
905
function wc_get_checkout_url() {
906
	$checkout_url = wc_get_page_permalink( 'checkout' );
907
	if ( $checkout_url ) {
908
		// Force SSL if needed
909
		if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
910
			$checkout_url = str_replace( 'http:', 'https:', $checkout_url );
911
		}
912
	}
913
914
	return apply_filters( 'woocommerce_get_checkout_url', $checkout_url );
915
}

includes/class-wc-order.php 1 location

@@ 284-286 (lines=3) @@
281
    public function get_checkout_payment_url( $on_checkout = false ) {
282
        $pay_url = wc_get_endpoint_url( 'order-pay', $this->get_id(), wc_get_page_permalink( 'checkout' ) );
283
284
        if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
285
            $pay_url = str_replace( 'http:', 'https:', $pay_url );
286
        }
287
288
        if ( $on_checkout ) {
289
            $pay_url = add_query_arg( 'key', $this->get_order_key(), $pay_url );