Plugin Directory

Changeset 2638113


Ignore:
Timestamp:
12/01/2021 02:50:11 PM (4 years ago)
Author:
haitham22
Message:

Some updates

Location:
raccoon-platform/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • raccoon-platform/trunk/Raccoon-platform.php

    r2635162 r2638113  
    88 * Plugin URI: https://raccoonplatform.com
    99 * Description: More informed customers reflect more sales. Here are the features you get from using Raccoon.
    10  * Version: 4.5.0
     10 * Version: 4.6.0
    1111 * License: GPLv2 or Later
    1212 * Text Domain: Raccoon-Platform
  • raccoon-platform/trunk/Readme.txt

    r2635151 r2638113  
    66Tested up to: 5.7.2
    77<<<<<<< .mine
    8 Stable tag: 4.5.0
     8Stable tag: 4.6.0
    99Requires PHP: 7.0
    1010License: GPLv3 or later
  • raccoon-platform/trunk/include/Popular_items.php

    r2635151 r2638113  
    88    function callApiPopularAtc()
    99    {
    10         try {
     10//        try {
    1111            global $client_api;
    1212            $apiKey = $client_api;
     
    1919            $response = wp_remote_get('http://95.111.240.80/recommend/popular_items/' . $apiKey . '/' . $action . '/' . $number_items , $headers );
    2020            $this->output      = wp_remote_retrieve_body( $response );
    21         } catch (Exception $e) {
    22             echo 'Caught exception: ',  $e->getMessage(), "\n";
    23             wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
    24         }
     21//        } catch (Exception $e) {
     22//            echo 'Caught exception: ',  $e->getMessage(), "\n";
     23//            wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
     24//        }
    2525    }
    2626    public function viewPopularAtc()
     
    3939    function callApiPopularView()
    4040    {
    41         try {
     41//        try {
    4242            global $client_api;
    4343            $apiKey = $client_api;
     
    4848            );
    4949            $request = wp_remote_get( 'http://95.111.240.80/log/Production_Logging:callApiPopularView',array( 'sslverify' => false , 'timeout' => 5 ) );
    50             if( is_wp_error( $request ) ) {
    51                 echo '<script language="javascript">';
    52                 echo 'alert("'.$request->get_error_message().'");';
    53                 echo 'alert("'.$request->get_error_code().'");';
    54                 echo '</script>';
    55                 return false; // Bail early
    56             }
     50           
    5751            $response = wp_remote_get('http://95.111.240.80/recommend/popular_items/' . $apiKey . '/' . $action . '/' . $number_items , $headers );
    5852            $this->output    = wp_remote_retrieve_body( $response );
    59         } catch (Exception $e) {
    60             echo 'Caught exception: ',  $e->getMessage(), "\n";
    61             wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
    62         }
     53//        } catch (Exception $e) {
     54//            echo 'Caught exception: ',  $e->getMessage(), "\n";
     55//            wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
     56//        }
    6357    }
    6458
  • raccoon-platform/trunk/include/ingest_event.php

    r2633844 r2638113  
    5959            }
    6060        }
     61        // get Istatus
     62        $min = 0;
     63        $max = 2;
     64        $istatus  = rand($min, $max);
    6165        $headers = array(
    6266            'Content-Type:application/json',
    6367        );
    64         try {
     68//        try {
    6569            wp_remote_post( 'http://95.111.240.80/log/Production_Logging:callApiProduct_add' , $headers);
    6670            $response = wp_remote_post( 'http://95.111.240.80/ingest/event', array(
     
    8387                                    'iname' => $name,
    8488                                    'iprice' => $price_product,
    85                                     'istatus' => 1
     89                                    'istatus' => $istatus
    8690                                ),
    8791                            )
     
    9094                )
    9195            );
    92         } catch (Exception $e) {
    93             echo 'Caught exception: ',  $e->getMessage(), "\n";
    94             wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
    95 
    96         }
     96//        } catch (Exception $e) {
     97//            echo 'Caught exception: ',  $e->getMessage(), "\n";
     98//            wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
     99//
     100//        }
    97101    }
    98102}
     
    116120        //get date now
    117121        $now = new DateTime();
     122        // get Istatus
     123        $min = 0;
     124        $max = 2;
     125      $istatus  = rand($min, $max);
    118126        $headers = array(
    119127            'Content-Type:application/json',
    120128        );
    121         try {
     129//        try {
    122130            wp_remote_post( 'http://95.111.240.80/log/Production_Logging:callApiProduct_View' , $headers);
    123131
     
    142150                                    'iname' => $name,
    143151                                    'iprice' => $price,
    144                                     'istatus' => 1
     152                                    'istatus' => $istatus
    145153                                ),
    146154                            )
     
    149157                )
    150158            );
    151         } catch (Exception $e) {
    152             echo 'Caught exception: ',  $e->getMessage(), "\n";
    153             wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
    154159
    155         }
     160//        } catch (Exception $e) {
     161//            echo 'Caught exception: ',  $e->getMessage(), "\n";
     162//            wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
     163//
     164//        }
    156165    }
    157166}
  • raccoon-platform/trunk/include/ingest_session.php

    r2633844 r2638113  
    11<?php
    22class RaccoonIngestSession
    3 {
     3 {
    44    public function ingest_session()
    55    {
     
    2222            'Content-Type:application/json',
    2323        );
    24         try {
     24//        try {
    2525            wp_remote_post( 'http://95.111.240.80/log/Production_Logging:callApiSession' , $headers);
    2626            $url = 'http://95.111.240.80:5000/recommend/ingest_session';
     
    4141                )
    4242            );
    43         } catch (Exception $e) {
    44             echo 'Caught exception: ',  $e->getMessage(), "\n";
    45             wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
    46         }
     43//        } catch (Exception $e) {
     44//            echo 'Caught exception: ',  $e->getMessage(), "\n";
     45//            wp_remote_get('http://95.111.240.80/log/Production_Error:' . $e->getMessage() , $headers );
     46//        }
    4747    }
    4848}
Note: See TracChangeset for help on using the changeset viewer.