Plugin Directory

Changeset 3453623


Ignore:
Timestamp:
02/04/2026 08:57:59 AM (2 months ago)
Author:
SplitIt
Message:

release version 6.2.0

Location:
splitit-installment-payments
Files:
614 added
12 edited

Legend:

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

    r3414265 r3453623  
    33All notable changes to this project will be documented in this file
    44-
     5
     6### 6.2.0
     7* Code improvements and bug fixes
     8* Tested compatibility with WordPress version 6.9 and WooCommerce version 10.4.3
    59
    610### 6.1.0
  • splitit-installment-payments/trunk/changelog.txt

    r3414265 r3453623  
    11*** Splitit Changelog ***
     2
     32026-02-04 - version 6.2.0
     4* Code improvements and bug fixes
     5* Tested compatibility with WordPress version 6.9 and WooCommerce version 10.4.3
    26
    372025-12-08 - version 6.1.0
  • splitit-installment-payments/trunk/classes/class-splitit-flexfields-payment-plugin-log.php

    r3357903 r3453623  
    6363        $table_name = $wpdb->prefix . self::$db_table_log;
    6464
    65         if ( isset( $data['user_id'] ) && 0 === (int) $data['user_id'] ) {
    66             $data['user_id'] = null;
    67         }
     65        $user_id = ! empty( $data['user_id'] ) && (int) $data['user_id'] > 0
     66            ? (int) $data['user_id']
     67            : null;
    6868
    6969        $wpdb->insert(
    7070            "$table_name",
    7171            array(
    72                 'user_id' => $data['user_id'] ?? null,
     72                'user_id' => $user_id,
    7373                'method'  => $data['method'] ?? null,
    7474                'message' => $data['message'] ?? null,
     
    152152        $table_name = $wpdb->prefix . self::$db_table_transaction_log;
    153153
    154         if ( isset( $data['user_id'] ) && (int) 0 === $data['user_id'] ) {
    155             $data['user_id'] = null;
    156         }
    157 
    158         $wpdb->insert(
     154        $user_id = ! empty( $data['user_id'] ) && (int) $data['user_id'] > 0
     155            ? (int) $data['user_id']
     156            : null;
     157
     158        $result = $wpdb->insert(
    159159            "$table_name",
    160160            array(
    161                 'user_id'                 => $data['user_id'] ?? null,
     161                'user_id'                 => $user_id,
    162162                'order_id'                => $data['order_id'] ?? null,
    163163                'installment_plan_number' => $data['installment_plan_number'] ?? null,
     
    168168            )
    169169        );
     170
     171        if ( false === $result ) {
     172            $error_message = ! empty( $wpdb->last_error )
     173                ? $wpdb->last_error
     174                : 'unknown DB error';
     175            self::save_log_info(
     176                array(
     177                    'user_id' => $user_id,
     178                    'method'  => __( 'splitit_flexfields_payment_plugin_transaction_log() Splitit', 'splitit-installment-payments' ),
     179                ),
     180                'splitit_flexfields_payment_plugin_transaction_log insert failed: ' . $error_message,
     181                'error'
     182            );
     183        }
    170184    }
    171185
  • splitit-installment-payments/trunk/classes/traits/splitit-flexfields-payment-plugin-upstream-messaging-trait.php

    r3414265 r3453623  
    55 * Trait SplitIt_FlexFields_Payment_Plugin_UpstreamMessagingTrait
    66 */
     7
     8if ( ! defined( 'ABSPATH' ) ) {
     9    exit;
     10}
     11
    712trait SplitIt_FlexFields_Payment_Plugin_UpstreamMessagingTrait {
    813
  • splitit-installment-payments/trunk/cron/check-refund-status.php

    r3278936 r3453623  
    66 * Function for create checkout data table
    77 */
     8
     9if ( ! defined( 'ABSPATH' ) ) {
     10    exit;
     11}
    812
    913require_once dirname( __DIR__ ) . '/classes/class-splitit-flexfields-payment-plugin-log.php';
  • splitit-installment-payments/trunk/db/create-async-refund-log-table.php

    r3357903 r3453623  
    66 * Function for create checkout data table
    77 */
     8
     9if ( ! defined( 'ABSPATH' ) ) {
     10    exit;
     11}
    812
    913require_once dirname( __DIR__ ) . '/classes/class-splitit-flexfields-payment-plugin-log.php';
     
    5559            if ( $wpdb->last_error ) {
    5660                SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_async_refund_log_table() - create_splitit_async_refund_log_table Error: ' . $wpdb->last_error, 'error' );
    57             } else {
    58                 if ( '' !== $sql ) {
     61            } elseif ( '' !== $sql ) {
    5962                    SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_async_refund_log_table() - splitit_async_refund_log_table successfully created', 'info' );
    60                 }
    6163            }
    6264
     
    9799        if ( $wpdb->last_error ) {
    98100            SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_async_refund_log_table() - create_splitit_async_refund_log_table Error: ' . $wpdb->last_error, 'error' );
    99         } else {
    100             if ( '' !== $sql ) {
     101        } elseif ( '' !== $sql ) {
    101102                SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_async_refund_log_table() - splitit_async_refund_log_table successfully created', 'info' );
    102             }
    103103        }
    104104    }
  • splitit-installment-payments/trunk/db/create-log-table.php

    r3357903 r3453623  
    66 * Function for create log table
    77 */
     8
     9if ( ! defined( 'ABSPATH' ) ) {
     10    exit;
     11}
    812
    913require_once dirname( __DIR__ ) . '/classes/class-splitit-flexfields-payment-plugin-log.php';
     
    3640                    message TEXT DEFAULT NULL NULL,
    3741                    date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    38                     FOREIGN KEY (user_id) REFERENCES " . $wpdb->base_prefix . "users(ID) ON DELETE CASCADE,
    3942                    PRIMARY KEY  (id)
    4043                ) $charset_collate;";
     
    4750                if ( $wpdb->last_error ) {
    4851                    SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_table() - create_splitit_log_table Error: ' . $wpdb->last_error, 'error' );
    49                 } else {
    50                     if ( '' !== $sql ) {
     52                } elseif ( '' !== $sql ) {
    5153                        SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_table() - splitit_log_table successfully created', 'info' );
    52                     }
    5354                }
    5455            }
     
    7172                message TEXT DEFAULT NULL NULL,
    7273                date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    73                 FOREIGN KEY (user_id) REFERENCES " . $wpdb->base_prefix . "users(ID) ON DELETE CASCADE,
    7474                PRIMARY KEY  (id)
    7575            ) $charset_collate;";
     
    8282            if ( $wpdb->last_error ) {
    8383                SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_table() - create_splitit_log_table Error: ' . $wpdb->last_error, 'error' );
    84             } else {
    85                 if ( '' !== $sql ) {
     84            } elseif ( '' !== $sql ) {
    8685                    SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_table() - splitit_log_table successfully created', 'info' );
    87                 }
    8886            }
    8987        }
  • splitit-installment-payments/trunk/db/create-order-data-with-ipn.php

    r3357903 r3453623  
    66 * Function for create checkout data table
    77 */
     8
     9if ( ! defined( 'ABSPATH' ) ) {
     10    exit;
     11}
    812
    913require_once dirname( __DIR__ ) . '/classes/class-splitit-flexfields-payment-plugin-log.php';
     
    6569            if ( $wpdb->last_error ) {
    6670                SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_create_order_data_with_ipn() - create_splitit_order_data_with_ipn_table Error: ' . $wpdb->last_error, 'error' );
    67             } else {
    68                 if ( '' !== $sql ) {
     71            } elseif ( '' !== $sql ) {
    6972                    SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_create_order_data_with_ipn() - splitit_order_data_with_ipn_table successfully created', 'info' );
    70                 }
    7173            }
    7274
     
    117119        if ( $wpdb->last_error ) {
    118120            SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_create_order_data_with_ipn() - create_splitit_order_data_with_ipn_table Error: ' . $wpdb->last_error, 'error' );
    119         } else {
    120             if ( '' !== $sql ) {
     121        } elseif ( '' !== $sql ) {
    121122                SplitIt_FlexFields_Payment_Plugin_Log::save_log_info( $log_data, 'splitit_flexfields_payment_plugin_create_log_create_order_data_with_ipn() - splitit_order_data_with_ipn_table successfully created', 'info' );
    122             }
    123123        }
    124124    }
  • splitit-installment-payments/trunk/db/create-transactions-tracking-table.php

    r3357903 r3453623  
    66 * Function for create transaction tracking table
    77 */
     8
     9if ( ! defined( 'ABSPATH' ) ) {
     10    exit;
     11}
    812
    913require_once dirname( __DIR__ ) . '/classes/class-splitit-flexfields-payment-plugin-log.php';
     
    4347                    plan_create_succeed tinyint(4) NOT NULL DEFAULT 0,
    4448                    date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    45                     FOREIGN KEY (user_id) REFERENCES " . $wpdb->base_prefix . 'users(ID) ON DELETE CASCADE,
    46                     FOREIGN KEY (order_id) REFERENCES ' . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
     49                    FOREIGN KEY (order_id) REFERENCES " . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
    4750                    PRIMARY KEY  (id)
    4851                ) $charset_collate;";
     
    7679                        plan_create_succeed tinyint(4) NOT NULL DEFAULT 0,
    7780                        date datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    78                         FOREIGN KEY (user_id) REFERENCES " . $wpdb->base_prefix . 'users(ID) ON DELETE CASCADE,
    79                         FOREIGN KEY (order_id) REFERENCES ' . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
     81                        FOREIGN KEY (order_id) REFERENCES " . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
    8082                        PRIMARY KEY  (id)
    8183                    ) $charset_collate;";
     
    122124                plan_create_succeed tinyint(4) NOT NULL DEFAULT 0,
    123125                date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    124                 FOREIGN KEY (user_id) REFERENCES " . $wpdb->base_prefix . 'users(ID) ON DELETE CASCADE,
    125                 FOREIGN KEY (order_id) REFERENCES ' . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
     126                FOREIGN KEY (order_id) REFERENCES " . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
    126127                PRIMARY KEY  (id)
    127128            ) $charset_collate;";
     
    155156                    plan_create_succeed tinyint(4) NOT NULL DEFAULT 0,
    156157                    date datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
    157                     FOREIGN KEY (user_id) REFERENCES " . $wpdb->base_prefix . 'users(ID) ON DELETE CASCADE,
    158                     FOREIGN KEY (order_id) REFERENCES ' . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
     158                    FOREIGN KEY (order_id) REFERENCES " . $wpdb->prefix . "posts(ID) ON DELETE CASCADE,
    159159                    PRIMARY KEY  (id)
    160160                ) $charset_collate;";
  • splitit-installment-payments/trunk/readme.txt

    r3414265 r3453623  
    33Tags: ecommerce, e-commerce, checkout, payment, Splitit
    44Requires at least: 5.6
    5 Tested up to: 6.8
     5Tested up to: 6.9
    66Requires PHP: 7.0
    77WC requires at least: 6.0
    8 WC tested up to: 10.3.6
    9 Stable tag: 6.1.0
     8WC tested up to: 10.4.3
     9Stable tag: 6.2.0
    1010License: GPLv3
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1515== Description ==
    1616
    17 **Splitit – Interest-Free* Monthly Payments plugin for WooCommerc**e<br/>
     17**Splitit – Interest-Free* Monthly Payments plugin for WooCommerce**<br/>
    1818<br/>
    1919Empower your customers with a seamless, interest-free* installment payment option—without applications, hidden fees, or new credit lines.
     
    7979
    8080== Changelog ==
     81
     82= 6.2.0 - 2026-02-04
     83Code improvements and bug fixes
     84Tested compatibility with WordPress version 6.9 and WooCommerce version 10.4.3
    8185
    8286= 6.1.0 - 2025-12-08
  • splitit-installment-payments/trunk/splitIt-flexfields-payment-gateway.php

    r3414265 r3453623  
    1111 * Author URI: https://www.splitit.com/
    1212 * License: GPLv3
    13  * Version: 6.1.0
     13 * Version: 6.2.0
    1414 * Requires Plugins: woocommerce
    1515 * Requires at least: 5.6
    16  * Tested up to: 6.8
     16 * Tested up to: 6.9
    1717 * WC requires at least: 6.0
    18  * WC tested up to: 10.3.6
     18 * WC tested up to: 10.4.3
    1919 * Requires PHP: 7.0
    2020 */
     
    3131
    3232global $plugin_version;
    33 $plugin_version = '6.1.0';
     33$plugin_version = '6.2.0';
    3434
    3535global $required_splitit_php_version;
     
    280280require_once 'db/create-transactions-tracking-table.php';
    281281require_once 'db/create-order-data-with-ipn.php';
    282 require_once 'db/create-async-refund-log-table.php'; // for async refunds
     282require_once 'db/create-async-refund-log-table.php';
     283
     284require_once 'db/remove-user-id-fk-from-splitit-transactions-log-table.php';
     285require_once 'db/remove-user-id-fk-from-splitit-log-table.php';
    283286
    284287/*
     
    296299if ( function_exists( 'splitit_flexfields_payment_plugin_create_async_refund_log_table' ) ) {
    297300    register_activation_hook( __FILE__, 'splitit_flexfields_payment_plugin_create_async_refund_log_table' );
     301}
     302
     303if ( function_exists( 'splitit_flexfields_payment_plugin_remove_user_id_fk_from_splitit_transactions_log_table' ) ) {
     304    register_activation_hook( __FILE__, 'splitit_flexfields_payment_plugin_remove_user_id_fk_from_splitit_transactions_log_table' );
     305}
     306if ( function_exists( 'splitit_flexfields_payment_plugin_remove_user_id_fk_from_splitit_log_table' ) ) {
     307    register_activation_hook( __FILE__, 'splitit_flexfields_payment_plugin_remove_user_id_fk_from_splitit_log_table' );
    298308}
    299309
     
    447457
    448458            // @This action hook changed order status
    449             if ( strpos( DOMAIN, 'crockettdoodles' ) !== false || strpos( DOMAIN, 'crockettpups' ) !== false ) {
     459            if ( strpos( DOMAIN, 'crockettdoodles' ) !== false || strpos( DOMAIN, 'crockettpups' ) !== false || strpos( DOMAIN, 'recwatches' ) !== false ) {
    450460                add_action( 'woocommerce_checkout_order_processed', array( $this, 'woocommerce_payment_change_order_status' ), 10, 1 );
    451461            } else {
     
    58775887                if ( in_array( $billing_country, array( 'US', 'UM' ), true ) ) {
    58785888                    if ( ! isset( $_POST['fields']['billing_state'] ) || empty( $_POST['fields']['billing_state'] ) ) {
    5879                         $errors[] = '<li>' . sprintf(
    5880                             __( 'For shoppers in the U.S., the %s field is mandatory.', 'splitit-installment-payments' ),
    5881                             '<strong>' . __( 'State', 'splitit-installment-payments' ) . '</strong>'
    5882                         ) . '</li>';
     5889
     5890                        /* translators: %s is the name of the required billing field (e.g. "State"). */
     5891                        $message = __( 'For shoppers in the U.S., the %s field is mandatory.', 'splitit-installment-payments' );
     5892
     5893                        $errors[] = '<li><strong>' .
     5894                            sprintf( $message, __( 'State', 'splitit-installment-payments' ) ) .
     5895                            '</strong></li>';
    58835896                    }
    58845897                }
  • splitit-installment-payments/trunk/template/flex-field-index.php

    r3237941 r3453623  
    11<?php
    22// flex-form build file.
     3
     4if ( ! defined( 'ABSPATH' ) ) {
     5    exit;
     6}
     7
    38?>
    49<div id="flex-form" />
Note: See TracChangeset for help on using the changeset viewer.