redirectBrowser

The PayPal for WooCommerce redirectBrowser function.

Description

redirectBrowser( $url ); 

Parameters (1)

0. $url
The url.

Usage

  1. if ( !function_exists( 'redirectBrowser' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paypal-for-woocommerce/classes/lib/CentinelUtility.php'; 
  3.  
  4. // The url. 
  5. $url = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = redirectBrowser($url); 
  9.  

Defined (1)

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

/classes/lib/CentinelUtility.php  
  1. function redirectBrowser($url) { 
  2.  
  3. $protocol = http//'; 
  4.  
  5. if (getenv('HTTPS') == 'on') { 
  6. $protocol = 'https://'; 
  7.  
  8. $url = $protocol.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.$url; 
  9.  
  10. header('Location: ' . $url); 
  11. exit();