__construct() public method

If $customer is 'new', you can build a new WC_Customer object. If it's empty, some data will be pulled from the session for the current user/customer.
public __construct ( WC_Customer | integer $data, boolean $is_session = false )
$data WC_Customer | integer Customer ID or data.
$is_session boolean True if this is the customer session
示例#1
0
 public function __construct()
 {
     _deprecated_function('woocommerce_customer', '1.4', 'WC_Customer()');
     parent::__construct();
 }