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/class-wc-order.php 1 location

@@ 1097-1099 (lines=3) @@
1094
	public function get_checkout_payment_url( $on_checkout = false ) {
1095
		$pay_url = wc_get_endpoint_url( 'order-pay', $this->get_id(), wc_get_page_permalink( 'checkout' ) );
1096
1097
		if ( 'yes' == get_option( 'woocommerce_force_ssl_checkout' ) || is_ssl() ) {
1098
			$pay_url = str_replace( 'http:', 'https:', $pay_url );
1099
		}
1100
1101
		if ( $on_checkout ) {
1102
			$pay_url = add_query_arg( 'key', $this->get_order_key(), $pay_url );

includes/wc-core-functions.php 1 location

@@ 1163-1168 (lines=6) @@
1160
 */
1161
function wc_get_checkout_url() {
1162
	$checkout_url = wc_get_page_permalink( 'checkout' );
1163
	if ( $checkout_url ) {
1164
		// Force SSL if needed
1165
		if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
1166
			$checkout_url = str_replace( 'http:', 'https:', $checkout_url );
1167
		}
1168
	}
1169
1170
	return apply_filters( 'woocommerce_get_checkout_url', $checkout_url );
1171
}