Plugin Directory

Changeset 3233872


Ignore:
Timestamp:
02/03/2025 11:02:02 AM (13 months ago)
Author:
ali2woo
Message:

Update plugin version to 3.5.1

Location:
ali2woo-lite/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • ali2woo-lite/trunk/alinext-lite.php

    r3229929 r3233872  
    66Text Domain: ali2woo
    77Domain Path: /languages
    8 Version: 3.5.0
     8Version: 3.5.1
    99Author: Dropshipping Guru
    1010Author URI: https://ali2woo.com/dropshipping-plugin/?utm_source=lite&utm_medium=author&utm_campaign=alinext-lite
  • ali2woo-lite/trunk/changelog.txt

    r3229929 r3233872  
    339339* Fix minor bugs and code refactor
    340340
     3413.5.1
     342* Fix "Bad API format." error while placing orders through API
     343* Fix minor bugs and code refactor
     344
  • ali2woo-lite/trunk/includes/classes/connector/AliexpressDefaultConnector.php

    r3229929 r3233872  
    196196
    197197            if ($result['state'] !== 'error') {
    198                 if (isset($apiResult['orders']['list'])) {
     198                if (isset($result['orders']['list'])) {
    199199                    $result = ResultBuilder::buildOk([
    200200                        'orders' => $result['orders'],
  • ali2woo-lite/trunk/includes/classes/controller/ImportAjaxController.php

    r3183028 r3233872  
    998998            $PriceFormulaService = A2WL()->getDI()->get('AliNext_Lite\PriceFormulaService');
    999999
    1000             $product = false;
    10011000            $products = [];
    10021001            if ($page  === 'a2wl_dashboard'){
     
    10171016                foreach ($products as &$product) {
    10181017                    if ($product['id'] == $id || $product['import_id'] == $id) {
    1019                         $product_country_from = !empty($product['shipping_from_country']) ? $product['shipping_from_country'] : 'CN';
    1020                         $product_country_to = !empty($product['shipping_to_country']) ? $product['shipping_to_country'] : '';
     1018                        $product_country_from = !empty($product['shipping_from_country']) ?
     1019                            $product['shipping_from_country'] :
     1020                            'CN';
     1021
     1022                        $product_country_to = !empty($product['shipping_to_country'])
     1023                            ? $product['shipping_to_country']
     1024                            : '';
     1025
    10211026                        $country_to = $_POST['country_to'] ?? $product_country_to;
    10221027                        $country_from = !empty($_POST['country_from']) ? $_POST['country_from'] : $product_country_from;
     
    10281033                        }
    10291034
    1030                         $product = Utils::update_product_shipping($product, $country_from, $country_to, $page, true);
     1035                        $product = Utils::update_product_shipping(
     1036                            $product, $country_from,
     1037                            $country_to, $page, true
     1038                        );
    10311039
    10321040                        if ($page == 'fulfillment') {
     
    10981106
    10991107            if ($product) {
    1100                 $product_country_to = isset($product['shipping_to_country']) && $product['shipping_to_country'] ? $product['shipping_to_country'] : '';
    1101                 $product_country_from = isset($product['shipping_from_country']) && $product['shipping_from_country'] ? $product['shipping_from_country'] : '';
    1102                 $country_to = isset($_POST['country_to']) ? $_POST['country_to'] : $product_country_to;
    1103                 $country_from = isset($_POST['country_from']) ? $_POST['country_from'] : $product_country_from;
     1108                $product_country_to = isset($product['shipping_to_country']) &&
     1109                    $product['shipping_to_country'] ?
     1110                    $product['shipping_to_country'] : '';
     1111
     1112                $product_country_from = isset($product['shipping_from_country']) &&
     1113                    $product['shipping_from_country'] ?
     1114                    $product['shipping_from_country'] : '';
     1115
     1116                $country_to = $_POST['country_to'] ?? $product_country_to;
     1117                $country_from = $_POST['country_from'] ?? $product_country_from;
    11041118
    11051119                $country = ProductShippingMeta::meta_key($country_from, $country_to);
    1106                 $method = isset($_POST['method']) ? $_POST['method'] : '';
     1120                $method = $_POST['method'] ?? '';
    11071121
    11081122                if ($country && $method) {
     
    11121126
    11131127                    $product['shipping_cost'] = 0;
    1114                     $items = isset($product['shipping_info'][$country]) ? $product['shipping_info'][$country] : array();
     1128                    $items = $product['shipping_info'][$country] ?? [];
    11151129                    foreach ($items as $s) {
    11161130                        if ($s['serviceName'] == $product['shipping_default_method']) {
    1117                             $product['shipping_cost'] = isset($s['previewFreightAmount']['value']) ? $s['previewFreightAmount']['value'] : $s['freightAmount']['value'];
     1131                            $product['shipping_cost'] = $s['previewFreightAmount']['value'] ?? $s['freightAmount']['value'];
    11181132                            break;
    11191133                        }
     
    11211135
    11221136                    $product = $PriceFormulaService->applyFormula($product);
    1123 
    11241137                    $product_import_model->upd_product($product);
    11251138                }
    11261139
    1127                 $variations = array();
     1140                $variations = [];
    11281141                foreach ($product['sku_products']['variations'] as $v) {
    1129                     $variations[] = array('id' => $v['id'], 'calc_price' => $v['calc_price'], 'calc_regular_price' => $v['calc_regular_price']);
     1142                    $variations[] = [
     1143                        'id' => $v['id'],
     1144                        'calc_price' => $v['calc_price'],
     1145                        'calc_regular_price' => $v['calc_regular_price']
     1146                    ];
    11301147                }
    11311148
     
    11351152                }
    11361153
    1137                 echo wp_json_encode(ResultBuilder::buildOk(array('default_method' => $product['shipping_default_method'], 'shipping_cost' => $shipping_cost, 'variations' => $variations)));
     1154                $result = [
     1155                    'default_method' => $product['shipping_default_method'],
     1156                    'shipping_cost' => $shipping_cost,
     1157                    'variations' => $variations
     1158                ];
     1159                echo wp_json_encode(ResultBuilder::buildOk($result));
    11381160            } else {
    11391161                echo wp_json_encode(ResultBuilder::buildError("Product not found."));
  • ali2woo-lite/trunk/includes/classes/controller/OrderFulfillmentController.php

    r3229929 r3233872  
    478478                    <button id="fulfillment-auto" class="btn btn-success" type="button">
    479479                        <div class="btn-icon-wrap cssload-container"><div class="cssload-speeding-wheel"></div></div>
    480                         <?php  esc_html_e('Fulfil orders automatically', 'ali2woo');?>
     480                        <?php  esc_html_e('Fulfill orders automatically', 'ali2woo');?>
    481481                    </button>
    482482                    </div>
     
    488488                    <button id="fulfillment-chrome" class="btn btn-success" type="button">
    489489                        <div class="btn-icon-wrap cssload-container"><div class="cssload-speeding-wheel"></div></div>
    490                         <?php  esc_html_e('Fulfil orders via Chrome extension', 'ali2woo');?>
     490                        <?php  esc_html_e('Fulfill orders via Chrome extension', 'ali2woo');?>
    491491                    </button>
    492492                    <?php endif; ?>
  • ali2woo-lite/trunk/includes/classes/model/Aliexpress.php

    r3229929 r3233872  
    271271                }
    272272            }
     273
     274         /*   $hasShippingInfo = isset($result['product']['shipping_info']['items']) &&
     275                is_array($result['product']['shipping_info']['items']);
     276            if ($hasShippingInfo) {
     277                $items = $result['product']['shipping_info']['items'];
     278                $shippingFromCode = $result['product']['shipping_info']['shippingFromCode'];
     279                $shippingToCode = $result['product']['shipping_info']['shippingToCode'];
     280                $shipping_meta->save_items(1, $shippingFromCode, $shippingToCode, $items, true);
     281            }*/
    273282        }
    274283
  • ali2woo-lite/trunk/readme.txt

    r3229929 r3233872  
    309309
    310310== Changelog ==
     311= 3.5.1 - 2025.02.03 =
     312* Fix "Bad API format." error while placing orders through API
     313* Fix minor bugs and code refactor
     314
    311315= 3.5.0 - 2025.01.27 =
    312316* Update review image gallery script (flexbox) to 5 version
     
    412416* fix minor bugs
    413417
    414 = 3.2.7 - 2024.04.10 =
    415 * add image type file check to built-in image editor
    416 * add feature to load AliExpress category tree for imported product
    417 * replace || with OR in sql queries as this format is  deprectated
    418 * fix minor bugs
    419 
    420 = 3.2.6 - 2024.04.04 =
    421 * fix built-in image editor
    422 * fix chrome extension connection bug
    423 * fix is-not-applied price bug
    424 * fix minor bugs
    425 
    426418== Upgrade Notice ==
    427419
Note: See TracChangeset for help on using the changeset viewer.