Changeset 3192494
- Timestamp:
- 11/19/2024 04:32:08 PM (17 months ago)
- Location:
- shelf-planner/trunk
- Files:
-
- 1 added
- 4 edited
-
block.json (modified) (1 diff)
-
includes/shelf_planner_connector.php (modified) (4 diffs)
-
logs (added)
-
readme.txt (modified) (2 diffs)
-
shelf-planner.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shelf-planner/trunk/block.json
r3192378 r3192494 3 3 "apiVersion": 3, 4 4 "name": "extension/shelf-planner", 5 "version": "2.5. 0",5 "version": "2.5.1", 6 6 "title": "Stock Management for WooCommerce", 7 7 "category": "widgets", -
shelf-planner/trunk/includes/shelf_planner_connector.php
r3192378 r3192494 158 158 // return true; // TEST 159 159 // return false; // TEST 160 return $this->has_server_key(); 160 $installed_version = $this->get_installed_plugin_version(); 161 $current_version = $this->config->get_version(); 162 return ($installed_version === $current_version) && $this->has_server_key(); 161 163 } 162 164 … … 813 815 } 814 816 817 public function get_installed_plugin_version() 818 { 819 return get_option($this->config->get_domain() . '_installed_plugin_version', ''); 820 } 821 822 public function set_installed_plugin_version($version) 823 { 824 update_option($this->config->get_domain() . '_installed_plugin_version', $version); 825 } 826 815 827 public function get_server_key() 816 828 { … … 923 935 } 924 936 925 $this->delete_server_key();926 $this->delete_license_key();937 // $this->delete_server_key(); 938 // $this->delete_license_key(); 927 939 update_option($this->config->get_domain() . '_enable_logs', 'checked'); 928 940 … … 975 987 // Setup connector 976 988 $this->set_server_key($serverData->serverKey); 977 update_option($this->config->get_domain() . '_installed_plugin_version', $this->config->get_version()); 989 $this->set_installed_plugin_version($this->config->get_version()); 990 978 991 update_option($this->config->get_domain(), [ 979 992 'is_debug' => $this->is_debug(), -
shelf-planner/trunk/readme.txt
r3192378 r3192494 4 4 Tested up to: 6.6 5 5 Requires PHP: 5.3 6 Stable tag: 2.5. 06 Stable tag: 2.5.1 7 7 Tags: Inventory Management,ABC Analysis,Demand Forecasting,Replenishment,Purchasing 8 8 License: GPLv2 or later … … 96 96 == Changelog == 97 97 98 = 2.5.1 = 99 - Plugin update fix 100 98 101 = 2.5.0 = 99 102 - Plugin rewrite -
shelf-planner/trunk/shelf-planner.php
r3192378 r3192494 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.5. 012 * Version: 2.5.1 13 13 * Author: Shelf Planner 14 14 * Author URI: https://www.shelfplanner.com … … 26 26 27 27 if (!defined('SPC_WP__VERSION')) { 28 define('SPC_WP__VERSION', '2.5. 0');28 define('SPC_WP__VERSION', '2.5.1'); 29 29 } 30 30 … … 59 59 $config = shelf_planner_config::instance(); 60 60 $sp_connector = shelf_planner_connector::instance($config); 61 $sp_connector-> setup();61 $sp_connector->activate(); 62 62 } 63 63 … … 105 105 $sp_connector->deactivate(); 106 106 } 107 108 function shelf_planner_update_hook($upgrader_object, $options) { 109 // Check if the plugin was updated 110 if ($options['action'] == 'update' && $options['type'] == 'plugin') { 111 // Get the list of updated plugins 112 $updated_plugins = $options['plugins']; 113 114 // Check if our plugin is in the list of updated plugins 115 if (in_array(plugin_basename(__FILE__), $updated_plugins)) { 116 // Perform actions after the plugin is updated 117 shelf_planner_activate(); 118 } 119 } 120 } 121 122 add_action('upgrader_process_complete', 'shelf_planner_update_hook', 10, 2); 107 123 108 124 if (!class_exists('shelf_planner')):
Note: See TracChangeset
for help on using the changeset viewer.