Changeset 3152807
- Timestamp:
- 09/16/2024 03:57:59 PM (19 months ago)
- Location:
- shelf-planner/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
shelf-planner.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shelf-planner/trunk/readme.txt
r3152227 r3152807 4 4 Tested up to: 6.6 5 5 Requires PHP: 5.3 6 Stable tag: 2.3. 26 Stable tag: 2.3.3 7 7 Tags: Inventory Management,ABC Analysis,Demand Forecasting,Replenishment,Purchasing 8 8 License: GPLv2 or later … … 96 96 == Changelog == 97 97 98 = 2.3.3 = 99 - Fixed timestamp retrieval bug for empty values 100 98 101 = 2.3.2 = 99 102 - Minor fixes -
shelf-planner/trunk/shelf-planner.php
r3152227 r3152807 10 10 * Description: AI-driven Stock Management, Demand Forecasting, Replenishment and Order Management for WooCommerce, all in one powerful tool. 11 11 * 12 * Version: 2.3. 212 * Version: 2.3.3 13 13 * Author: Shelf Planner 14 14 * Author URI: https://www.shelfplanner.com … … 33 33 * Use SemVer - https://semver.org 34 34 */ 35 $shelf_planner_connector_version = "2.3. 2";35 $shelf_planner_connector_version = "2.3.3"; 36 36 define('SHELF_PLANNER_CONNECTOR_VERSION', $shelf_planner_connector_version); 37 37 update_option('shelf_planner_connector_version', $shelf_planner_connector_version); … … 284 284 285 285 $tmpOrder['Id'] = '' . $orderId; 286 $tmpOrder['DateCreated'] = $data['date_created']->getTimestamp();287 $tmpOrder['DateModified'] = $data['date_modified']->getTimestamp();286 $tmpOrder['DateCreated'] = isset($data['date_created']) ? $data['date_created']->getTimestamp() : null; 287 $tmpOrder['DateModified'] = isset($data['date_modified']) ? $data['date_modified']->getTimestamp() : null; 288 288 $tmpOrder['CustomerId'] = '' . $data['customer_id']; 289 289 $tmpOrder['BillingCity'] = $data['billing']['city']; … … 330 330 331 331 /*return array( 332 'orderby' => 'date',333 'order' => 'DESC',334 'post_type' => 'shop_order',335 'limit' => 2,336 'meta_query' => [337 [338 'key' => "SHELF-PLANNER-CONNECTOR-SYNC",339 'value' => 0,340 'compare' => 'NOT EXISTS',341 ],342 ],343 'include' => $params['IDS']344 );*/332 'orderby' => 'date', 333 'order' => 'DESC', 334 'post_type' => 'shop_order', 335 'limit' => 2, 336 'meta_query' => [ 337 [ 338 'key' => "SHELF-PLANNER-CONNECTOR-SYNC", 339 'value' => 0, 340 'compare' => 'NOT EXISTS', 341 ], 342 ], 343 'include' => $params['IDS'] 344 );*/ 345 345 /*$orders = wc_get_orders(array( 346 'include' => array{106,207,83},347 'orderby' => 'date',348 'order' => 'DESC',349 'post_type' => 'shop_order',350 'limit' => 10351 352 353 ));*/346 'include' => array{106,207,83}, 347 'orderby' => 'date', 348 'order' => 'DESC', 349 'post_type' => 'shop_order', 350 'limit' => 10 351 352 353 ));*/ 354 354 355 355 if ($orders) { … … 386 386 387 387 /*$args = array( 388 'orderby' => 'name',389 'limit' => -1, // Retrieves all products390 );391 $products = wc_get_products($args);392 */388 'orderby' => 'name', 389 'limit' => -1, // Retrieves all products 390 ); 391 $products = wc_get_products($args); 392 */ 393 393 $tmpProduct = []; 394 394 $tmpSubProducts = []; … … 405 405 $tmpProduct['DateCreated'] = $product->get_date_created(); 406 406 $tmpProduct['DateModified'] = $product->get_date_modified(); 407 $tmpProduct['DateCreatedTimestamp'] = $product->get_date_created()->getTimestamp();408 $tmpProduct['DateModifiedTimestamp'] = $product->get_date_modified()->getTimestamp();407 $tmpProduct['DateCreatedTimestamp'] = isset($tmpProduct['DateCreated']) ? $tmpProduct['DateCreated']->getTimestamp() : null; 408 $tmpProduct['DateModifiedTimestamp'] = isset($tmpProduct['DateModified']) ? $tmpProduct['DateModified']->getTimestamp() : null; 409 409 $tmpProduct['SKU'] = $product->get_sku(); 410 410 $tmpProduct['Price'] = $product->get_price();
Note: See TracChangeset
for help on using the changeset viewer.