Changeset 2015366
- Timestamp:
- 01/19/2019 04:16:23 PM (7 years ago)
- Location:
- integrate-np-shipping/trunk
- Files:
-
- 2 edited
-
integrate-np-shipping.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
integrate-np-shipping/trunk/integrate-np-shipping.php
r1617418 r2015366 5 5 * Plugin URI: 6 6 * Description: Integrate Custom Shipping Method of Nova Poshta for WooCommerce 7 * Version: 1.0. 07 * Version: 1.0.1 8 8 * Author: Lugano 9 9 * Author URI: http://full-chip.com … … 340 340 341 341 /** 342 * Execute request to Nova Poshta API by using CURL342 * Execute request to Nova Poshta API by using HTTP API of WordPress 343 343 * @input xml $request 344 344 * @return xml | bool … … 346 346 private function getResult($request) 347 347 { 348 $ch = curl_init(); 349 curl_setopt($ch, CURLOPT_URL, $this->apiUrl); 350 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 351 curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); 352 curl_setopt($ch, CURLOPT_HEADER, 0); 353 curl_setopt($ch, CURLOPT_POSTFIELDS, $request); 354 curl_setopt($ch, CURLOPT_POST, 1); 355 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 356 $response = curl_exec($ch); 357 curl_close($ch); 348 $response = wp_remote_get( 349 $this->apiUrl, 350 array( 351 'method' => 'POST', 352 'timeout' => 45, 353 'redirection' => 5, 354 'httpversion' => '1.1', 355 'headers' => array( 356 'Content-Type' => 'text/xml' 357 ), 358 'body' => $request, 359 'sslverify' => 'true' 360 ) 361 ); 358 362 359 363 return $response; -
integrate-np-shipping/trunk/readme.txt
r1617418 r2015366 4 4 Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, novaposhta 5 5 Requires at least: 4.6 6 Tested up to: 4.76 Tested up to: 5.0.3 7 7 Stable tag: 4.3 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.