Plugin Directory

Changeset 3764498


Ignore:
Timestamp:
10/25/2026 12:11:12 PM (70 minutes ago)
Author:
sideupksa
Message:

Release 2.3.7: wallet balance check only for bundle merchants

Location:
sideup-shipping-ksa
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sideup-shipping-ksa/tags/2.3.7/js/sideup-1.9.js

    r3596940 r3764498  
    5252                fromZone: SIDEUP_ZONE_NAME_TO_ID[String(d.zone || '').toLowerCase()] || null,
    5353                zoneName: d.zone || '',
    54                 sideupCredit: (d.wallet && d.wallet.sideup_credit != null) ? Number(d.wallet.sideup_credit) : null
     54                sideupCredit: (d.wallet && d.wallet.sideup_credit != null) ? Number(d.wallet.sideup_credit) : null,
     55                // null => merchant is not on a bundle (no_bundle) and ships without a credit check.
     56                bundleId: d.bundle_id != null ? d.bundle_id : null
    5557            };
    5658        });
    … …  
    257259        }
    258260
    259         // Block the shipment when the merchant's SIDEUP credit cannot cover the
    260         // selected courier's price; prompt them to subscribe to a package.
     261        // Bundle merchants only: block the shipment when the merchant's SIDEUP
     262        // credit cannot cover the selected courier's price. No-bundle merchants
     263        // (bundle_id null) ship normally.
    261264        var courierPrice = parseFloat($checked.attr('data-value'));
    262         if (merchant.sideupCredit != null && !isNaN(courierPrice) && merchant.sideupCredit < courierPrice) {
     265        if (merchant.bundleId != null && merchant.sideupCredit != null && !isNaN(courierPrice) && merchant.sideupCredit < courierPrice) {
    263266            Swal.fire({
    264267                icon: 'warning',
  • sideup-shipping-ksa/tags/2.3.7/readme.txt

    r3596940 r3764498  
    77Requires PHP: 7.4
    88Tested up to: 7.0
    9 Stable tag: 2.3.6
     9Stable tag: 2.3.7
    1010WC requires at least: 2.6
    1111WC tested up to: 9.6.0
    … …  
    9393= 2.1.2 =
    9494* fix pricing issues
     95
     96= 2.3.7 =
     97* Wallet balance check now applies only to merchants subscribed to a bundle
  • sideup-shipping-ksa/tags/2.3.7/sideup-shipping-ksa.php

    r3596940 r3764498  
    77 * Author: SIDEUP
    88 * Author URI: https://sa.sideup.co/
    9  * Version: 2.3.6
     9 * Version: 2.3.7
    1010 * Requires at least: 5.0
    1111 * Tested up to: 7.0
    … …  
    820820
    821821    // Enqueue the main JavaScript file
    822     wp_enqueue_script('sideup-js', plugin_dir_url(__FILE__) . 'js/sideup-1.9.js', array('jquery'), '2.3.6', true);
     822    wp_enqueue_script('sideup-js', plugin_dir_url(__FILE__) . 'js/sideup-1.9.js', array('jquery'), '2.3.7', true);
    823823    // wp_enqueue_script('areaMap-json', plugin_dir_url(__FILE__) . 'js/areaMap.json', '1.0', true);
    824824
  • sideup-shipping-ksa/trunk/js/sideup-1.9.js

    r3596940 r3764498  
    5252                fromZone: SIDEUP_ZONE_NAME_TO_ID[String(d.zone || '').toLowerCase()] || null,
    5353                zoneName: d.zone || '',
    54                 sideupCredit: (d.wallet && d.wallet.sideup_credit != null) ? Number(d.wallet.sideup_credit) : null
     54                sideupCredit: (d.wallet && d.wallet.sideup_credit != null) ? Number(d.wallet.sideup_credit) : null,
     55                // null => merchant is not on a bundle (no_bundle) and ships without a credit check.
     56                bundleId: d.bundle_id != null ? d.bundle_id : null
    5557            };
    5658        });
    … …  
    257259        }
    258260
    259         // Block the shipment when the merchant's SIDEUP credit cannot cover the
    260         // selected courier's price; prompt them to subscribe to a package.
     261        // Bundle merchants only: block the shipment when the merchant's SIDEUP
     262        // credit cannot cover the selected courier's price. No-bundle merchants
     263        // (bundle_id null) ship normally.
    261264        var courierPrice = parseFloat($checked.attr('data-value'));
    262         if (merchant.sideupCredit != null && !isNaN(courierPrice) && merchant.sideupCredit < courierPrice) {
     265        if (merchant.bundleId != null && merchant.sideupCredit != null && !isNaN(courierPrice) && merchant.sideupCredit < courierPrice) {
    263266            Swal.fire({
    264267                icon: 'warning',
  • sideup-shipping-ksa/trunk/readme.txt

    r3596940 r3764498  
    77Requires PHP: 7.4
    88Tested up to: 7.0
    9 Stable tag: 2.3.6
     9Stable tag: 2.3.7
    1010WC requires at least: 2.6
    1111WC tested up to: 9.6.0
    … …  
    9393= 2.1.2 =
    9494* fix pricing issues
     95
     96= 2.3.7 =
     97* Wallet balance check now applies only to merchants subscribed to a bundle
  • sideup-shipping-ksa/trunk/sideup-shipping-ksa.php

    r3596940 r3764498  
    77 * Author: SIDEUP
    88 * Author URI: https://sa.sideup.co/
    9  * Version: 2.3.6
     9 * Version: 2.3.7
    1010 * Requires at least: 5.0
    1111 * Tested up to: 7.0
    … …  
    820820
    821821    // Enqueue the main JavaScript file
    822     wp_enqueue_script('sideup-js', plugin_dir_url(__FILE__) . 'js/sideup-1.9.js', array('jquery'), '2.3.6', true);
     822    wp_enqueue_script('sideup-js', plugin_dir_url(__FILE__) . 'js/sideup-1.9.js', array('jquery'), '2.3.7', true);
    823823    // wp_enqueue_script('areaMap-json', plugin_dir_url(__FILE__) . 'js/areaMap.json', '1.0', true);
    824824
Note: See TracChangeset for help on using the changeset viewer.