Changeset 3208487
- Timestamp:
- 12/16/2024 11:04:53 AM (15 months ago)
- Location:
- ali2woo-lite/trunk
- Files:
-
- 8 edited
-
alinext-lite.php (modified) (1 diff)
-
changelog.txt (modified) (2 diffs)
-
includes/classes/controller/SearchPageController.php (modified) (1 diff)
-
includes/classes/controller/SearchStoreProductsPageController.php (modified) (1 diff)
-
includes/classes/model/Aliexpress.php (modified) (4 diffs)
-
includes/classes/model/AliexpressAccount.php (modified) (4 diffs)
-
includes/classes/service/GlobalSystemMessageService.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ali2woo-lite/trunk/alinext-lite.php
r3201757 r3208487 6 6 Text Domain: ali2woo 7 7 Domain Path: /languages 8 Version: 3.4. 88 Version: 3.4.9 9 9 Author: Dropshipping Guru 10 10 Author URI: https://ali2woo.com/dropshipping-plugin/?utm_source=lite&utm_medium=author&utm_campaign=alinext-lite 11 11 License: GPLv3 12 12 Requires at least: 5.9 13 Tested up to: 6.7 13 Tested up to: 6.7.2 14 14 WC tested up to: 9.5 15 15 WC requires at least: 5.0 -
ali2woo-lite/trunk/changelog.txt
r3201757 r3208487 317 317 318 318 3.4.8 319 * Fix xss vulnerability in apikeys settings page319 * Fix xss vulnerability in API keys settings page 320 320 * Add A2W_JOB_MEMORY_LIMIT constant allowing to set max RAM size for background job 321 321 * Improve get access token feature (fix undefined alert) … … 325 325 * Fix minor bugs and code refactor 326 326 327 3.4.9 328 * Add WordPress 6.7.2 compatibility 329 * Add A2W_PRODUCT_SEARCH_LIMIT and A2W_STORE_PRODUCT_SEARCH_LIMIT (max 40 items per page) 330 * Fix bug in a global message service module 331 * Fix minor bugs and code refactor 332 333 -
ali2woo-lite/trunk/includes/classes/controller/SearchPageController.php
r3191207 r3208487 67 67 $page = isset($_GET['cur_page']) && intval($_GET['cur_page']) ? intval($_GET['cur_page']) : 1; 68 68 $per_page = 20; 69 if (a2wl_check_defined('A2WL_PRODUCT_SEARCH_LIMIT')) { 70 $per_page = intval(A2WL_PRODUCT_SEARCH_LIMIT); 71 } 69 72 70 73 if (!empty($_REQUEST['a2wl_search'])) { -
ali2woo-lite/trunk/includes/classes/controller/SearchStoreProductsPageController.php
r3191207 r3208487 70 70 $page = isset($_GET['cur_page']) && intval($_GET['cur_page']) ? intval($_GET['cur_page']) : 1; 71 71 $per_page = 20; 72 if (a2wl_check_defined('A2WL_STORE_PRODUCT_SEARCH_LIMIT')) { 73 $per_page = intval(A2WL_STORE_PRODUCT_SEARCH_LIMIT); 74 } 72 75 73 76 if (!empty($_REQUEST['a2wl_search'])) { -
ali2woo-lite/trunk/includes/classes/model/Aliexpress.php
r3129531 r3208487 42 42 $default_status = get_setting('default_product_status'); 43 43 44 $tmp_urls = [];45 46 44 foreach ($result['products'] as &$product) { 47 $product['post_id'] = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_a2w_external_id' AND meta_value=%s LIMIT 1", $product['id'])); 45 $query = $wpdb->prepare( 46 "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_a2w_external_id' AND meta_value=%s LIMIT 1", 47 $product['id'] 48 ); 49 $product['post_id'] = $wpdb->get_var($query); 48 50 $product['import_id'] = in_array($product['id'], $products_in_import) ? $product['id'] : 0; 49 51 $product['product_type'] = $default_type; … … 54 56 $product['shipping_to_country'] = $filter['country']; 55 57 } 56 57 $tmp_urls[] = $product['url'];58 }59 60 if ($this->account->custom_account) {61 try {62 $promotionUrls = $this->get_affiliate_urls($tmp_urls);63 if (!empty($promotionUrls) && is_array($promotionUrls)) {64 foreach ($result["products"] as $i => $product) {65 foreach ($promotionUrls as $pu) {66 if ($pu['url'] == $product['url']) {67 $result["products"][$i]['affiliate_url'] = $pu['promotionUrl'];68 break;69 }70 }71 }72 }73 } catch (Throwable $e) {74 a2wl_print_throwable($e);75 foreach ($result['products'] as &$product) {76 $product['affiliate_url'] = $product['url'];77 }78 }79 58 } 80 59 } … … 96 75 $default_status = get_setting('default_product_status'); 97 76 98 $tmp_urls = [];99 100 77 foreach ($result['products'] as &$product) { 101 $product['post_id'] = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_a2w_external_id' AND meta_value=%s LIMIT 1", $product['id'])); 78 $query = $wpdb->prepare( 79 "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_a2w_external_id' AND meta_value=%s LIMIT 1", 80 $product['id'] 81 ); 82 $product['post_id'] = $wpdb->get_var($query); 102 83 $product['import_id'] = in_array($product['id'], $products_in_import) ? $product['id'] : 0; 103 84 $product['product_type'] = $default_type; … … 107 88 if (isset($filter['country']) && $filter['country']) { 108 89 $product['shipping_to_country'] = $filter['country']; 109 }110 111 $tmp_urls[] = $product['url'];112 }113 114 if ($this->account->custom_account) {115 try {116 $promotionUrls = $this->get_affiliate_urls($tmp_urls);117 if (!empty($promotionUrls) && is_array($promotionUrls)) {118 foreach ($result["products"] as $i => $product) {119 foreach ($promotionUrls as $pu) {120 if ($pu['url'] == $product['url']) {121 $result["products"][$i]['affiliate_url'] = $pu['promotionUrl'];122 break;123 }124 }125 }126 }127 } catch (Throwable $e) {128 a2wl_print_throwable($e);129 foreach ($result['products'] as &$product) {130 $product['affiliate_url'] = $product['url'];131 }132 } catch (\Exception $e) {133 a2wl_print_throwable($e);134 foreach ($result['products'] as &$product) {135 $product['affiliate_url'] = $product['url'];136 }137 90 } 138 91 } -
ali2woo-lite/trunk/includes/classes/model/AliexpressAccount.php
r3107543 r3208487 9 9 namespace AliNext_Lite;; 10 10 11 use Exception; 11 12 use IopClient; 13 use IopRequest; 12 14 13 15 class AliexpressAccount extends AbstractAccount { … … 50 52 $sourceValues = implode(',', array_keys($nHrefs)); 51 53 52 $request = new \IopRequest('aliexpress.affiliate.link.generate');54 $request = new IopRequest('aliexpress.affiliate.link.generate'); 53 55 $request->addApiParam('promotion_link_type','2'); 54 $request->addApiParam('source_values', $sourceValues);56 $request->addApiParam('source_values', $sourceValues); 55 57 $request->addApiParam('tracking_id', $account['trackingid']); 56 58 … … 72 74 73 75 if ($responseResult->resp_code == 200){ 74 foreach ($responseResult->result->promotion_links->promotion_link as $pl){75 if (isset($pl->promotion_link) && isset($nHrefs[$pl->source_value])){76 foreach ($responseResult->result->promotion_links->promotion_link as $pl) { 77 if (isset($pl->promotion_link) && isset($nHrefs[$pl->source_value])) { 76 78 $result[] = [ 77 'url' =>$nHrefs[$pl->source_value],78 'promotionUrl' =>$pl->promotion_link79 'url' => $nHrefs[$pl->source_value], 80 'promotionUrl' => $pl->promotion_link 79 81 ]; 80 82 } … … 88 90 } 89 91 } 90 catch ( \Exception) {92 catch (Exception) { 91 93 //such exception is logged by lib itself 92 94 } -
ali2woo-lite/trunk/includes/classes/service/GlobalSystemMessageService.php
r3191207 r3208487 63 63 if (!empty($message['type']) && !empty($message['message'])) { 64 64 if ($message['type'] === self::MESSAGE_TYPE_SUCCESS) { 65 $this->addNewMessage(self::MESSAGE_TYPE_SUCCESS, $message );65 $this->addNewMessage(self::MESSAGE_TYPE_SUCCESS, $message['message']); 66 66 } 67 67 elseif ($message['type'] === self::MESSAGE_TYPE_ERROR) { 68 $this->addNewMessage(self::MESSAGE_TYPE_ERROR, $message );68 $this->addNewMessage(self::MESSAGE_TYPE_ERROR, $message['message']); 69 69 } 70 70 } -
ali2woo-lite/trunk/readme.txt
r3201757 r3208487 3 3 Tags: aliexpress dropshipping, woocommerce dropshipping, dropship 4 4 Requires at least: 5.9 5 Tested up to: 6.7 5 Tested up to: 6.7.2 6 6 License: GPLv3 7 7 License URI: http://www.gnu.org/licenses/gpl.html … … 313 313 314 314 == Changelog == 315 = 3.4.9 - 2024.12.16 = 316 * Add WordPress 6.7.2 compatibility 317 * Add A2W_PRODUCT_SEARCH_LIMIT and A2W_STORE_PRODUCT_SEARCH_LIMIT (max 40 items per page) 318 * Fix bug in a global message service module 319 * Fix minor bugs and code refactor 320 315 321 = 3.4.8 - 2024.12.03 = 316 322 * Fix xss vulnerability in api keys settings page … … 352 358 * Add compatibility with WooCommerce 9.2.* 353 359 354 = 3.4.0 - 2024.08.01 =355 * Enhanced pricing rules module: ability to add a category to pricing rule (if category field is empty, then rule will apply to any category);356 * Enhanced pricing rules module: ability to create Pricing rule sets. Set is a group of pricing rules and settings, you can create few sets and switch between then during sale. Don't forget to use Apply pricing to exiting products feature after you switch to another pricing rule set;357 * Fix image editor bug;358 * Refactor legacy code and fix minor bugs;359 360 = 3.3.9 - 2024.07.08 =361 * Enhanced plugin security by adding WordPress nonce to all Ajax methods362 * Improved plugin security by checking user role in all plugin methods;363 * Enhanced plugin security by escaping HTML input in template views;364 * Improved plugin security by escaping SQL queries;365 * Enhanced order fulfillment module to synchronize product shipping information when refreshing in the fulfillment popup;366 * Fixed minor bugs and improve code style;367 368 = 3.3.5 - 2024.06.13 =369 * Refactor import products from CSV.370 * Enhance order fulfillment module; Now order is placed with country currency.371 * Fix minor bugs.372 373 = 3.3.3 - 2024.05.28 =374 * Fix plugin activation bug;375 376 = 3.3.2 - 2024.05.27 =377 * Update background process library, add namespaces for the library;378 * Fix bug with product last-update date;379 * Add cancel button for all background processed;380 * Add php max_execution_time check to system info page381 * Fix minor bug, old code base refactor;382 383 = 3.3.0 - 2024.05.20 =384 * Improve bulk price application script; Now you can close or refresh page when start the process;385 * Add status bar for all backroud processes in order to make it more clear;386 * Fix bug with product descriprtion images;387 * Fix minor bug, old code base refactor;388 389 = 3.2.8 - 2024.05.03 =390 * fix function saving images in image editor tool391 * fix pricing rules bug in plugin backend392 * fix product description loading393 * update some plugin dependecies394 * fix minor bugs395 396 = 3.2.7 - 2024.04.10 =397 * add image type file check to built-in image editor398 * add feature to load AliExpress category tree for imported product399 * replace || with OR in sql queries as this format is deprectated400 * fix minor bugs401 402 = 3.2.6 - 2024.04.04 =403 * fix built-in image editor404 * fix chrome extension connection bug405 * fix is-not-applied price bug406 * fix minor bugs407 408 360 == Upgrade Notice == 409 361
Note: See TracChangeset
for help on using the changeset viewer.