Changeset 3164263
- Timestamp:
- 10/07/2024 01:06:09 PM (17 months ago)
- Location:
- ali2woo-lite/trunk
- Files:
-
- 7 edited
-
alinext-lite.php (modified) (1 diff)
-
changelog.txt (modified) (1 diff)
-
includes/classes/controller/BlankConverter.php (modified) (2 diffs)
-
includes/classes/controller/TransferPageController.php (modified) (4 diffs)
-
includes/classes/utils/Migrate.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
view/transfer.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ali2woo-lite/trunk/alinext-lite.php
r3159867 r3164263 6 6 Text Domain: ali2woo 7 7 Domain Path: /languages 8 Version: 3.4. 49 Author: Ali2Woo Team8 Version: 3.4.5 9 Author: Dropshipping Guru 10 10 Author URI: https://ali2woo.com/dropshipping-plugin/ 11 11 License: GPLv3 -
ali2woo-lite/trunk/changelog.txt
r3159867 r3164263 298 298 * Fix issue causing Wordfence notice 299 299 300 3.4.5 301 * Enhance settings transfer module 302 * Fix minor bugs 303 -
ali2woo-lite/trunk/includes/classes/controller/BlankConverter.php
r3107543 r3164263 14 14 public function __construct() 15 15 { 16 if(!apply_filters('a2wl_converter_installed', false)){ 17 parent::__construct(esc_html__('Migration Tool', 'ali2woo'), esc_html__('Migration Tool', 'ali2woo'), 'import', 'a2wl_converter', 1000); 16 if (!apply_filters('a2wl_converter_installed', false)) { 17 parent::__construct( 18 esc_html__('Migration Tool', 'ali2woo'), 19 esc_html__('Migration Tool', 'ali2woo'), 20 'import', 21 'a2wl_converter', 22 1000 23 ); 18 24 } 19 25 } 20 26 21 public function render($params = array())27 public function render($params = []) 22 28 { 23 29 ?> … … 28 34 } 29 35 } 30 -
ali2woo-lite/trunk/includes/classes/controller/TransferPageController.php
r3159867 r3164263 13 13 class TransferPageController extends AbstractAdminPage 14 14 { 15 public const FIELD_HASH = "hash"; 16 15 17 public function __construct() 16 18 { … … 28 30 29 31 $this->saveHandler(); 30 $this->model_put( "hash", $this->getSettingsString());32 $this->model_put(self::FIELD_HASH, $this->getSettingsString()); 31 33 $this->include_view("transfer.php"); 32 34 } … … 35 37 { 36 38 $settings = get_option('a2wl_settings', []); 39 $settingsJson = json_encode($settings); 37 40 38 return base64_encode( serialize($settings));41 return base64_encode($settingsJson); 39 42 } 40 43 41 44 private function saveHandler(): void 42 45 { 43 if (isset($_POST['transfer_form']) && !empty($_POST[ 'hash'])) {46 if (isset($_POST['transfer_form']) && !empty($_POST[self::FIELD_HASH])) { 44 47 check_admin_referer(self::PAGE_NONCE_ACTION, self::NONCE); 45 48 46 $ hash = base64_decode($_POST['hash']);49 $settingsJson = base64_decode($_POST[self::FIELD_HASH]); 47 50 48 if (!$ hash) {51 if (!$settingsJson) { 49 52 $this->model_put("error", 50 53 esc_html_x('Hash is not correct', 'error text', 'ali2woo') … … 54 57 } 55 58 56 $settings = unserialize($hash, ['allowed_classes' => false]);59 $settings = json_decode($settingsJson, true); 57 60 58 61 if (!$settings) { -
ali2woo-lite/trunk/includes/classes/utils/Migrate.php
r2937267 r3164263 11 11 namespace AliNext_Lite;; 12 12 13 class Migrate { 13 class Migrate 14 { 14 15 public function __construct() { 15 16 $this->migrate(); 16 17 } 17 18 18 public function migrate(){ 19 public function migrate(): void 20 { 19 21 $cur_version = get_option('a2wl_db_version', ''); 20 if (version_compare($cur_version, "3.0.8", '<')) {22 if (version_compare($cur_version, "3.0.8", '<')) { 21 23 $this->migrate_to_308(); 22 24 } 23 25 24 if (version_compare($cur_version, A2WL()->version, '<')) {26 if (version_compare($cur_version, A2WL()->version, '<')) { 25 27 update_option('a2wl_db_version', A2WL()->version, 'no'); 26 28 } 27 29 } 28 30 29 private function migrate_to_308(){ 31 private function migrate_to_308(): void 32 { 30 33 a2wl_error_log('migrate to 3.0.8'); 31 34 ProductShippingMeta::clear_in_all_product();; -
ali2woo-lite/trunk/readme.txt
r3159867 r3164263 308 308 309 309 == Changelog == 310 = 3.4.5 - 2024.10.07 = 311 * Enhance settings transfer module 312 * Fix minor bugs 310 313 311 314 = 3.4.4 - 2024.09.30 = … … 383 386 * fix chrome extension connection bug 384 387 * increase daily quota for order place and sync operations to 20 per day (for the lite plugin version) 385 386 = 3.2.0 - 2024.01.10 =387 * add feature to synchronize selected orders (see bulk actions)388 * refactor plugin code to improve performance389 * fix minor bugs and errors390 388 == Upgrade Notice == 391 389 -
ali2woo-lite/trunk/view/transfer.php
r3107543 r3164263 1 <?php 2 /** 3 * @var string $hash 4 */ 5 use AliNext_Lite\AbstractAdminPage; 6 ?> 1 7 <div class="a2wl-content"> 2 <h1><?php use AliNext_Lite\AbstractAdminPage; 3 8 <h1><?php 4 9 esc_html_e('Transfer settings', 'ali2woo'); ?></h1> 5 10 <form class="a2wl-transfer" method="post"> … … 10 15 <div class="field__label"><?php echo esc_html__('Paste a hash from another site to update settings', 'ali2woo'); ?></div> 11 16 <div class="field__input-wrap"> 12 <textarea class="field__input" name="hash" placeholder="<?php echo esc_html__('Paste your hash', 'ali2woo'); ?>" rows="10"> <?php13 echo esc_html__($hash);14 ?></textarea>17 <textarea class="field__input" name="hash" placeholder="<?php echo esc_html__('Paste your hash', 'ali2woo'); ?>" rows="10"> 18 <?php echo esc_html__($hash); ?> 19 </textarea> 15 20 </div> 16 21 </div>
Note: See TracChangeset
for help on using the changeset viewer.