Code Duplication    Length = 3-6 lines in 4 locations

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

@@ 181-183 (lines=3) @@
178
			$return_url = wc_get_endpoint_url( 'order-received', '', wc_get_page_permalink( 'checkout' ) );
179
		}
180
181
		if ( is_ssl() || get_option('woocommerce_force_ssl_checkout') == 'yes' ) {
182
			$return_url = str_replace( 'http:', 'https:', $return_url );
183
		}
184
185
		return apply_filters( 'woocommerce_get_return_url', $return_url, $order );
186
	}

includes/wc-core-functions.php 1 location

@@ 1140-1145 (lines=6) @@
1137
 */
1138
function wc_get_checkout_url() {
1139
	$checkout_url = wc_get_page_permalink( 'checkout' );
1140
	if ( $checkout_url ) {
1141
		// Force SSL if needed
1142
		if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
1143
			$checkout_url = str_replace( 'http:', 'https:', $checkout_url );
1144
		}
1145
	}
1146
1147
	return apply_filters( 'woocommerce_get_checkout_url', $checkout_url );
1148
}

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

@@ 2125-2127 (lines=3) @@
2122
2123
		$pay_url = wc_get_endpoint_url( 'order-pay', $this->id, wc_get_page_permalink( 'checkout' ) );
2124
2125
		if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
2126
			$pay_url = str_replace( 'http:', 'https:', $pay_url );
2127
		}
2128
2129
		if ( $on_checkout ) {
2130
			$pay_url = add_query_arg( 'key', $this->order_key, $pay_url );
@@ 2147-2149 (lines=3) @@
2144
2145
		$order_received_url = wc_get_endpoint_url( 'order-received', $this->id, wc_get_page_permalink( 'checkout' ) );
2146
2147
		if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
2148
			$order_received_url = str_replace( 'http:', 'https:', $order_received_url );
2149
		}
2150
2151
		$order_received_url = add_query_arg( 'key', $this->order_key, $order_received_url );
2152