vtmin_get_currPageURL

The VarkTech Minimum Purchase for WooCommerce vtmin get currPageURL function.

Description

vtmin_get_currPageURL( (constant) $www = null ); 

Parameters (1)

0. $www — Optional. (constant) => null
The www.

Usage

  1. if ( !function_exists( 'vtmin_get_currPageURL' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'varktech-minimum-purchase-for-woocommerce/woo-integration/vtmin-parent-functions.php'; 
  3.  
  4. // The www. 
  5. $www = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = vtmin_get_currPageURL($www); 
  9.  

Defined (1)

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

/woo-integration/vtmin-parent-functions.php  
  1. function vtmin_get_currPageURL($www = null) { 
  2. global $vtmin_info; 
  3. $pageURL = 'http'; 
  4. //if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} 
  5. if ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ) { $pageURL .= "s";} 
  6. $pageURL .= "://"; 
  7. $pageURL .= $www; //mostly null, only active rarely, 2nd time through - see above 
  8.  
  9. //NEVER create the URL with the port name!!!!!!!!!!!!!! 
  10. $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; 
  11. /**  
  12. if ($_SERVER["SERVER_PORT"] != "80") { 
  13. $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; 
  14. } else { 
  15. $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; 
  16. */ 
  17. return $pageURL; 
  18. }