Plugin Directory

Changeset 3086946


Ignore:
Timestamp:
05/15/2024 08:37:39 AM (23 months ago)
Author:
SplitIt
Message:

release version 4.1.6

Location:
splitit-installment-payments
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • splitit-installment-payments/trunk/CHANGELOG.md

    r3053263 r3086946  
    33All notable changes to this project will be documented in this file
    44-
     5
     6### 4.1.6
     7* Code improvements and bug fixes
     8* Tested compatibility with WordPress version 6.5.2 and Woocommerce version 8.8.2
    59
    610### 4.1.5
  • splitit-installment-payments/trunk/assets/js/admin.js

    r3053263 r3086946  
    908908                            );
    909909                        },
    910                         1000
     910                        2000
    911911                    )
    912912                }
  • splitit-installment-payments/trunk/readme.txt

    r3053263 r3086946  
    33Tags: ecommerce, e-commerce, commerce, wordpress ecommerce, sales, sell, shop, shopping, checkout, payment, splitit
    44Requires at least: 5.6
    5 Tested up to: 6.4.3
     5Tested up to: 6.5.2
    66WC requires at least: 5.5
    7 WC tested up to: 8.6.1
    8 Stable tag: 4.1.5
     7WC tested up to: 8.8.2
     8Stable tag: 4.1.6
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6161
    6262== Changelog ==
     63
     64= 4.1.6 - 2024-05-15 =
     65Code improvements and bug fixes
     66Tested compatibility with WordPress version 6.5.2 and Woocommerce version 8.8.2
    6367
    6468= 4.1.5 - 2024-03-18 =
  • splitit-installment-payments/trunk/splitIt-flexfields-payment-gateway.php

    r3053263 r3086946  
    1010 * Author: Splitit
    1111 * Author URI: https://www.splitit.com/
    12  * Version: 4.1.5
     12 * Version: 4.1.6
    1313 */
    1414
     
    2424
    2525global $plugin_version;
    26 $plugin_version = '4.1.5';
     26$plugin_version = '4.1.6';
    2727
    2828global $required_splitit_php_version;
     
    397397            $this->init_ajax_frontend_hook();
    398398
     399            add_action( 'shutdown', array( $this, 'check_fatal_errors' ) );
     400
    399401            add_action( 'parse_request', array( $this, 'splitit_custom_url_handler' ) );
    400402        }
     403
     404        /**
     405         * Method that check and print fatal error
     406         */
     407        public function check_fatal_errors() {
     408            $error = error_get_last();
     409            if ( $error && isset($error['type']) && $error['type'] === E_ERROR && isset($error['message']) ) {
     410                echo '<div style="width: 100%; margin: 15px auto; text-align: center; font-size: 16px; background-color: bisque; padding: 10px; border-radius: 10px;">';
     411                if ( strpos( $error['message'], 'GuzzleHttp') !== false ) {
     412                    preg_match('/\/wp-content\/plugins\/([^\/]+)/', $error['message'], $matches);
     413
     414                    if ( isset($matches[1]) && $matches[1] != 'Splitit.Plugins.WooCommerce.FF' && $matches[1] != 'splitit-installment-payments' ) {
     415                        echo "A conflict of GuzzleHttp versions was detected in the plugin </br>located in the <b>" . $matches[1] . '</b> directory.</br> To resolve the error, you can try to update the version of the specified plugin, </br>or temporarily deactivate it for successful authorization to Splitit account. </br>After authorization, you can activate the specified plugin again.';
     416                    } else {
     417                        echo $error['message'];
     418                    }
     419                } else {
     420                    echo $error['message'];
     421                }
     422                echo '</div>';
     423            }
     424        }
    401425
    402426        /**
     
    674698            $callback_uri  = get_site_url() . '/splitit-auth/callback';
    675699
    676             session_start();
     700            if ( !session_id() ) { session_start(); }
    677701            $verifier = $_SESSION['code_verifier'] ?? '';
     702
     703            if ( '' === $verifier ) {
     704                echo '<div style="width: 500px; margin: 15px auto; text-align: center; font-size: 16px; background-color: bisque; padding: 10px; border-radius: 10px;">An issue with session access has been detected.</br>Please ensure that your server settings allow session functionality</br>and that no additional site settings block session operation.</div>';
     705            }
    678706
    679707            $header  = array( 'Content-Type: application/x-www-form-urlencoded' );
     
    692720                echo curl_error( $curl );
    693721            } elseif ( property_exists( json_decode( $response ), 'error' ) ) {
    694                 echo 'Error:<br />';
    695                 echo $auth_code;
     722                echo '<div style="width: 500px; margin: 0 auto; text-align: center; font-size: 16px; background-color: bisque; padding: 10px; border-radius: 10px;">';
     723                echo 'Error:</br>';
     724                echo $auth_code.'</br>';
    696725                echo $response;
     726                echo '</div>';
    697727            }
    698728
    699729            $id_token = json_decode( $response )->id_token;
    700730            if ( $id_token ) {
    701                 session_start();
     731                if ( !session_id() ) { session_start(); }
    702732                $_SESSION['id_token'] = $id_token;
    703733            }
     
    874904            );
    875905
    876             session_start();
     906            if ( !session_id() ) { session_start(); }
    877907            $_SESSION['merchants_list'] = $merchants_list;
    878908            ?>
     
    11931223         */
    11941224        public function generate_terminals_list_dropdown( $terminals_list, $credentials_list, $merchant_id, $user_data, $env ) {
    1195             session_start();
     1225            if ( !session_id() ) { session_start(); }
    11961226            $_SESSION['terminals_list']   = $terminals_list;
    11971227            $_SESSION['credentials_list'] = $credentials_list;
     
    14611491                        $access_token = $this->get_access_token( $data['code'] );
    14621492                        if ( $access_token ) {
    1463                             session_start();
     1493                            if ( !session_id() ) { session_start(); }
    14641494                            $_SESSION['access_token'] = $access_token;
    14651495                            $user_data = $this->get_user_data( 'https://id.' . $env . '.splitit.com/api/user/profile', $access_token );
     
    14791509                        $merchant_id = $_POST['merchant_id'];
    14801510
    1481                         session_start();
     1511                        if ( !session_id() ) { session_start(); }
    14821512                        $access_token      = $_SESSION['access_token'] ?? null;
    14831513                        $user_data         = get_option( 'splitit_logged_user_data' );
     
    15021532                        $client_id   = $_POST['client_id'];
    15031533
    1504                         session_start();
     1534                        if ( !session_id() ) { session_start(); }
    15051535                        $merchants_list = $_SESSION['merchants_list'] ?? null;
    15061536                        $terminals_list = $_SESSION['terminals_list'] ?? null;
     
    15851615                $code_verifier = isset( $_POST['code_verifier'] ) ? wc_clean( $_POST['code_verifier'] ) : null;
    15861616                if ( $code_verifier ) {
    1587                     session_start();
     1617                    if ( !session_id() ) { session_start(); }
    15881618                    $_SESSION['code_verifier'] = $code_verifier;
    15891619                }
     
    17651795        function displaying_custom_admin_notice()
    17661796        {
    1767             session_start();
     1797            if ( !session_id() ) { session_start(); }
    17681798            if (isset($_SESSION['cancelled_order_message'])) {
    17691799                ?>
     
    18031833                                    SplitIt_FlexFields_Payment_Plugin_Settings::update_order_status_to_old( $order );
    18041834
    1805                                     session_start();
     1835                                    if ( !session_id() ) { session_start(); }
    18061836                                    $_SESSION['cancelled_order_message'] = $cancel_message;
    18071837
Note: See TracChangeset for help on using the changeset viewer.