Changeset 3457537
- Timestamp:
- 02/09/2026 10:52:48 PM (10 days ago)
- Location:
- fish-and-ships/trunk
- Files:
-
- 4 edited
-
fish-and-ships.php (modified) (3 diffs)
-
includes/logs-panel.php (modified) (4 diffs)
-
includes/shipping-class.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fish-and-ships/trunk/fish-and-ships.php
r3435451 r3457537 4 4 * Plugin URI: https://www.wp-centrics.com/ 5 5 * Description: The most flexible and all-in-one table rate shipping plugin. Previously named "Fish and Ships" 6 * Version: 2.1. 66 * Version: 2.1.7 7 7 * Author: wpcentrics 8 8 * Author URI: https://www.wp-centrics.com … … 12 12 * Tested up to: 6.9 13 13 * WC requires at least: 3.0 14 * WC tested up to: 10. 4.314 * WC tested up to: 10.5.0 15 15 * Requires PHP: 7.0 16 16 * Requires Plugins: woocommerce … … 43 43 } else { 44 44 45 define ('WC_FNS_VERSION', '2.1. 6' );45 define ('WC_FNS_VERSION', '2.1.7' ); 46 46 define ('WC_FNS_PATH', dirname(__FILE__) . '/' ); 47 47 define ('WC_FNS_URL', plugin_dir_url( __FILE__ ) ); -
fish-and-ships/trunk/includes/logs-panel.php
r3230054 r3457537 11 11 * @package Advanced Shipping Rates for WC 12 12 * @since 1.0.0 13 * @version 2. 013 * @version 2.1.7 14 14 */ 15 15 … … 37 37 38 38 // Prevent too much logs, show error in the method that has the wrong setting only 39 if ( ! wp_doing_ajax() && count($logs_index) >= 750 && $this->write_logs == 'everyone' ) {39 if ( ! wp_doing_ajax() && count($logs_index) >= 300 && $this->write_logs == 'everyone' ) { 40 40 41 41 ?> … … 43 43 <?php 44 44 } 45 45 46 // ...cut if more than 1000 46 47 if ( count($logs_index) > 1000 ) { 47 48 $n = 0; 49 $logs_index_aux = array(); 50 51 foreach ($logs_index as $key => $val) { 52 $n++; 53 $logs_index_aux[$key] = $val; 54 if ($n > 1000) break; 55 } 56 $logs_index = $logs_index_aux; 57 } 58 // End too much logs prevention 59 48 array_splice($logs_index, 950); 49 } 60 50 61 51 foreach ($logs_index as $key=>$log) { 62 // Remove from index the missing transients (WP expired) 52 53 // For performance, only will check current method logs & outdated transient logs 54 if( $log['instance_id'] != $instance_id 55 && $log['time'] + DAY_IN_SECONDS * ( defined('WC_FNS_DAYS_LOG') ? WC_FNS_DAYS_LOG : 7 ) < time() 56 ){ 57 continue; 58 } 59 60 // Remove from index the missing transients (WP expired or lost) 63 61 if (get_transient($log['name']) === false) { 64 62 unset ($logs_index[$key]); … … 87 85 88 86 // too much messages? tell about in the logs pane 89 if ( count($logs_index) >= 1000 ) {87 if ( count($logs_index) >= 950 ) { 90 88 $html .= '<div class="notice notice-warning inline"><p><strong>Logs are limited to 1000 for performance reasons.</strong><br> Please, check if some Advanced Shipping Rates for WooCommerce method are logging calculations for all users (not only Admins / Shop managers).</p></div>'; 91 89 } -
fish-and-ships/trunk/includes/shipping-class.php
r3435451 r3457537 6 6 * 7 7 * @package Advanced Shipping Rates for WC 8 * @version 2.1. 18 * @version 2.1.7 9 9 */ 10 10 … … 1028 1028 * 1029 1029 * @since 1.0.0 1030 * @version 1.5.21030 * @version 2.1.7 1031 1031 */ 1032 1032 public function save_debug_log() { … … 1036 1036 // Get the main list 1037 1037 $logs_index = get_option('wc_fns_logs_index', array() ); 1038 1039 // ...cut if more than 1000 1040 if ( count($logs_index) > 1000 ) { 1041 array_splice($logs_index, 950); 1042 } 1038 1043 1039 1044 // Check if the last log is the same that current log -
fish-and-ships/trunk/readme.txt
r3435451 r3457537 7 7 Tested up to: 6.9 8 8 WC requires at least: 3.0 9 WC tested up to: 10. 4.310 Stable tag: 2.1. 69 WC tested up to: 10.5.0 10 Stable tag: 2.1.7 11 11 Requires PHP: 7.0 12 12 Requires Plugins: woocommerce … … 235 235 == Changelog == 236 236 237 = 2.1.7 - 09/02/2026 = 238 * Checked for WC 10.5.0 239 * Improved performance when there are more than 1000 calculation logs saved 240 237 241 = 2.1.6 - 08/01/2026 = 238 242 * Checked for PHP 8.4
Note: See TracChangeset
for help on using the changeset viewer.