Changeset 3336183
- Timestamp:
- 07/29/2025 06:29:57 PM (8 months ago)
- Location:
- minicrm-woocommerce-sync/trunk
- Files:
-
- 4 edited
-
languages/minicrm-woocommerce-sync.pot (modified) (1 diff)
-
lib/Integration.php (modified) (4 diffs)
-
minicrm-woocommerce-sync.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
minicrm-woocommerce-sync/trunk/languages/minicrm-woocommerce-sync.pot
r3335884 r3336183 4 4 "Project-Id-Version: MiniCRM " 5 5 "WooCommerce Sync plugin " 6 "v1.7. 4\n"6 "v1.7.5\n" 7 7 "POT-Creation-Date: 2022-05-30 " 8 8 "22:22+0200\n" -
minicrm-woocommerce-sync/trunk/lib/Integration.php
r3335884 r3336183 93 93 public static function getProjectIds() 94 94 { 95 // Increase PHP limits for this operation 96 @ini_set('max_execution_time', 300); // 5 minutes 97 @ini_set('memory_limit', '512M'); 98 95 99 // Try to get cached data first 96 100 if (self::isDebuggingEnabled() === false) { … … 102 106 103 107 $projectIds = []; 108 109 // Get max orders limit from settings (0 = unlimited) 110 $maxOrders = (int) self::getOption('max_orders_to_sync'); 111 $totalProcessed = 0; 104 112 105 113 $filters = [ … … 120 128 121 129 foreach ($result->orders as $order) { 130 // Check if we've reached the max orders limit 131 if ($maxOrders > 0 && $totalProcessed >= $maxOrders) { 132 break 2; // Break out of both loops 133 } 134 122 135 $projectId = Plugin::getOrderProjectId($order->get_id(), $order->get_customer_id()); 123 136 if (!in_array($projectId, $projectIds)) { 124 137 $projectIds[] = $projectId; 125 138 } 139 $totalProcessed++; 126 140 } 127 141 … … 293 307 'title' => __('Debug mode', 'woocommerce'), 294 308 'type' => 'select', 309 ], 310 'max_orders_to_sync' => [ 311 'default' => '0', 312 'desc_tip' => __( 313 'Maximum number of orders to process during full sync. Set to 0 for unlimited (default behavior). Use this setting to limit sync scope for debugging or performance reasons.', 314 'minicrm-woocommerce-sync' 315 ), 316 'placeholder' => __('eg. 1000', 'minicrm-woocommerce-sync'), 317 'title' => __('Max orders to sync (0 = unlimited)', 'minicrm-woocommerce-sync'), 318 'type' => 'number', 319 'custom_attributes' => [ 320 'min' => '0', 321 'step' => '1' 322 ], 295 323 ], 296 324 'wc_mapping' => [ -
minicrm-woocommerce-sync/trunk/minicrm-woocommerce-sync.php
r3335884 r3336183 10 10 * Requires PHP: 8.0 11 11 * Text Domain: minicrm-woocommerce-sync 12 * Version: 1.7. 412 * Version: 1.7.5 13 13 * WC requires at least: 4.0.0 14 14 * WC tested up to: 7.2 -
minicrm-woocommerce-sync/trunk/readme.txt
r3335884 r3336183 5 5 Requires at least: 4.9 6 6 Requires PHP: 8.0 7 Stable tag: 1.7. 47 Stable tag: 1.7.5 8 8 Tested up to: 6.2 9 9 WC requires at least: 4.0.0
Note: See TracChangeset
for help on using the changeset viewer.