Plugin Directory

Changeset 3315774


Ignore:
Timestamp:
06/22/2025 04:15:49 AM (9 months ago)
Author:
fantasyworld
Message:

update 3.5.10

Location:
ry-woocommerce-tools/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ry-woocommerce-tools/trunk/includes/update.php

    r3312911 r3315774  
    7878
    7979        if (version_compare($now_version, '1.10.3', '<')) {
    80             RY_WT::update_option('ecpay_shipping_pickup_time', 4);
    8180            RY_WT::update_option('ecpay_shipping_box_size', 1);
    8281
     
    112111        }
    113112
    114         if (version_compare($now_version, '3.5.9', '<')) {
    115             RY_WT::update_option('version', '3.5.9', true);
     113        if (version_compare($now_version, '3.5.10', '<')) {
     114            RY_WT::update_option('ecpay_shipping_declare_mode', 'payment');
     115
     116            RY_WT::update_option('version', '3.5.10', true);
    116117        }
    117118    }
  • ry-woocommerce-tools/trunk/readme.txt

    r3312911 r3315774  
    66Requires PHP: 8.0
    77Tested up to: 6.8
    8 Stable tag: 3.5.9
     8Stable tag: 3.5.10
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.txt
     
    4141== Changelog ==
    4242
     43= 3.5.10 -2025-06-22 =
     44* 新增 - 綠界物流可以設定申報價格的計算模式(針對綠界 API 運作與手冊不符的臨時解決方案)。
     45
    4346= 3.5.9 - 2025-06-17 =
    4447* 調整 - 調整綠界物流API變更調整。
  • ry-woocommerce-tools/trunk/ry-woocommerce-tools.php

    r3312911 r3315774  
    55 * Plugin URI: https://ry-plugin.com/ry-woocommerce-tools
    66 * Description: WooCommerce paymet and shipping tools
    7  * Version: 3.5.9
     7 * Version: 3.5.10
    88 * Requires at least: 6.6
    99 * Requires PHP: 8.0
     
    2222function_exists('plugin_dir_url') or exit('No direct script access allowed');
    2323
    24 define('RY_WT_VERSION', '3.5.9');
     24define('RY_WT_VERSION', '3.5.10');
    2525define('RY_WT_PLUGIN_URL', plugin_dir_url(__FILE__));
    2626define('RY_WT_PLUGIN_DIR', plugin_dir_path(__FILE__));
  • ry-woocommerce-tools/trunk/woocommerce/shipping/ecpay/includes/settings/admin-settings.php

    r3294501 r3315774  
    116116    ],
    117117    [
     118        'title' => __('Shipping declare amount mode', 'ry-woocommerce-tools'),
     119        'id' => RY_WT::OPTION_PREFIX . 'ecpay_shipping_declare_mode',
     120        'type' => 'select',
     121        'default' => 'product',
     122        'options' => [
     123            'product' => __('product regular', 'ry-woocommerce-tools'),
     124            'payment' => __('payment amount', 'ry-woocommerce-tools'),
     125        ],
     126        'desc' => __('Only work with cash on delivery and can set different amount.', 'ry-woocommerce-tools'),
     127        'desc_tip' => true,
     128    ],
     129    [
    118130        'title' => __('Shipping declare amount over 20000', 'ry-woocommerce-tools'),
    119131        'id' => RY_WT::OPTION_PREFIX . 'ecpay_shipping_declare_over',
     
    124136            'limit' => __('limit 2000', 'ry-woocommerce-tools'),
    125137        ],
    126         'desc' => __('Use product regular price as declare amount.', 'ry-woocommerce-tools'),
    127         'desc_tip' => true,
    128138    ],
    129139    [
     
    152162        'type' => 'text',
    153163    ],
    154     /* 綠界取消支援
    155     [
    156         'title' => __('Pickup time ( Home delivery )', 'ry-woocommerce-tools'),
    157         'id' => RY_WT::OPTION_PREFIX . 'ecpay_shipping_pickup_time',
    158         'type' => 'select',
    159         'default' => '4',
    160         'options' => [
    161             '1' => _x('morning', 'Pickup time', 'ry-woocommerce-tools'),
    162             '2' => _x('afternoon', 'Pickup time', 'ry-woocommerce-tools'),
    163             '4' => _x('unlimited', 'Pickup time', 'ry-woocommerce-tools'),
    164         ],
    165     ],
    166     */
    167164    [
    168165        'id' => 'note_options',
  • ry-woocommerce-tools/trunk/woocommerce/shipping/ecpay/includes/shipping-api.php

    r3312911 r3315774  
    190190                if ('Y' === $args['IsCollection']) {
    191191                    $args['CollectionAmount'] = (int) $package_info['fee'];
    192                     if (str_starts_with($args['LogisticsSubType'], 'UNIMART')) {
     192                    if (RY_WT::get_option('ecpay_shipping_declare_mode') === 'payment') {
     193                        $args['GoodsAmount'] = $args['CollectionAmount'];
     194                    } elseif (str_starts_with($args['LogisticsSubType'], 'UNIMART')) {
    193195                        $args['GoodsAmount'] = $args['CollectionAmount'];
    194196                    }
Note: See TracChangeset for help on using the changeset viewer.