Plugin Directory

Changeset 3350192


Ignore:
Timestamp:
08/26/2025 08:46:23 AM (7 months ago)
Author:
SplitIt
Message:

release version 4.3.0

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

Legend:

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

    r3297893 r3350192  
    33All notable changes to this project will be documented in this file
    44-
     5
     6### 4.3.0
     7* Fixed postcode validation to respect the selected country’s address requirements
     8* Tested compatibility with WordPress version 6.8.2 and WooCommerce version 10.1.1
    59
    610### 4.2.9
  • splitit-installment-payments/trunk/changelog.txt

    r3297893 r3350192  
    11*** Splitit Changelog ***
     2
     32025-08-26 - version 4.3.0
     4* Fixed postcode validation to respect the selected country’s address requirements
     5* Tested compatibility with WordPress version 6.8.2 and WooCommerce version 10.1.1
    26
    372025-05-21 - version 4.2.9
  • splitit-installment-payments/trunk/readme.txt

    r3297893 r3350192  
    66Requires PHP: 7.0
    77WC requires at least: 6.0
    8 WC tested up to: 9.8.5
    9 Stable tag: 4.2.9
     8WC tested up to: 10.1.1
     9Stable tag: 4.3.0
    1010License: GPLv3
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    7979
    8080== Changelog ==
     81
     82= 4.3.0 - 2025-08-26
     83Fixed postcode validation to respect the selected country’s address requirements
     84Tested compatibility with WordPress version 6.8.2 and WooCommerce version 10.1.1
    8185
    8286= 4.2.9 - 2025-05-21 =
  • splitit-installment-payments/trunk/splitIt-flexfields-payment-gateway.php

    r3297893 r3350192  
    1111 * Author URI: https://www.splitit.com/
    1212 * License: GPLv3
    13  * Version: 4.2.9
     13 * Version: 4.3.0
    1414 * Requires Plugins: woocommerce
    1515 * Requires at least: 5.6
    1616 * Tested up to: 6.8
    1717 * WC requires at least: 6.0
    18  * WC tested up to: 9.8.5
     18 * WC tested up to: 10.1.1
    1919 * Requires PHP: 7.0
    2020 */
     
    3131
    3232global $plugin_version;
    33 $plugin_version = '4.2.9';
     33$plugin_version = '4.3.0';
    3434
    3535global $required_splitit_php_version;
     
    447447
    448448            // @This action hook changed order status
    449             if ( strpos( DOMAIN, 'crockettdoodles' ) !== false ) {
     449            if ( strpos( DOMAIN, 'crockettdoodles' ) !== false || strpos( DOMAIN, 'crockettpups' ) !== false ) {
    450450                add_action( 'woocommerce_checkout_order_processed', array( $this, 'woocommerce_payment_change_order_status' ), 10, 1 );
    451451            } else {
     
    59225922        public function checkout_validate() {
    59235923            if ( isset( $_POST ) ) {
    5924                 $_POST           = stripslashes_deep( $_POST );
    5925                 $errors          = array();
    5926                 $countries       = new WC_Countries();
    5927                 $billings_fields = $countries->get_address_fields( $countries->get_base_country(), 'billing_' );
    5928                 $shipping_fields = $countries->get_address_fields( $countries->get_base_country(), 'shipping_' );
     5924                $_POST     = stripslashes_deep( $_POST );
     5925                $errors    = array();
     5926                $countries = new WC_Countries();
     5927
     5928                $all_fields                = isset( $_POST['fields'] ) ? wc_clean( wp_unslash( $_POST['fields'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Input is sanitized using wc_clean() after wp_unslash().
     5929                $ship_to_different_address = ( isset( $all_fields['ship_to_different_address'] ) && $all_fields['ship_to_different_address'] ) ? true : false;
     5930
     5931                $billing_country  = isset( $_POST['fields']['billing_country'] ) ? wc_clean( wp_unslash( $_POST['fields']['billing_country'] ) ) : $countries->get_base_country(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Input is sanitized using wc_clean() after wp_unslash().
     5932                $shipping_country = isset( $_POST['fields']['shipping_country'] ) ? wc_clean( wp_unslash( $_POST['fields']['shipping_country'] ) ) : $countries->get_base_country(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Input is sanitized using wc_clean() after wp_unslash().
     5933
     5934                $billings_fields = $countries->get_address_fields( $billing_country, 'billing_' );
     5935                $shipping_fields = $countries->get_address_fields( $ship_to_different_address ? $shipping_country : $billing_country, 'shipping_' );
    59295936
    59305937                $wc_fields = array_merge( $billings_fields, $shipping_fields );
    5931 
    5932                 $all_fields = isset( $_POST['fields'] ) ? wc_clean( wp_unslash( $_POST['fields'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    59335938
    59345939                if ( ! is_user_logged_in() && isset( $all_fields['createaccount'] ) && isset( $all_fields['billing_email'] ) && '' != $all_fields['billing_email'] ) {
     
    59725977                }
    59735978
    5974                 $ship_to_different_address = ( isset( $all_fields['ship_to_different_address'] ) && $all_fields['ship_to_different_address'] ) ? true : false;
    5975 
    59765979                if ( ! $ship_to_different_address ) {
    59775980                    $all_fields['shipping_first_name'] = $all_fields['billing_first_name'] ?? '';
     
    59915994                    switch ( $key ) {
    59925995                        case 'billing_postcode':
    5993                             if ( isset( $wc_fields[ $key ]['required'] ) && $wc_fields[ $key ]['required'] && ( ! WC_Validation::is_postcode( $value, $all_fields['billing_country'] ) || empty( $value ) ) ) {
    5994                                 $errors[] = '<li><strong>' . __( 'Billing', 'splitit-installment-payments' ) . ' ' . $wc_fields[ $key ]['label'] . '</strong> ' . __( 'is not valid.', 'splitit-installment-payments' ) . '</li>';
     5996                            if ( isset( $wc_fields[ $key ]['required'] ) && $wc_fields[ $key ]['required'] ) {
     5997                                if ( ! WC_Validation::is_postcode( $value, $all_fields['billing_country'] ) || empty( $value ) ) {
     5998                                    $errors[] = '<li><strong>' . __( 'Billing', 'splitit-installment-payments' ) . ' ' . $wc_fields[ $key ]['label'] . '</strong> ' . __( 'is not valid.', 'splitit-installment-payments' ) . '</li>';
     5999                                }
    59956000                            }
    59966001                            break;
    59976002
    59986003                        case 'shipping_postcode':
    5999                             if ( isset( $wc_fields[ $key ]['required'] ) && $wc_fields[ $key ]['required'] && ( ! WC_Validation::is_postcode( $value, $all_fields['shipping_country'] ) || empty( $value ) ) ) {
    6000                                 $errors[] = '<li><strong>' . __( 'Shipping', 'splitit-installment-payments' ) . ' ' . $wc_fields[ $key ]['label'] . '</strong> ' . __( 'is not valid.', 'splitit-installment-payments' ) . '</li>';
     6004                            if ( isset( $wc_fields[ $key ]['required'] ) && $wc_fields[ $key ]['required'] ) {
     6005                                if ( ! WC_Validation::is_postcode( $value, $all_fields['shipping_country'] ) || empty( $value ) ) {
     6006                                    $errors[] = '<li><strong>' . __( 'Shipping', 'splitit-installment-payments' ) . ' ' . $wc_fields[ $key ]['label'] . '</strong> ' . __( 'is not valid.', 'splitit-installment-payments' ) . '</li>';
     6007                                }
    60016008                            }
    60026009                            break;
Note: See TracChangeset for help on using the changeset viewer.