Changeset 3492326
- Timestamp:
- 03/27/2026 05:59:08 AM (5 days ago)
- Location:
- small-package-quotes-wwe-edition
- Files:
-
- 8 edited
- 1 copied
-
tags/5.3.9 (copied) (copied from small-package-quotes-wwe-edition/trunk)
-
tags/5.3.9/readme.txt (modified) (2 diffs)
-
tags/5.3.9/small_packages_shipping_class.php (modified) (2 diffs)
-
tags/5.3.9/small_packages_tab_class_woocommrece.php (modified) (1 diff)
-
tags/5.3.9/woocommerceShip.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/small_packages_shipping_class.php (modified) (2 diffs)
-
trunk/small_packages_tab_class_woocommrece.php (modified) (1 diff)
-
trunk/woocommerceShip.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
small-package-quotes-wwe-edition/tags/5.3.9/readme.txt
r3479759 r3492326 4 4 Requires at least: 6.4 5 5 Tested up to: 6.9 6 Stable tag: 5.3. 86 Stable tag: 5.3.9 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 141 141 142 142 == Changelog == 143 144 = 5.3.9 - 2026-03-27 = 145 * Update: Added settings to suppress plugin rates when a valid free shipping coupon code is applied. 143 146 144 147 = 5.3.8 - 2026-03-11 = -
small-package-quotes-wwe-edition/tags/5.3.9/small_packages_shipping_class.php
r3479759 r3492326 256 256 } 257 257 258 $coupon = WC()->cart->get_coupons(); 259 // Suppress plugin rates when a free shipping coupon code is applied 260 if (get_option('suppress_plugin_rates_free_shipping_coupon_wwe_small') == 'yes' && !empty($coupon) && $this->wwe_small_free_shipping_coupon($coupon)) { 261 return []; 262 } 263 258 264 $this->package_plugin = get_option('wwe_small_packages_quotes_package'); 259 265 $selected_quotes_service_options_array = $this->wwe_smpkg_get_active_services(); … … 1006 1012 return $updated_rates; 1007 1013 } 1014 1015 /** 1016 * Check is free shipping or not 1017 * @param $coupon 1018 * @return bool 1019 */ 1020 function wwe_small_free_shipping_coupon($coupon) 1021 { 1022 foreach ($coupon as $value) { 1023 if ($value->get_free_shipping() == 1) return true; 1024 } 1025 1026 return false; 1027 } 1008 1028 } 1009 1029 -
small-package-quotes-wwe-edition/tags/5.3.9/small_packages_tab_class_woocommrece.php
r3479759 r3492326 682 682 'id' => 'en_ignore_items_through_freight_classification' 683 683 ), 684 'suppress_plugin_rates_free_shipping_coupon_wwe_small' => array( 685 'name' => __('Suppress plugin rates when a free shipping coupon code is applied', 'ltl-freight-quotes-worldwide-express-edition'), 686 'type' => 'checkbox', 687 'desc' => '', 688 'id' => 'suppress_plugin_rates_free_shipping_coupon_wwe_small' 689 ), 684 690 'allow_other_plugins_wwe_small_packages' => array( 685 691 'name' => __('Allow other plugins to show quotes ', 'small-package-quotes-wwe-edition'), -
small-package-quotes-wwe-edition/tags/5.3.9/woocommerceShip.php
r3479759 r3492326 6 6 Author: Eniture Technology 7 7 Author URI: https://eniture.com/ 8 Version: 5.3. 88 Version: 5.3.9 9 9 Text Domain: small-package-quotes-wwe-edition 10 License: GPL-2.0-or-later 10 License: GPLv2 or later 11 Requires Plugins: woocommerce 11 12 */ 12 13 /* -
small-package-quotes-wwe-edition/trunk/readme.txt
r3479759 r3492326 4 4 Requires at least: 6.4 5 5 Tested up to: 6.9 6 Stable tag: 5.3. 86 Stable tag: 5.3.9 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 141 141 142 142 == Changelog == 143 144 = 5.3.9 - 2026-03-27 = 145 * Update: Added settings to suppress plugin rates when a valid free shipping coupon code is applied. 143 146 144 147 = 5.3.8 - 2026-03-11 = -
small-package-quotes-wwe-edition/trunk/small_packages_shipping_class.php
r3479759 r3492326 256 256 } 257 257 258 $coupon = WC()->cart->get_coupons(); 259 // Suppress plugin rates when a free shipping coupon code is applied 260 if (get_option('suppress_plugin_rates_free_shipping_coupon_wwe_small') == 'yes' && !empty($coupon) && $this->wwe_small_free_shipping_coupon($coupon)) { 261 return []; 262 } 263 258 264 $this->package_plugin = get_option('wwe_small_packages_quotes_package'); 259 265 $selected_quotes_service_options_array = $this->wwe_smpkg_get_active_services(); … … 1006 1012 return $updated_rates; 1007 1013 } 1014 1015 /** 1016 * Check is free shipping or not 1017 * @param $coupon 1018 * @return bool 1019 */ 1020 function wwe_small_free_shipping_coupon($coupon) 1021 { 1022 foreach ($coupon as $value) { 1023 if ($value->get_free_shipping() == 1) return true; 1024 } 1025 1026 return false; 1027 } 1008 1028 } 1009 1029 -
small-package-quotes-wwe-edition/trunk/small_packages_tab_class_woocommrece.php
r3479759 r3492326 682 682 'id' => 'en_ignore_items_through_freight_classification' 683 683 ), 684 'suppress_plugin_rates_free_shipping_coupon_wwe_small' => array( 685 'name' => __('Suppress plugin rates when a free shipping coupon code is applied', 'ltl-freight-quotes-worldwide-express-edition'), 686 'type' => 'checkbox', 687 'desc' => '', 688 'id' => 'suppress_plugin_rates_free_shipping_coupon_wwe_small' 689 ), 684 690 'allow_other_plugins_wwe_small_packages' => array( 685 691 'name' => __('Allow other plugins to show quotes ', 'small-package-quotes-wwe-edition'), -
small-package-quotes-wwe-edition/trunk/woocommerceShip.php
r3479759 r3492326 6 6 Author: Eniture Technology 7 7 Author URI: https://eniture.com/ 8 Version: 5.3. 88 Version: 5.3.9 9 9 Text Domain: small-package-quotes-wwe-edition 10 License: GPL-2.0-or-later 10 License: GPLv2 or later 11 Requires Plugins: woocommerce 11 12 */ 12 13 /*
Note: See TracChangeset
for help on using the changeset viewer.