yith_getcookie

Retrieve the value of a cookie.

Description

yith_getcookie( (string) $name ); 

Parameters (1)

0. $name (string)
The name.

Usage

  1. if ( !function_exists( 'yith_getcookie' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-wishlist/includes/functions.yith-wcwl.php'; 
  3.  
  4. // The name. 
  5. $name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = yith_getcookie($name); 
  9.  

Defined (1)

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

/includes/functions.yith-wcwl.php  
  1. function yith_getcookie( $name ) { 
  2. if( isset( $_COOKIE[$name] ) ) { 
  3. return json_decode( stripslashes( $_COOKIE[$name] ), true ); 
  4.  
  5. return array();