Changeset 3086946
- Timestamp:
- 05/15/2024 08:37:39 AM (23 months ago)
- Location:
- splitit-installment-payments
- Files:
-
- 1 added
- 4 edited
-
tags/4.1.6 (added)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/assets/js/admin.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/splitIt-flexfields-payment-gateway.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
splitit-installment-payments/trunk/CHANGELOG.md
r3053263 r3086946 3 3 All notable changes to this project will be documented in this file 4 4 - 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 5 9 6 10 ### 4.1.5 -
splitit-installment-payments/trunk/assets/js/admin.js
r3053263 r3086946 908 908 ); 909 909 }, 910 1000910 2000 911 911 ) 912 912 } -
splitit-installment-payments/trunk/readme.txt
r3053263 r3086946 3 3 Tags: ecommerce, e-commerce, commerce, wordpress ecommerce, sales, sell, shop, shopping, checkout, payment, splitit 4 4 Requires at least: 5.6 5 Tested up to: 6. 4.35 Tested up to: 6.5.2 6 6 WC requires at least: 5.5 7 WC tested up to: 8. 6.18 Stable tag: 4.1. 57 WC tested up to: 8.8.2 8 Stable tag: 4.1.6 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 61 61 62 62 == Changelog == 63 64 = 4.1.6 - 2024-05-15 = 65 Code improvements and bug fixes 66 Tested compatibility with WordPress version 6.5.2 and Woocommerce version 8.8.2 63 67 64 68 = 4.1.5 - 2024-03-18 = -
splitit-installment-payments/trunk/splitIt-flexfields-payment-gateway.php
r3053263 r3086946 10 10 * Author: Splitit 11 11 * Author URI: https://www.splitit.com/ 12 * Version: 4.1. 512 * Version: 4.1.6 13 13 */ 14 14 … … 24 24 25 25 global $plugin_version; 26 $plugin_version = '4.1. 5';26 $plugin_version = '4.1.6'; 27 27 28 28 global $required_splitit_php_version; … … 397 397 $this->init_ajax_frontend_hook(); 398 398 399 add_action( 'shutdown', array( $this, 'check_fatal_errors' ) ); 400 399 401 add_action( 'parse_request', array( $this, 'splitit_custom_url_handler' ) ); 400 402 } 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 } 401 425 402 426 /** … … 674 698 $callback_uri = get_site_url() . '/splitit-auth/callback'; 675 699 676 session_start();700 if ( !session_id() ) { session_start(); } 677 701 $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 } 678 706 679 707 $header = array( 'Content-Type: application/x-www-form-urlencoded' ); … … 692 720 echo curl_error( $curl ); 693 721 } 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>'; 696 725 echo $response; 726 echo '</div>'; 697 727 } 698 728 699 729 $id_token = json_decode( $response )->id_token; 700 730 if ( $id_token ) { 701 session_start();731 if ( !session_id() ) { session_start(); } 702 732 $_SESSION['id_token'] = $id_token; 703 733 } … … 874 904 ); 875 905 876 session_start();906 if ( !session_id() ) { session_start(); } 877 907 $_SESSION['merchants_list'] = $merchants_list; 878 908 ?> … … 1193 1223 */ 1194 1224 public function generate_terminals_list_dropdown( $terminals_list, $credentials_list, $merchant_id, $user_data, $env ) { 1195 session_start();1225 if ( !session_id() ) { session_start(); } 1196 1226 $_SESSION['terminals_list'] = $terminals_list; 1197 1227 $_SESSION['credentials_list'] = $credentials_list; … … 1461 1491 $access_token = $this->get_access_token( $data['code'] ); 1462 1492 if ( $access_token ) { 1463 session_start();1493 if ( !session_id() ) { session_start(); } 1464 1494 $_SESSION['access_token'] = $access_token; 1465 1495 $user_data = $this->get_user_data( 'https://id.' . $env . '.splitit.com/api/user/profile', $access_token ); … … 1479 1509 $merchant_id = $_POST['merchant_id']; 1480 1510 1481 session_start();1511 if ( !session_id() ) { session_start(); } 1482 1512 $access_token = $_SESSION['access_token'] ?? null; 1483 1513 $user_data = get_option( 'splitit_logged_user_data' ); … … 1502 1532 $client_id = $_POST['client_id']; 1503 1533 1504 session_start();1534 if ( !session_id() ) { session_start(); } 1505 1535 $merchants_list = $_SESSION['merchants_list'] ?? null; 1506 1536 $terminals_list = $_SESSION['terminals_list'] ?? null; … … 1585 1615 $code_verifier = isset( $_POST['code_verifier'] ) ? wc_clean( $_POST['code_verifier'] ) : null; 1586 1616 if ( $code_verifier ) { 1587 session_start();1617 if ( !session_id() ) { session_start(); } 1588 1618 $_SESSION['code_verifier'] = $code_verifier; 1589 1619 } … … 1765 1795 function displaying_custom_admin_notice() 1766 1796 { 1767 session_start();1797 if ( !session_id() ) { session_start(); } 1768 1798 if (isset($_SESSION['cancelled_order_message'])) { 1769 1799 ?> … … 1803 1833 SplitIt_FlexFields_Payment_Plugin_Settings::update_order_status_to_old( $order ); 1804 1834 1805 session_start(); 1835 if ( !session_id() ) { session_start(); } 1806 1836 $_SESSION['cancelled_order_message'] = $cancel_message; 1807 1837
Note: See TracChangeset
for help on using the changeset viewer.