Plugin Directory

Changeset 2840341


Ignore:
Timestamp:
12/28/2022 10:13:58 AM (3 years ago)
Author:
webmaxy
Message:

User Details added in request

File:
1 edited

Legend:

Unmodified
Added
Removed
  • webmaxycdp/trunk/includes/class-webmaxycdp.php

    r2839803 r2840341  
    134134    $url = "https://performanceapi.webmaxy.co/api/woocommerce/$action?data=" . $base64_encoded;
    135135    $response = wp_remote_get($url);
    136     if($event == 'SESSION' || $event == 'LOGIN'  ){
     136    if($event == 'SESSION' || $event == 'LOGIN'  || $event == 'PLACE_ORDER' ){
    137137        $response=wp_remote_retrieve_body( $response );
    138138        $response=json_decode($response);
    139139        if(!empty($response)){
     140            if(isset( $response->us)){
    140141            setcookie('__wbmxa_ckid', $response->ck, time()+31556926,"/");
    141142            $_SESSION['__wbmxa_usid']=sanitize_text_field( $response->us);
     143            }
    142144        }
    143145        // print_r($response);
     
    449451            $data['currency']=$order->get_currency();
    450452            $data['total']=$order->get_total();
     453            $order_data = $order->get_data();
     454            $data['user']=$order_data['billing'];
    451455            $this->wbmxa_track_request(1,$data,'PLACE_ORDER','actions');
    452456           
Note: See TracChangeset for help on using the changeset viewer.