Plugin Directory

Changeset 2015366


Ignore:
Timestamp:
01/19/2019 04:16:23 PM (7 years ago)
Author:
luganos
Message:

Removed CURL library.

Location:
integrate-np-shipping/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • integrate-np-shipping/trunk/integrate-np-shipping.php

    r1617418 r2015366  
    55 * Plugin URI:
    66 * Description: Integrate Custom Shipping Method of Nova Poshta for WooCommerce
    7  * Version: 1.0.0
     7 * Version: 1.0.1
    88 * Author: Lugano
    99 * Author URI: http://full-chip.com
     
    340340
    341341                /**
    342                  * Execute request to Nova Poshta API by using CURL
     342                 * Execute request to Nova Poshta API by using HTTP API of WordPress
    343343                 * @input xml $request
    344344                 * @return xml | bool
     
    346346                private function getResult($request)
    347347                {
    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                    );
    358362
    359363                    return $response;
  • integrate-np-shipping/trunk/readme.txt

    r1617418 r2015366  
    44Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, novaposhta
    55Requires at least: 4.6
    6 Tested up to: 4.7
     6Tested up to: 5.0.3
    77Stable tag: 4.3
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.