Plugin Directory

Changeset 2792273


Ignore:
Timestamp:
09/30/2022 06:58:54 AM (3 years ago)
Author:
sprintlogistics
Message:

change in json

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sprint/trunk/includes/Api/Callback/ERP_SPRINT_Order_Api.php

    r2684153 r2792273  
    3939      $save_data["errors"] = $errors;
    4040    }
    41 
    42     $json_data = wp_remote_post($save_data);
     41 
     42    $wp_data_post = wp_json_encode($save_data);
    4343    //-----------
    4444    wp_remote_post(
    4545                  $url,
    4646                  array(
    47                     'body'    => $json_data,
     47                    'body'    => $wp_data_post,
    4848                    'timeout' => 500000,
    4949                    'headers' => array(
     
    6262      $product = wc_get_product($item->get_product_id());
    6363      $description.= 'Product SKU: ' . $product->get_sku().', ';
    64       $description.= 'Pproductroduct name: ' . $item->get_name().', ';
     64      $description.= 'Product name: ' . $item->get_name().', ';
    6565      $description.= 'Product quantity: ' . $item->get_quantity().' | ';
    6666    }
     
    172172      $save_data["errors"] = $errors;
    173173    }
    174     $json_data = wp_remote_post($save_data);
    175     //-----------
     174     //-----------
    176175    wp_remote_post(
    177176                  $url,
    178177                  array(
    179                     'body'    =>  $json_data,
     178                    'body'    => wp_json_encode($save_data),
    180179                    'timeout' => 500000,
    181180                    'headers' => array(
Note: See TracChangeset for help on using the changeset viewer.