Code Duplication    Length = 3-6 lines in 3 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/abstracts/abstract-wc-order.php 1 location

@@ 2104-2106 (lines=3) @@
2101
2102
		$pay_url = wc_get_endpoint_url( 'order-pay', $this->id, wc_get_page_permalink( 'checkout' ) );
2103
2104
		if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
2105
			$pay_url = str_replace( 'http:', 'https:', $pay_url );
2106
		}
2107
2108
		if ( $on_checkout ) {
2109
			$pay_url = add_query_arg( 'key', $this->order_key, $pay_url );

includes/wc-core-functions.php 1 location

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