Plugin Directory

Changeset 3264094


Ignore:
Timestamp:
03/30/2025 01:12:37 PM (12 months ago)
Author:
cod24
Message:
  • Bugs fixes and improvements
  • Fixed load city when no shipping method available
Location:
cod24-shipping
Files:
26 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • cod24-shipping/tags/4.0.2/cod24-shipping.php

    r3257813 r3264094  
    2727        public function __construct()
    2828        {
    29             define('COD24_PLUGIN_VERSION', '4.0.1');
     29            define('COD24_PLUGIN_VERSION', '4.0.2');
    3030            define('COD24_PLUGIN_DIR', plugin_dir_path(__FILE__));
    3131            define('COD24_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cod24-shipping/trunk/assets/js/city-select.js

    r3254068 r3264094  
    106106        var shipToDifferentAddress = $('#ship-to-different-address-checkbox').is(':checked');
    107107        var state = shipToDifferentAddress ? $('#shipping_state').val() : $('#billing_state').val();
    108         var shipping_method = ( $('.shipping_method:checked').val() ) ? $('.shipping_method:checked').val() : $('.shipping_method:first-child').val();
     108        if( $('.shipping_method:checked').length > 0 )
     109            var shipping_method = ( $('.shipping_method:checked').val() ) ? $('.shipping_method:checked').val() : $('.shipping_method:first-child').val();
     110        else
     111            var shipping_method = '';
    109112        $( document.body ).trigger( 'state_changing', [country, state, shipping_method, $container ] );
    110113    });
     
    117120        var $citybox = $container.find( '#billing_city, #shipping_city, #calc_shipping_city' );
    118121       
    119         if (shipping_method.includes('cod24_tipax'))
     122        if (shipping_method != '' && shipping_method.includes('cod24_tipax'))
    120123        {
    121124            var type = 'tipax';
  • cod24-shipping/trunk/cod24-shipping.php

    r3257813 r3264094  
    33Plugin Name: COD24 Shipping For Woocommerce
    44Description: This plugin is adding COD24 shipping methods to woocommerce.
    5 Version: 4.0.2
     5Version: 4.0.3
    66Author: COD24
    77Author URI: https://cod24.ir
     
    2727        public function __construct()
    2828        {
    29             define('COD24_PLUGIN_VERSION', '4.0.1');
     29            define('COD24_PLUGIN_VERSION', '4.0.3');
    3030            define('COD24_PLUGIN_DIR', plugin_dir_path(__FILE__));
    3131            define('COD24_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cod24-shipping/trunk/inc/shipping/class-cod24-tipax.php

    r3254068 r3264094  
    55 * Package: COD24 Shipping
    66 * Author: Rasool Vahdati
    7  * Last Modified Time: 2025/02/01 22:45:38
     7 * Last Modified Time: 2025/03/27 17:51:42
    88 * License: GPL-2.0+
    99 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696                    }
    9797
    98                     /*$user_delivery_address = COD24_Tipax_API::find_city( $package['destination']['city'] );
    99                     if(empty($user_delivery_address['state_id']) && empty($user_delivery_address['city_id']))
    100                         $available = false;*/
     98                    // Check total order amount - Tipax shipping is only available for orders of 400,000 Toman or more
     99                    $current_currency = get_woocommerce_currency();
     100                    $cart_price = WC()->cart->get_cart_contents_total();
     101                    if( $current_currency == 'IRR' ) {
     102                        $total_cart_price = ceil($cart_price / 10);
     103                    } else {
     104                        $total_cart_price = $cart_price;
     105                    }
     106
     107                    if ( $total_cart_price < 400000 ) {
     108                        $available = false;
     109                    }
    101110               
    102111                    return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $available, $package, $this );
  • cod24-shipping/trunk/readme.txt

    r3257813 r3264094  
    44Requires at least: 5.0
    55Tested up to: 6.7
    6 Stable tag: 4.0.2
     6Stable tag: 4.0.3
    77License: GPL-2.0+
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4444== Changelog ==
    4545
     46= 4.0.3 =
     47* Bugs fixes and improvements
     48* Fixed load city when no shipping method available
     49
    4650= 4.0.2 =
    4751* Bugs fixes and improvements
Note: See TracChangeset for help on using the changeset viewer.