Code Duplication    Length = 3-6 lines in 4 locations

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

@@ 101-103 (lines=3) @@
98
			$return_url = wc_get_endpoint_url( 'order-received', '', wc_get_page_permalink( 'checkout' ) );
99
		}
100
101
		if ( is_ssl() || get_option('woocommerce_force_ssl_checkout') == 'yes' ) {
102
			$return_url = str_replace( 'http:', 'https:', $return_url );
103
		}
104
105
		return apply_filters( 'woocommerce_get_return_url', $return_url, $order );
106
	}

includes/wc-cart-functions.php 1 location

@@ 344-349 (lines=6) @@
341
 */
342
function wc_get_checkout_url() {
343
	$checkout_url = wc_get_page_permalink( 'checkout' );
344
	if ( $checkout_url ) {
345
		// Force SSL if needed
346
		if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
347
			$checkout_url = str_replace( 'http:', 'https:', $checkout_url );
348
		}
349
	}
350
351
	return apply_filters( 'woocommerce_get_checkout_url', $checkout_url );
352
}

includes/abstracts/abstract-wc-order.php 2 locations

@@ 2030-2032 (lines=3) @@
2027
2028
		$pay_url = wc_get_endpoint_url( 'order-pay', $this->id, wc_get_page_permalink( 'checkout' ) );
2029
2030
		if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
2031
			$pay_url = str_replace( 'http:', 'https:', $pay_url );
2032
		}
2033
2034
		if ( $on_checkout ) {
2035
			$pay_url = add_query_arg( 'key', $this->order_key, $pay_url );
@@ 2052-2054 (lines=3) @@
2049
2050
		$order_received_url = wc_get_endpoint_url( 'order-received', $this->id, wc_get_page_permalink( 'checkout' ) );
2051
2052
		if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
2053
			$order_received_url = str_replace( 'http:', 'https:', $order_received_url );
2054
		}
2055
2056
		$order_received_url = add_query_arg( 'key', $this->order_key, $order_received_url );
2057