Changeset 2215878
- Timestamp:
- 12/20/2019 06:07:51 PM (6 years ago)
- Location:
- oometrics/trunk/inc
- Files:
-
- 2 edited
-
activity-class.php (modified) (1 diff)
-
session-class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
oometrics/trunk/inc/activity-class.php
r2215875 r2215878 125 125 public function add_activity($data = array()) 126 126 { 127 // echo $this->table.'ssssss';128 if($settings['main_user'] != get_current_user_id()){127 $settings = get_option($this->option_name); 128 if($settings['main_user'] != $this->act_uid){ 129 129 global $wpdb; 130 130 $wpdb->insert($this->table,$data); -
oometrics/trunk/inc/session-class.php
r2215875 r2215878 246 246 } 247 247 248 248 249 // check if a session is stored in database for cart manipulation at the begining 249 250 public function woo_session(){ 250 WC()->session->set_customer_session_cookie( true ); 251 if ( null === WC()->session ) { 252 $session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' ); 253 WC()->session = new $session_class(); 254 WC()->session->init(); 255 WC()->session->set_customer_session_cookie( true ); 256 } else { 257 WC()->session->set_customer_session_cookie( true ); 258 } 251 259 } 252 260 … … 417 425 $wpdb->prepare( 418 426 "DELETE FROM $this->table 419 WHERE ses_value <= '%d' && ses_uid != '%d' && ses_date < '%d'",427 WHERE ses_value <= '%d' && ses_uid != '%d' && ses_date < '%d'", 420 428 array(0,$settings['main_user'],$now - 30) 421 429 )
Note: See TracChangeset
for help on using the changeset viewer.