Plugin Directory

Changeset 2891251


Ignore:
Timestamp:
03/31/2023 12:24:08 PM (3 years ago)
Author:
codeclouds
Message:

Enhacement - Optimized warning error.

Location:
unify/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • unify/trunk/Actions/OrderConfirmation.php

    r2719260 r2891251  
    1616        $crm_connection_id = WC()->payment_gateways->payment_gateways()['codeclouds_unify']->settings['connection'];
    1717        $crm_connection_meta = get_post_meta($crm_connection_id);
    18 
    19         $crm_conection_name = isset($crm_connection_meta['unify_connection_crm_salt'][0]) ? ConfigEncryption::metaDecryptSingle($crm_connection_meta['unify_connection_crm'][0], $crm_connection_meta['unify_connection_crm_salt'][0]) : $crm_connection_meta['unify_connection_crm'][0];
     18       
     19        $crm_conection_name = '';
     20        if(!empty($crm_connection_meta)){
     21            if(isset($crm_connection_meta['unify_connection_crm_salt'][0]) && isset($crm_connection_meta['unify_connection_crm'][0])){
     22                $crm_conection_name = ConfigEncryption::metaDecryptSingle($crm_connection_meta['unify_connection_crm'][0], $crm_connection_meta['unify_connection_crm_salt'][0]);
     23            }else if(isset($crm_connection_meta['unify_connection_crm'][0])){
     24                $crm_conection_name = $crm_connection_meta['unify_connection_crm'][0];
     25            }
     26        }
    2027
    2128        if (!is_admin()) {
    22             if (isset($available_gateways['codeclouds_unify_paypal_payment']) && 'limelight' !== $crm_conection_name && 'sublytics' !== $crm_conection_name) {
     29            if (isset($available_gateways['codeclouds_unify_paypal_payment']) && !array_search($crm_conection_name,['limelight','sublytics'])) {
    2330                unset($available_gateways['codeclouds_unify_paypal_payment']);
    2431            }
     
    8491
    8592                $connection = get_post_meta($wc_codeclouds_unify_settings['connection']);
    86                 $crm_conection_name = isset($connection['unify_connection_crm_salt'][0]) ? ConfigEncryption::metaDecryptSingle($connection['unify_connection_crm'][0], $connection['unify_connection_crm_salt'][0]) : $connection['unify_connection_crm'][0];
     93                $crm_conection_name = '';
     94                if(!empty($connection)){
     95                    if(isset($connection['unify_connection_crm_salt'][0]) && isset($connection['unify_connection_crm'][0])){
     96                        $crm_conection_name = ConfigEncryption::metaDecryptSingle($connection['unify_connection_crm'][0], $connection['unify_connection_crm_salt'][0]);
     97                    }else if(isset($connection['unify_connection_crm'][0])){
     98                        $crm_conection_name = $connection['unify_connection_crm'][0];
     99                    }
     100                }
    87101
    88102                $response = $_REQUEST;
     
    171185                if($wc_codeclouds_unify_settings){
    172186                    $connection = get_post_meta($wc_codeclouds_unify_settings['connection']);
    173                     $crm_conection_name = ConfigEncryption::metaDecryptSingle($connection['unify_connection_crm'][0], $connection['unify_connection_crm_salt'][0]);
     187                    $crm_conection_name = '';
     188                    if(!empty($connection)){
     189                        if(isset($connection['unify_connection_crm_salt'][0]) && isset($connection['unify_connection_crm'][0])){
     190                            $crm_conection_name = ConfigEncryption::metaDecryptSingle($connection['unify_connection_crm'][0], $connection['unify_connection_crm_salt'][0]);
     191                        }else if(isset($connection['unify_connection_crm'][0])){
     192                            $crm_conection_name = $connection['unify_connection_crm'][0];
     193                        }
     194                    }
    174195                    if ($crm_conection_name == 'sublytics') {
    175196                        $api_username = ConfigEncryption::metaDecryptSingle($connection['unify_connection_api_username'][0], $connection['unify_connection_api_username_salt'][0]);
  • unify/trunk/readme.txt

    r2839248 r2891251  
    55Tested up to: 6.1
    66Requires PHP: 5.6
    7 Stable tag: 3.4.1
     7Stable tag: 3.4.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html\
     
    9595== Changelog ==
    9696
     97= 3.4.2 =
     98* Enhacement - Optimized warning error.
     99
    97100= 3.4.1 =
    98101* Enhacement - Woocommerce variant product image with Unify Hosted Checkout.
  • unify/trunk/unify.php

    r2839248 r2891251  
    77 * Author: CodeClouds <sales@codeclouds.com>
    88 * Author URI: https://www.CodeClouds.com/
    9  * Version: 3.4.1
     9 * Version: 3.4.2
    1010 * License: GPLv2 or later
    1111 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1212 *
    1313 * WC requires at least: 3.0
    14  * WC tested up to: 6.3
     14 * WC tested up to: 7.5
    1515 */
    1616
     
    6060define('UNIFY_PLATFORM_LOGIN', 'https://accounts.unify.to/login');
    6161define('UNIFY_WP_HOME_URL', home_url());
    62 define('UNIFY_JS_VERSION', '3.4.1');
     62define('UNIFY_JS_VERSION', '3.4.2');
Note: See TracChangeset for help on using the changeset viewer.