Changeset 3318250
- Timestamp:
- 06/26/2025 12:36:50 PM (9 months ago)
- Location:
- cod24-shipping
- Files:
-
- 26 added
- 1 deleted
- 4 edited
-
tags/4.0.6/readme.txt (deleted)
-
tags/4.0.7 (added)
-
tags/4.0.7/assets (added)
-
tags/4.0.7/assets/css (added)
-
tags/4.0.7/assets/css/cod24-woo-admin.css (added)
-
tags/4.0.7/assets/css/sweetalert2.css (added)
-
tags/4.0.7/assets/index.php (added)
-
tags/4.0.7/assets/js (added)
-
tags/4.0.7/assets/js/city-select.js (added)
-
tags/4.0.7/assets/js/cod24-shcod-fee.js (added)
-
tags/4.0.7/assets/js/cod24-woo-admin.js (added)
-
tags/4.0.7/assets/js/sweetalert2.js (added)
-
tags/4.0.7/cod24-shipping.php (added)
-
tags/4.0.7/inc (added)
-
tags/4.0.7/inc/api (added)
-
tags/4.0.7/inc/api/class-cod24-api.php (added)
-
tags/4.0.7/inc/api/class-cod24-tipax-api.php (added)
-
tags/4.0.7/inc/class-cod24-settings.php (added)
-
tags/4.0.7/inc/class-cod24-shcod.php (added)
-
tags/4.0.7/inc/class-cod24-woo.php (added)
-
tags/4.0.7/inc/index.php (added)
-
tags/4.0.7/inc/shipping (added)
-
tags/4.0.7/inc/shipping/class-cod24-pishtaz.php (added)
-
tags/4.0.7/inc/shipping/class-cod24-special.php (added)
-
tags/4.0.7/inc/shipping/class-cod24-tipax.php (added)
-
tags/4.0.7/index.php (added)
-
tags/4.0.7/readme.txt (added)
-
trunk/cod24-shipping.php (modified) (2 diffs)
-
trunk/inc/shipping/class-cod24-pishtaz.php (modified) (3 diffs)
-
trunk/inc/shipping/class-cod24-special.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cod24-shipping/trunk/cod24-shipping.php
r3295424 r3318250 3 3 Plugin Name: COD24 Shipping For Woocommerce 4 4 Description: This plugin is adding COD24 shipping methods to woocommerce. 5 Version: 4.0. 65 Version: 4.0.7 6 6 Author: COD24 7 7 Author URI: https://cod24.ir … … 27 27 public function __construct() 28 28 { 29 define('COD24_PLUGIN_VERSION', '4.0. 6');29 define('COD24_PLUGIN_VERSION', '4.0.7'); 30 30 define('COD24_PLUGIN_DIR', plugin_dir_path(__FILE__)); 31 31 define('COD24_PLUGIN_URL', plugin_dir_url(__FILE__)); -
cod24-shipping/trunk/inc/shipping/class-cod24-pishtaz.php
r3254068 r3318250 5 5 * Package: COD24 Shipping 6 6 * Author: COD24 7 * Last Modified Time: 202 4/09/16 22:53:237 * Last Modified Time: 2025/06/26 15:53:39 8 8 * License: GPL-2.0+ 9 9 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 61 61 'description' => __('Title to be display on site', 'cod24-shipping'), 62 62 'default' => __('Cod24 Pishtaz Shipping', 'cod24-shipping') 63 ), 64 'price' => array( 65 'title' => __('Fallback Price', 'cod24-shipping'), 66 'type' => 'price', 67 'description' => __('Price to use if API fails or returns 0', 'cod24-shipping'), 68 'default' => '60000' 63 69 ) 64 70 ); 65 71 $this->enabled = $this->get_option( 'enabled' ); 66 72 $this->title = $this->get_option( 'title' ); 73 $this->fallback_price = floatval( $this->get_option( 'price' ) ); 67 74 68 75 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); … … 174 181 'IR' => (!empty($response['totalPrice'])) ? $response['totalPrice'] : 0 175 182 ); 176 177 $cost = $countryZones['IR']; 183 184 $cost = floatval($countryZones['IR']); 185 if (empty($cost) || $cost <= 0) { 186 $cost = $this->fallback_price; 187 } 178 188 179 189 // convert current currency -
cod24-shipping/trunk/inc/shipping/class-cod24-special.php
r3254068 r3318250 5 5 * Package: COD24 Shipping 6 6 * Author: COD24 7 * Last Modified Time: 202 4/09/16 22:52:577 * Last Modified Time: 2025/06/26 15:54:00 8 8 * License: GPL-2.0+ 9 9 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 61 61 'description' => __('Title to be display on site', 'cod24-shipping'), 62 62 'default' => __('Cod24 Special Shipping', 'cod24-shipping') 63 ), 64 'price' => array( 65 'title' => __('Fallback Price', 'cod24-shipping'), 66 'type' => 'price', 67 'description' => __('Price to use if API fails or returns 0', 'cod24-shipping'), 68 'default' => '60000' 63 69 ) 64 70 ); 65 71 $this->enabled = $this->get_option( 'enabled' ); 66 72 $this->title = $this->get_option( 'title' ); 73 $this->fallback_price = floatval( $this->get_option( 'price' ) ); 67 74 68 75 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); … … 179 186 ); 180 187 181 $cost = $countryZones['IR']; 188 $cost = floatval($countryZones['IR']); 189 if (empty($cost) || $cost <= 0) { 190 $cost = $this->fallback_price; 191 } 182 192 183 193 // convert current currency 184 185 194 if( $current_currency == 'IRR' ) { 186 195 $shipping_cost = ceil($cost * 10); -
cod24-shipping/trunk/readme.txt
r3295424 r3318250 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8.1 6 Stable tag: 4.0. 66 Stable tag: 4.0.7 7 7 License: GPL-2.0+ 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 44 44 == Changelog == 45 46 = 4.0.7 = 47 * Added fallback price for pishtaz and special shipping methods 48 * Bugs fixes and improvements 45 49 46 50 = 4.0.6 =
Note: See TracChangeset
for help on using the changeset viewer.