wc_checkout_is_https

Check if the checkout is configured for https.

Description

wc_checkout_is_https(); 

Look at options, WP HTTPS plugin, or the permalink itself.


Usage

  1. if ( !function_exists( 'wc_checkout_is_https' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-conditional-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_checkout_is_https(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-conditional-functions.php  
  1. function wc_checkout_is_https() { 
  2. return wc_site_is_https() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) || class_exists( 'WordPressHTTPS' ) || strstr( wc_get_page_permalink( 'checkout' ), 'https:' );