Plugin Directory

Changeset 2968554


Ignore:
Timestamp:
09/19/2023 06:08:02 AM (3 years ago)
Author:
outgrow
Message:

updating to new version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • outgrow/trunk/outgrow-api.php

    r2851407 r2968554  
    194194            for ($i = 0; $i < $calci_count; $i++) {
    195195                $url1=explode('{',$res3[$i]->calc_url);
    196                     $final_url=$url1[0].$res3[$i]->$res3->parentapp.'?sLead=1';
     196                    $final_url=$url1[0].$res3[$i]->parentapp.'?sLead=1';
    197197                if ($wpdb->insert('wp_outgrow_calci_table', array(
    198198                    'name' => $res3[$i]->name,
     
    218218function calci_script_page($api){
    219219    global $wpdb;
     220    $msgError = 0;
    220221    $db_result = $wpdb->get_results('select * from wp_outgrow_calci_api_table');
    221222    if(!$db_result){
     
    241242            $request = Requests::get('https://api-calc.outgrow.co/api/v1/calculator?status=Live&type=All&sort=alpha_as', $headers);
    242243            $res        = json_decode($request->body);
    243             if ($res->code == 401 ) {
     244            if (isset($res->code) && $res->code == 401) {
    244245                $wpdb->delete('wp_outgrow_calci_api_table', array(
    245246                    'api_key' => $db_row->api_key
Note: See TracChangeset for help on using the changeset viewer.