Changeset 2923398
- Timestamp:
- 06/08/2023 12:58:21 PM (3 years ago)
- Location:
- shiip/trunk
- Files:
-
- 2 edited
-
includes/shiipFunctions.php (modified) (5 diffs)
-
shiip.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shiip/trunk/includes/shiipFunctions.php
r2636352 r2923398 19 19 $body = wp_json_encode( $body ); 20 20 21 error_log($body);21 // error_log($body); 22 22 23 23 … … 41 41 42 42 43 error_log($responseBody);43 // error_log($responseBody); 44 44 45 45 if($json->status){ … … 125 125 toAddress[email]='.get_option("wc_shiip_settings_email").'& 126 126 toAddress[street1]='.$toAddress.'& 127 toAddress[address]='.$toAddress.'& 127 128 toAddress[city]='.$toDetail->data->city.'& 128 129 toAddress[state]='.$toDetail->data->state.'& … … 135 136 fromAddress[email]='.get_option("wc_shiip_settings_email").'& 136 137 fromAddress[street1]='.$fromAddress.'& 138 fromAddress[address]='.$fromAddress.'& 137 139 fromAddress[city]='.$fromDetail->data->city.'& 138 140 fromAddress[state]='.$fromDetail->data->state.'& … … 169 171 $url = str_replace(array("\r", "\n"), '', $url); 170 172 171 // error_log($url); 172 173 174 $response = wp_remote_get($url); 173 174 $testUrl = str_replace("https://delivery.apiideraos.com/api/v2/tariffs/getquotes/".$provider,"",$url); 175 // error_log($testUrl); 176 177 $args = array( 178 'headers' => array( 179 'Authorization' => 'Bearer ' . get_option("wc_shiip_user_token"), 180 ), 181 ); 182 183 $response = wp_remote_get($url,$args); 175 184 176 185 $body = wp_remote_retrieve_body( $response ); 177 186 178 error_log("resp22.".$body);187 // error_log($provider."resp22.".$body."\n\n"); 179 188 180 189 if ( is_wp_error( $response ) ) { -
shiip/trunk/shiip.php
r2820044 r2923398 17 17 * Plugin URI: https://app.goshiip.com/ 18 18 * Description: The only shipping app you will ever need for your business. You can “Shiip” with top logistics companies at half their standard rates 19 * Version: 1.0. 519 * Version: 1.0.6 20 20 * Author: Shiip LLC 21 21 * Author URI: https://goshiip.com/ … … 40 40 * Rename this for your plugin and update it as you release new versions. 41 41 */ 42 define( 'SHIIP_VERSION', '1.0. 5' );42 define( 'SHIIP_VERSION', '1.0.6' ); 43 43 44 44 … … 211 211 "user_id": '.$id.', 212 212 "platform": "wordpress - '.get_option('blogname').'", 213 "rate_id": "'.$rateId.'" 213 "rate_id": "'.$rateId.'", 214 "toAddressName": "'.WC()->checkout->get_value( 'billing_first_name' ).' '.WC()->checkout->get_value( 'billing_last_name' ).'", 215 "toAddressNumber": "'.WC()->checkout->get_value( 'billing_phone' ).'", 216 "toAddressEmail": "'.WC()->checkout->get_value( 'billing_email' ).'" 214 217 }'; 215 218 … … 219 222 220 223 224 225 221 226 $options = [ 222 227 'body' => $data, 223 228 'headers' => [ 224 229 'Content-Type' => 'application/json', 230 'Authorization' => 'Bearer ' . get_option("wc_shiip_user_token"), 225 231 ], 226 232 'timeout' => 60, … … 1520 1526 // $methods['shiipCourierPlus'] = 'WC_ShiipMethod_CourierPlus'; 1521 1527 1522 //$methods['shiipFez'] = 'WC_ShiipMethod_Fez';1523 $methods['shiipHowl'] = 'WC_ShiipMethod_Howl';1528 $methods['shiipFez'] = 'WC_ShiipMethod_Fez'; 1529 // $methods['shiipHowl'] = 'WC_ShiipMethod_Howl'; 1524 1530 // $methods['shiipUlsino'] = 'WC_ShiipMethod_Ulsino'; 1525 1531
Note: See TracChangeset
for help on using the changeset viewer.