Plugin Directory

Changeset 3182876


Ignore:
Timestamp:
11/06/2024 06:42:42 AM (17 months ago)
Author:
codeclouds
Message:

Initial commit for version 3.4.5

Location:
unify/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • unify/trunk/Models/PlatformApiModel.php

    r3181354 r3182876  
    1 <?php namespace CodeClouds\Unify\Model;class PlatformApiModel{private static $platform_endpoint=UNIFY_PLATFORM_ENDPOINT;private static $testing_domain='';public static function getDomain($testing_domain){self::$platform_endpoint=empty($testing_domain)?self::$platform_endpoint:$testing_domain;}public static function callPlatformToProcess($param,$testing_domain){self::getDomain($testing_domain);$method='validate-wordpress-license';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_post($curl_url,$args);return $response;}public static function callToPostWpConfig($param,$testing_domain){self::getDomain($testing_domain);$method='api/wordpress/import/products';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>$param,'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreData($domain_name,$param){self::$platform_endpoint=$domain_name;$method='checkout';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreDataGet($param){$method='checkout';$curl_url=self::$platform_endpoint.$method.'/?fallback='.$param;$args=array('body'=>[],'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_get($curl_url,$args);echo esc_html($response);}public function requestCancellation($fields,$endpoint){$api_method='auth/cancel/checkout-pro';$curl_url=$endpoint.$api_method;$auth_token=md5($fields["email"]);$header=['Content-Type'=>'application/json','X-Auth-token'=>$auth_token,];$args=array('timeout'=>'5000','httpversion'=>'1.1','cookies'=>[],'data_format'=>'body','sslverify'=>false);$response=\Requests::post($curl_url,$header,json_encode($fields));return $response;}}
     1<?php namespace CodeClouds\Unify\Model;class PlatformApiModel{private static $platform_endpoint=UNIFY_PLATFORM_ENDPOINT;private static $testing_domain='';public static function getDomain($testing_domain){self::$platform_endpoint=empty($testing_domain)?self::$platform_endpoint:$testing_domain;}public static function callPlatformToProcess($param,$testing_domain){self::getDomain($testing_domain);$method='validate-wordpress-license';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[]);$response=wp_remote_post($curl_url,$args);return $response;}public static function callToPostWpConfig($param,$testing_domain){self::getDomain($testing_domain);$method='api/wordpress/import/products';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>$param,'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[]);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreData($domain_name,$param){self::$platform_endpoint=$domain_name;$method='checkout';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[]);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreDataGet($param){$method='checkout';$curl_url=self::$platform_endpoint.$method.'/?fallback='.$param;$args=array('body'=>[],'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[]);$response=wp_remote_get($curl_url,$args);echo esc_html($response);}public function requestCancellation($fields,$endpoint){$api_method='auth/cancel/checkout-pro';$curl_url=$endpoint.$api_method;$auth_token=md5($fields["email"]);$header=['Content-Type'=>'application/json','X-Auth-token'=>$auth_token,];$args=array('timeout'=>'5000','httpversion'=>'1.1','cookies'=>[],'data_format'=>'body');$response=\Requests::post($curl_url,$header,json_encode($fields));return $response;}}
  • unify/trunk/readme.txt

    r3181412 r3182876  
    55Tested up to: 6.4
    66Requires PHP: 5.6
    7 Stable tag: 3.4.4
     7Stable tag: 3.4.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html\
     
    9595== Changelog ==
    9696
     97= 3.4.5 =
     98* Security - Update some API calls.
     99
    97100= 3.4.4 =
    98 * Add - Introduced a provision in the settings to manage the default order status
     101* Add - Introduced a provision in the settings to manage the default order status.
    99102* Enhacement - Optimization for managing the license key.
    100103
  • unify/trunk/unify.php

    r3181354 r3182876  
    77 * Author: CodeClouds <sales@codeclouds.com>
    88 * Author URI: https://www.CodeClouds.com/
    9  * Version: 3.4.4
     9 * Version: 3.4.5
    1010 * License: GPLv2 or later
    1111 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6060define('UNIFY_PLATFORM_LOGIN', 'https://accounts.unify.to/login');
    6161define('UNIFY_WP_HOME_URL', home_url());
    62 define('UNIFY_JS_VERSION', '3.4.4');
     62define('UNIFY_JS_VERSION', '3.4.5');
Note: See TracChangeset for help on using the changeset viewer.