Changeset 3152227
- Timestamp:
- 09/15/2024 05:03:22 PM (19 months ago)
- Location:
- shelf-planner/trunk
- Files:
-
- 3 edited
-
includes/lib/class-shelf-planner-connector-helper.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
shelf-planner.php (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shelf-planner/trunk/includes/lib/class-shelf-planner-connector-helper.php
r3142164 r3152227 15 15 { 16 16 // protected $shelf_planner_connector_env = 'LOCALDEV'; 17 // protected $shelf_planner_connector_env = 'DEV';18 // protected $shelf_planner_connector_env = 'UAT';17 // protected $shelf_planner_connector_env = 'DEV'; 18 // protected $shelf_planner_connector_env = 'UAT'; 19 19 protected $shelf_planner_connector_env = 'PROD'; 20 20 -
shelf-planner/trunk/readme.txt
r3142164 r3152227 3 3 Requires at least: 6.0.0 4 4 Tested up to: 6.6 5 Requires PHP: 7.46 Stable tag: 2.3. 15 Requires PHP: 5.3 6 Stable tag: 2.3.2 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.2 = 99 - Minor fixes 100 98 101 = 2.3.1 = 99 102 - Includes a new logic to manage launch dates for products that will support the optimisation life cycle management in the forecast. -
shelf-planner/trunk/shelf-planner.php
r3142164 r3152227 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. 112 * Version: 2.3.2 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. 1";35 $shelf_planner_connector_version = "2.3.2"; 36 36 define('SHELF_PLANNER_CONNECTOR_VERSION', $shelf_planner_connector_version); 37 37 update_option('shelf_planner_connector_version', $shelf_planner_connector_version); … … 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 = []; … … 532 532 } 533 533 534 function validate_request_auth_website_url($data) 535 { 536 global $spc_helper; 537 538 // Verify WebsiteUrl validity 539 if ($spc_helper->get_website_url() != $data['WebsiteUrl']) { 540 spcApiLog("ERROR SITE: doesn't match "); 541 return false; 542 } 543 544 return true; 545 } 546 547 function validate_request_auth_website_url_server_key($data) 548 { 549 global $spc_helper; 550 551 // Verify WebsiteUrl validity 552 if ($spc_helper->get_website_url() != $data['WebsiteUrl']) { 553 spcApiLog("ERROR SITE: doesn't match "); 554 return false; 555 } 556 557 // Verify ServerKey validity 558 if ($spc_helper->get_server_key() != $data['ServerKey']) { 559 spcApiLog("ERROR SERVER: doesn't match "); 560 return false; 561 } 562 563 return true; 564 } 565 534 566 function validate_request_auth($data) 535 567 { … … 637 669 'methods' => 'POST', 638 670 'callback' => 'get_store_info', 671 'permission_callback' => 'validate_request_auth', 639 672 ) 640 673 ); … … 646 679 'methods' => 'POST', 647 680 'callback' => 'setup_connector_helo', 681 'permission_callback' => 'validate_request_auth_website_url', 648 682 ) 649 683 ); … … 655 689 'methods' => 'POST', 656 690 'callback' => 'setup_connector', 691 'permission_callback' => 'validate_request_auth_website_url_server_key', 657 692 ) 658 693 ); … … 664 699 'methods' => 'POST', 665 700 'callback' => 'my_awesome_func', 701 'permission_callback' => 'validate_request_auth', 666 702 ) 667 703 ); … … 673 709 'methods' => 'POST', 674 710 'callback' => 'get_categories_list', 711 'permission_callback' => 'validate_request_auth', 675 712 ) 676 713 ); … … 682 719 'methods' => 'POST', 683 720 'callback' => 'get_products_list', 721 'permission_callback' => 'validate_request_auth', 684 722 ) 685 723 ); … … 692 730 'methods' => 'POST', 693 731 'callback' => 'get_products_list_v2', 732 'permission_callback' => 'validate_request_auth', 694 733 ) 695 734 ); … … 702 741 'methods' => 'POST', 703 742 'callback' => 'get_products_detail_v2', 743 'permission_callback' => 'validate_request_auth', 704 744 ) 705 745 ); … … 713 753 'methods' => 'POST', 714 754 'callback' => 'get_order_list', 755 'permission_callback' => 'validate_request_auth', 715 756 ) 716 757 ); … … 722 763 'methods' => 'POST', 723 764 'callback' => 'get_order_detail', 765 'permission_callback' => 'validate_request_auth', 724 766 'args' => array( 725 767 'IDS' => array( … … 738 780 'methods' => 'PUT', 739 781 'callback' => 'add_product_stock', 782 'permission_callback' => 'validate_request_auth', 740 783 'args' => array( 741 784 'ProductId' => array( … … 755 798 'methods' => 'PUT', 756 799 'callback' => 'update_product_stock', 800 'permission_callback' => 'validate_request_auth', 757 801 'args' => array( 758 802 'ProductId' => array( … … 772 816 'methods' => 'PUT', 773 817 'callback' => 'update_products_track_stock', 818 'permission_callback' => 'validate_request_auth', 774 819 ) 775 820 ); … … 781 826 'methods' => 'POST', 782 827 'callback' => 'dummy_response_func', 828 'permission_callback' => 'validate_request_auth', 783 829 ) 784 830 ); … … 790 836 'methods' => 'GET', 791 837 'callback' => 'ping', 838 'permission_callback' => 'validate_request_auth', 792 839 ) 793 840 ); … … 799 846 'methods' => 'POST', 800 847 'callback' => 'ping', 848 'permission_callback' => 'validate_request_auth', 801 849 ) 802 850 );
Note: See TracChangeset
for help on using the changeset viewer.