Plugin Directory

Changeset 2215878


Ignore:
Timestamp:
12/20/2019 06:07:51 PM (6 years ago)
Author:
oometrics
Message:

v.1.0.6 critical patch for v.1.0.4 and v.1.0.5

Location:
oometrics/trunk/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • oometrics/trunk/inc/activity-class.php

    r2215875 r2215878  
    125125    public function add_activity($data = array())
    126126    {
    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){
    129129            global $wpdb;
    130130            $wpdb->insert($this->table,$data);
  • oometrics/trunk/inc/session-class.php

    r2215875 r2215878  
    246246    }
    247247
     248
    248249    // check if a session is stored in database for cart manipulation at the begining
    249250    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        }
    251259    }
    252260
     
    417425                $wpdb->prepare(
    418426                    "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'",
    420428                     array(0,$settings['main_user'],$now - 30)
    421429                )
Note: See TracChangeset for help on using the changeset viewer.