woocommerce_load_persistent_cart

The WooCommerce woocommerce load persistent cart function.

Description

woocommerce_load_persistent_cart( $user_login, (int) $user = 0 ); 

Parameters (2)

0. $user_login
The user login.
1. $user — Optional. (int)
The user.

Usage

  1. if ( !function_exists( 'woocommerce_load_persistent_cart' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The user login. 
  5. $user_login = null; 
  6.  
  7. // The user. 
  8. $user = -1; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = woocommerce_load_persistent_cart($user_login, $user); 
  12.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_load_persistent_cart( $user_login, $user = 0 ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_load_persistent_cart' ); 
  3. return wc_load_persistent_cart( $user_login, $user );