Plugin Directory

Changeset 3225923


Ignore:
Timestamp:
01/21/2025 04:59:46 AM (14 months ago)
Author:
shipany
Message:

release v1.1.65

Location:
shipany
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shipany/tags/1.1.65/assets/js/shipany.js

    r3032634 r3225923  
    1616                .on( 'click', '#shipany-pickup-button', this.pickup_fn );
    1717            $( '#woocommerce-shipment-shipany-label' )
     18                .on( 'change', '#pr_shipany_merchant_location', this.change_courier );
     19            $( '#woocommerce-shipment-shipany-label' )
     20                .on( 'change', '#pr_shipany_incoterms', this.change_courier );
     21            $( '#woocommerce-shipment-shipany-label' )
    1822                .on( 'change', '#pr_shipany_product', this.change_courier );
    1923            $( '#woocommerce-shipment-shipany-label' )
    20                 .on( 'change', '#pr_shipany_storage_type', this.change_storage_type );
     24                .on( 'change', '#pr_shipany_storage_type', this.change_courier );
    2125            $( '#woocommerce-shipment-shipany-label' )
    2226                .on( 'change', '#pr_shipany_courier_additional_service', this.change_courier_additional_service );
     
    308312
    309313        change_courier: function(e) {
    310             $courier_id=e.target.value;
    311             const targetCourier = $(e.target).find('option:selected')[0].text || ''
     314            const targetCourier = $("#pr_shipany_product").find('option:selected')[0].text || ''
    312315            let courierNeedSelectServicePlan = true
    313316            // lalamove
     
    385388
    386389            $("[name='pr_shipany_couier_service_plan']").empty()
    387             if (courierNeedSelectServicePlan) {
    388                 wc_shipment_shipany_label_items._update_by_courier($courier_id);
    389             } else {
    390                 // normal courier
    391                 $('.pr_shipany_couier_service_plan_field').hide()
    392             }
    393 
     390            wc_shipment_shipany_label_items._update_by_courier($("#pr_shipany_product").find('option:selected')[0].value);
    394391        },
    395392
     
    406403            var paid_by_rec = $( '[name="pr_shipany_paid_by_rec"]' ).get(0).checked ? 'yes' : 'no';
    407404            var self_drop_off = $( '[name="pr_shipany_self_drop_off"]' ).get(0).checked ? 'yes' : 'no';
     405            var merchant_location = $( '[name="pr_shipany_merchant_location"]' ).val();
     406            var incoterms = $( '[name="pr_shipany_incoterms"]' ).val();
    408407            var weight = $( '[name="shipany_weight"]' ).val();
    409408            $('.pr_shipany_couier_service_plan_field').show()
     
    418417                selfDropOff: self_drop_off,
    419418                packageWeight: weight,
     419                location_uid: merchant_location,
     420                incoterms: incoterms,
    420421            };
    421422
     
    468469                }
    469470            });
    470         },
    471 
    472         change_storage_type: function(e) {
    473             const targetCourier = $('#pr_shipany_product').find('option:selected')[0].text || '';
    474             let courierNeedSelectServicePlan = true;
    475             $("[name='pr_shipany_couier_service_plan']").empty()
    476             if (courierNeedSelectServicePlan) {
    477                 wc_shipment_shipany_label_items._update_by_courier($('#pr_shipany_product').find('option:selected')[0].value);
    478             } else {
    479                 // normal courier
    480                 $('.pr_shipany_couier_service_plan_field').hide()
    481             }
    482471        },
    483472       
  • shipany/tags/1.1.65/includes/Utils/ShipanyHelper.php

    r3218747 r3225923  
    173173                'add-ons' => array(), // for lalamove, keep the structure of the add-ons
    174174                'package_weight' => 0,
     175                'location_uid' => '', // static::get_settings('shipany_default_location'),
     176                'incoterms' => static::get_settings('shipany_incoterms'),
    175177            ),
    176178            $shipany_data
     
    182184
    183185        $merchant_info = static::get_merchant_info();
    184         $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true);
    185         $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true);
     186        if($shipany_data['location_uid']){
     187            $sndr_ctc['location_uid'] = $shipany_data['location_uid'];
     188        } else {
     189            $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true);
     190            $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true);
     191        }
    186192        $avaliable_couriers = json_decode(json_encode(array_filter(static::get_couriers(), function ($courier) use ($merchant_info) {
    187193            return in_array($courier->uid, $merchant_info->desig_cours);
     
    375381            'paid_by_rcvr' => $shipany_data['paid_by_rcvr'],
    376382            'stg' => $shipany_data['storage_type'] ?: 'Normal',
     383            'incoterms' => $shipany_data['incoterms'],
    377384            'order_from' => "woocommerce",
    378385            'woocommerce_default_create' => $shipany_data['auto'],
     
    557564
    558565    public static function query_rate($payload, $header) {
    559         $request_headers = array(
    560             // "cour-uid" => isset($payload['cour_uid']) ? $payload['cour_uid'] : ''
    561         );
    562         // if (empty($request_headers["cour-uid"])) {
    563         //     $request_headers["cour-uid"] = $header['cour-uid'];
    564         // }
     566        $request_headers = array();
    565567        $response = static::getInstance()->api_client->post('couriers-connector/query-rate/', $payload, $request_headers);
    566568        if ($response->status === 200) {
     
    712714        $settings = get_option('woocommerce_shipany_ecs_asia_settings');
    713715        return isset($settings[$key]) ? $settings[$key] : null;
     716    }
     717
     718    public static function update_settings($key, $value) {
     719        $settings = get_option('woocommerce_shipany_ecs_asia_settings');
     720        $settings[$key] = $value;
     721        update_option('woocommerce_shipany_ecs_asia_settings', $settings);
    714722    }
    715723
     
    10591067            return 'customer';
    10601068        }
     1069    }
     1070
     1071    public static function get_merchant_locations($fulfillment_enabled=false) {
     1072        $output = array(
     1073            array(
     1074                'uid' => '',
     1075                'country' => array(
     1076                    0 => 'HKG',
     1077                    1 => 'SGP',
     1078                    2 => 'TWN',
     1079                    3 => 'THA',
     1080                )[static::get_settings('shipany_region')],
     1081                'name' => __('Default Location', 'shipany'),
     1082            )
     1083        );
     1084        $url = 'locations/';
     1085        if($fulfillment_enabled){
     1086            $url = $url . '?fulfillment_enabled=true';
     1087        }
     1088        $resp = static::getInstance()->api_client->get($url);
     1089        if ($resp->status >= 200 && $resp->status < 300) {
     1090            $resp = json_decode($resp->body, true);
     1091            if (!isset($resp['result']) || $resp['result']['code'] != 200) {
     1092                return $output;
     1093            }
     1094            $result = $resp['data']['objects'];
     1095            return array_merge($output, $result);
     1096        }
     1097        return $output;
    10611098    }
    10621099
  • shipany/tags/1.1.65/includes/abstract-shipany-wc-order.php

    r3218747 r3225923  
    217217            'self_drop_off' => $self_drop_off,
    218218            'package_weight' => $_POST['packageWeight'],
     219            'location_uid' => $_POST['location_uid'],
     220            'incoterms' => $_POST['incoterms'],
    219221        ));
    220222       
     
    803805                    'value' => wp_create_nonce( 'create-shipany-label' )
    804806                ) );
     807
     808                $cross_boarder_map = array();
     809
     810                $pr_shipany_merchant_location = $obj->get_meta('pr_shipany_merchant_location');
     811
     812                woocommerce_wp_select(array(
     813                    'id' => 'pr_shipany_merchant_location',
     814                    'label' => __('Merchant Location', 'shipany'),
     815                    'options' => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) use (&$cross_boarder_map, $obj) {
     816                        $acc[$location['uid']] = $location['name'] . (@$location['address_line'] ? ' (' . $location['address_line'] . ')' : '');
     817                        if($location['country'] != CommonUtils::convert_country_code($obj->get_address('shipping')['country'])) {
     818                            $cross_boarder_map[] = $location['uid'];
     819                        }
     820                        return $acc;
     821                    }, array()),
     822                    'value' => $pr_shipany_merchant_location,
     823                    'custom_attributes' => array(
     824                        'data-cross-boarder-map' => json_encode($cross_boarder_map),
     825                        'onchange' => 'document.getElementById("pr_shipany_incoterms").parentElement.style.display = (this.dataset.crossBoarderMap ? JSON.parse(this.dataset.crossBoarderMap).includes(this.value) : false) ? "block" : "none";'
     826                    )
     827                ));
     828
     829                woocommerce_wp_select(array(
     830                    'id' => 'pr_shipany_incoterms',
     831                    'label' => __('Duty Type', 'shipany'),
     832                    'options' => array(
     833                        'DDP' => __('DDP - Delivered Duty Paid', 'shipany'),
     834                        'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany')
     835                    )
     836                ));
     837
     838                echo '<script>document.getElementById("pr_shipany_incoterms").parentElement.style.display = (document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap ? JSON.parse(document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap).includes(document.getElementById("pr_shipany_merchant_location").value) : false) ? "block" : "none";</script>';
    805839
    806840                woocommerce_wp_select ( array(
     
    13501384                'paid_by_rcvr' => isset($_POST['pr_shipany_paid_by_rec']) && $_POST['pr_shipany_paid_by_rec'] == 'yes',
    13511385                'self_drop_off' => isset($_POST['pr_shipany_self_drop_off']) && $_POST['pr_shipany_self_drop_off'] == 'yes',
     1386                'package_weight' => $_POST['shipany_weight'],
     1387                'location_uid' => $_POST['pr_shipany_merchant_location'],
     1388                'incoterms' => $_POST['pr_shipany_incoterms'],
    13521389            ));
    13531390            // $args = apply_filters('shipping_shipany_label_args', $args, $order_id );
  • shipany/tags/1.1.65/includes/class-shipany-wc-method-ecs-asia.php

    r3105502 r3225923  
    511511            'class'             => 'wc-enhanced-select'
    512512        );
     513
     514        // $default_location = array(
     515        //  'title'             => __( 'Default Location', 'shipany' ),
     516        //  'type'              => 'select',
     517        //  'description'       => __( 'Please select the default location.', 'shipany' ),
     518        //  'desc_tip'          => true,
     519        //  'options'           => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) {
     520        //      $acc[$location['uid']] = $location['name'];
     521        //  return $acc;
     522        //  }, array()),
     523        //  'class'             => 'wc-enhanced-select'
     524        // );
     525
    513526        $paid_by_rec = array(
    514527            'title'             => __( 'Paid by Receiver', 'shipany' ),
     
    527540        );
    528541
     542        $ddp_or_ddu = array(
     543            'title'             => __( 'Duty Type (Only applicable for international shipment)', 'shipany' ),
     544            'type'              => 'select',
     545            'description'       => __( 'Please select DDP (Delivered Duty Paid) or DDU (Delivered Duty Unpaid). For DDP, import duty and taxes are paid by sender. For DDU, import duty and taxes are paid by receiver.', 'shipany' ),
     546            'desc_tip'          => true,
     547            'options'           => array(
     548                'DDP' => __('DDP - Delivered Duty Paid', 'shipany'),
     549                'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany')
     550            ),
     551            'default'           => 'DDP',
     552            'class'             => 'wc-enhanced-select'
     553        );
     554
    529555        $this->form_fields = array_slice($this->form_fields, 0, 7, true) + array(
    530556            "shipany_default_courier_additional_service" => $default_courier_additional_service,
     557            // "shipany_default_location" => $default_location,
    531558            "shipany_paid_by_rec" => $paid_by_rec,
    532559            "shipany_self_drop_off" => $self_drop_off,
     560            "shipany_incoterms" => $ddp_or_ddu,
    533561            "shipany_rest_token" => $get_token,
    534562            "shipany_enable_locker_list" => $insert_locker_setting1,
  • shipany/tags/1.1.65/lang/shipany-zh_HK.po

    r3105502 r3225923  
    867867msgid "Self Drop-off:"
    868868msgstr "自寄:"
     869
     870msgid "DDP - Delivered Duty Paid"
     871msgstr "DDP - 寄方支付清關費用"
     872
     873msgid "DDU - Delivered Duty Unpaid"
     874msgstr "DDU - 收件方支付清關費用"
     875
     876msgid "Default Location"
     877msgstr "預設地址"
  • shipany/tags/1.1.65/lang/shipany-zh_TW.po

    r3105502 r3225923  
    867867msgid "Self Drop-off:"
    868868msgstr "自寄:"
     869
     870msgid "DDP - Delivered Duty Paid"
     871msgstr "DDP - 寄方支付清關費用"
     872
     873msgid "DDU - Delivered Duty Unpaid"
     874msgstr "DDU - 收件方支付清關費用"
     875
     876msgid "Default Location"
     877msgstr "預設地址"
  • shipany/tags/1.1.65/readme.txt

    r3218878 r3225923  
    44Requires at least: 4.1
    55Tested up to: 6.7.1
    6 Stable tag: 1.1.64
     6Stable tag: 1.1.65
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    7171== Changelog ==
    7272
     73= 1.1.65 =
     74- Added merchant location
     75- Added incoterms support
     76
    7377= 1.1.64 =
    7478- Added Support for Thailand Region
  • shipany/tags/1.1.65/shipany-woocommerce.php

    r3218747 r3225923  
    77Plugin URI: http://wordpress.org/plugins/shipany
    88Description: ShipAny one-stop logistics platform interconnects WooCommerce to multiple logistics service providers (including SF Express, Kerry Express, SF Cold-Chain, Alfred Locker, Hongkong Post, SF Locker, Convenience Store, etc.) so merchants can enjoy full-set features of logistics automation which disrupt the manual logistics process and bring E-Commerce to new generation.
    9 Version: 1.1.64
     9Version: 1.1.65
    1010Author: ShipAny
    1111Author URI: https://www.shipany.io
     
    690690    class SHIPANY_WC {
    691691        public static $list;
    692         private $version = "1.1.64";
     692        private $version = "1.1.65";
    693693
    694694        protected static $_instance = null;
  • shipany/trunk/assets/js/shipany.js

    r3032634 r3225923  
    1616                .on( 'click', '#shipany-pickup-button', this.pickup_fn );
    1717            $( '#woocommerce-shipment-shipany-label' )
     18                .on( 'change', '#pr_shipany_merchant_location', this.change_courier );
     19            $( '#woocommerce-shipment-shipany-label' )
     20                .on( 'change', '#pr_shipany_incoterms', this.change_courier );
     21            $( '#woocommerce-shipment-shipany-label' )
    1822                .on( 'change', '#pr_shipany_product', this.change_courier );
    1923            $( '#woocommerce-shipment-shipany-label' )
    20                 .on( 'change', '#pr_shipany_storage_type', this.change_storage_type );
     24                .on( 'change', '#pr_shipany_storage_type', this.change_courier );
    2125            $( '#woocommerce-shipment-shipany-label' )
    2226                .on( 'change', '#pr_shipany_courier_additional_service', this.change_courier_additional_service );
     
    308312
    309313        change_courier: function(e) {
    310             $courier_id=e.target.value;
    311             const targetCourier = $(e.target).find('option:selected')[0].text || ''
     314            const targetCourier = $("#pr_shipany_product").find('option:selected')[0].text || ''
    312315            let courierNeedSelectServicePlan = true
    313316            // lalamove
     
    385388
    386389            $("[name='pr_shipany_couier_service_plan']").empty()
    387             if (courierNeedSelectServicePlan) {
    388                 wc_shipment_shipany_label_items._update_by_courier($courier_id);
    389             } else {
    390                 // normal courier
    391                 $('.pr_shipany_couier_service_plan_field').hide()
    392             }
    393 
     390            wc_shipment_shipany_label_items._update_by_courier($("#pr_shipany_product").find('option:selected')[0].value);
    394391        },
    395392
     
    406403            var paid_by_rec = $( '[name="pr_shipany_paid_by_rec"]' ).get(0).checked ? 'yes' : 'no';
    407404            var self_drop_off = $( '[name="pr_shipany_self_drop_off"]' ).get(0).checked ? 'yes' : 'no';
     405            var merchant_location = $( '[name="pr_shipany_merchant_location"]' ).val();
     406            var incoterms = $( '[name="pr_shipany_incoterms"]' ).val();
    408407            var weight = $( '[name="shipany_weight"]' ).val();
    409408            $('.pr_shipany_couier_service_plan_field').show()
     
    418417                selfDropOff: self_drop_off,
    419418                packageWeight: weight,
     419                location_uid: merchant_location,
     420                incoterms: incoterms,
    420421            };
    421422
     
    468469                }
    469470            });
    470         },
    471 
    472         change_storage_type: function(e) {
    473             const targetCourier = $('#pr_shipany_product').find('option:selected')[0].text || '';
    474             let courierNeedSelectServicePlan = true;
    475             $("[name='pr_shipany_couier_service_plan']").empty()
    476             if (courierNeedSelectServicePlan) {
    477                 wc_shipment_shipany_label_items._update_by_courier($('#pr_shipany_product').find('option:selected')[0].value);
    478             } else {
    479                 // normal courier
    480                 $('.pr_shipany_couier_service_plan_field').hide()
    481             }
    482471        },
    483472       
  • shipany/trunk/includes/Utils/ShipanyHelper.php

    r3218747 r3225923  
    173173                'add-ons' => array(), // for lalamove, keep the structure of the add-ons
    174174                'package_weight' => 0,
     175                'location_uid' => '', // static::get_settings('shipany_default_location'),
     176                'incoterms' => static::get_settings('shipany_incoterms'),
    175177            ),
    176178            $shipany_data
     
    182184
    183185        $merchant_info = static::get_merchant_info();
    184         $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true);
    185         $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true);
     186        if($shipany_data['location_uid']){
     187            $sndr_ctc['location_uid'] = $shipany_data['location_uid'];
     188        } else {
     189            $sndr_ctc['ctc'] = json_decode(json_encode($merchant_info->co_info->ctc_pers[0]->ctc), true);
     190            $sndr_ctc['addr'] = json_decode(json_encode($merchant_info->co_info->org_ctcs[0]->addr), true);
     191        }
    186192        $avaliable_couriers = json_decode(json_encode(array_filter(static::get_couriers(), function ($courier) use ($merchant_info) {
    187193            return in_array($courier->uid, $merchant_info->desig_cours);
     
    375381            'paid_by_rcvr' => $shipany_data['paid_by_rcvr'],
    376382            'stg' => $shipany_data['storage_type'] ?: 'Normal',
     383            'incoterms' => $shipany_data['incoterms'],
    377384            'order_from' => "woocommerce",
    378385            'woocommerce_default_create' => $shipany_data['auto'],
     
    557564
    558565    public static function query_rate($payload, $header) {
    559         $request_headers = array(
    560             // "cour-uid" => isset($payload['cour_uid']) ? $payload['cour_uid'] : ''
    561         );
    562         // if (empty($request_headers["cour-uid"])) {
    563         //     $request_headers["cour-uid"] = $header['cour-uid'];
    564         // }
     566        $request_headers = array();
    565567        $response = static::getInstance()->api_client->post('couriers-connector/query-rate/', $payload, $request_headers);
    566568        if ($response->status === 200) {
     
    712714        $settings = get_option('woocommerce_shipany_ecs_asia_settings');
    713715        return isset($settings[$key]) ? $settings[$key] : null;
     716    }
     717
     718    public static function update_settings($key, $value) {
     719        $settings = get_option('woocommerce_shipany_ecs_asia_settings');
     720        $settings[$key] = $value;
     721        update_option('woocommerce_shipany_ecs_asia_settings', $settings);
    714722    }
    715723
     
    10591067            return 'customer';
    10601068        }
     1069    }
     1070
     1071    public static function get_merchant_locations($fulfillment_enabled=false) {
     1072        $output = array(
     1073            array(
     1074                'uid' => '',
     1075                'country' => array(
     1076                    0 => 'HKG',
     1077                    1 => 'SGP',
     1078                    2 => 'TWN',
     1079                    3 => 'THA',
     1080                )[static::get_settings('shipany_region')],
     1081                'name' => __('Default Location', 'shipany'),
     1082            )
     1083        );
     1084        $url = 'locations/';
     1085        if($fulfillment_enabled){
     1086            $url = $url . '?fulfillment_enabled=true';
     1087        }
     1088        $resp = static::getInstance()->api_client->get($url);
     1089        if ($resp->status >= 200 && $resp->status < 300) {
     1090            $resp = json_decode($resp->body, true);
     1091            if (!isset($resp['result']) || $resp['result']['code'] != 200) {
     1092                return $output;
     1093            }
     1094            $result = $resp['data']['objects'];
     1095            return array_merge($output, $result);
     1096        }
     1097        return $output;
    10611098    }
    10621099
  • shipany/trunk/includes/abstract-shipany-wc-order.php

    r3218747 r3225923  
    217217            'self_drop_off' => $self_drop_off,
    218218            'package_weight' => $_POST['packageWeight'],
     219            'location_uid' => $_POST['location_uid'],
     220            'incoterms' => $_POST['incoterms'],
    219221        ));
    220222       
     
    803805                    'value' => wp_create_nonce( 'create-shipany-label' )
    804806                ) );
     807
     808                $cross_boarder_map = array();
     809
     810                $pr_shipany_merchant_location = $obj->get_meta('pr_shipany_merchant_location');
     811
     812                woocommerce_wp_select(array(
     813                    'id' => 'pr_shipany_merchant_location',
     814                    'label' => __('Merchant Location', 'shipany'),
     815                    'options' => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) use (&$cross_boarder_map, $obj) {
     816                        $acc[$location['uid']] = $location['name'] . (@$location['address_line'] ? ' (' . $location['address_line'] . ')' : '');
     817                        if($location['country'] != CommonUtils::convert_country_code($obj->get_address('shipping')['country'])) {
     818                            $cross_boarder_map[] = $location['uid'];
     819                        }
     820                        return $acc;
     821                    }, array()),
     822                    'value' => $pr_shipany_merchant_location,
     823                    'custom_attributes' => array(
     824                        'data-cross-boarder-map' => json_encode($cross_boarder_map),
     825                        'onchange' => 'document.getElementById("pr_shipany_incoterms").parentElement.style.display = (this.dataset.crossBoarderMap ? JSON.parse(this.dataset.crossBoarderMap).includes(this.value) : false) ? "block" : "none";'
     826                    )
     827                ));
     828
     829                woocommerce_wp_select(array(
     830                    'id' => 'pr_shipany_incoterms',
     831                    'label' => __('Duty Type', 'shipany'),
     832                    'options' => array(
     833                        'DDP' => __('DDP - Delivered Duty Paid', 'shipany'),
     834                        'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany')
     835                    )
     836                ));
     837
     838                echo '<script>document.getElementById("pr_shipany_incoterms").parentElement.style.display = (document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap ? JSON.parse(document.getElementById("pr_shipany_merchant_location").dataset.crossBoarderMap).includes(document.getElementById("pr_shipany_merchant_location").value) : false) ? "block" : "none";</script>';
    805839
    806840                woocommerce_wp_select ( array(
     
    13501384                'paid_by_rcvr' => isset($_POST['pr_shipany_paid_by_rec']) && $_POST['pr_shipany_paid_by_rec'] == 'yes',
    13511385                'self_drop_off' => isset($_POST['pr_shipany_self_drop_off']) && $_POST['pr_shipany_self_drop_off'] == 'yes',
     1386                'package_weight' => $_POST['shipany_weight'],
     1387                'location_uid' => $_POST['pr_shipany_merchant_location'],
     1388                'incoterms' => $_POST['pr_shipany_incoterms'],
    13521389            ));
    13531390            // $args = apply_filters('shipping_shipany_label_args', $args, $order_id );
  • shipany/trunk/includes/class-shipany-wc-method-ecs-asia.php

    r3105502 r3225923  
    511511            'class'             => 'wc-enhanced-select'
    512512        );
     513
     514        // $default_location = array(
     515        //  'title'             => __( 'Default Location', 'shipany' ),
     516        //  'type'              => 'select',
     517        //  'description'       => __( 'Please select the default location.', 'shipany' ),
     518        //  'desc_tip'          => true,
     519        //  'options'           => array_reduce(ShipanyHelper::get_merchant_locations(true), function($acc, $location) {
     520        //      $acc[$location['uid']] = $location['name'];
     521        //  return $acc;
     522        //  }, array()),
     523        //  'class'             => 'wc-enhanced-select'
     524        // );
     525
    513526        $paid_by_rec = array(
    514527            'title'             => __( 'Paid by Receiver', 'shipany' ),
     
    527540        );
    528541
     542        $ddp_or_ddu = array(
     543            'title'             => __( 'Duty Type (Only applicable for international shipment)', 'shipany' ),
     544            'type'              => 'select',
     545            'description'       => __( 'Please select DDP (Delivered Duty Paid) or DDU (Delivered Duty Unpaid). For DDP, import duty and taxes are paid by sender. For DDU, import duty and taxes are paid by receiver.', 'shipany' ),
     546            'desc_tip'          => true,
     547            'options'           => array(
     548                'DDP' => __('DDP - Delivered Duty Paid', 'shipany'),
     549                'DDU' => __('DDU - Delivered Duty Unpaid', 'shipany')
     550            ),
     551            'default'           => 'DDP',
     552            'class'             => 'wc-enhanced-select'
     553        );
     554
    529555        $this->form_fields = array_slice($this->form_fields, 0, 7, true) + array(
    530556            "shipany_default_courier_additional_service" => $default_courier_additional_service,
     557            // "shipany_default_location" => $default_location,
    531558            "shipany_paid_by_rec" => $paid_by_rec,
    532559            "shipany_self_drop_off" => $self_drop_off,
     560            "shipany_incoterms" => $ddp_or_ddu,
    533561            "shipany_rest_token" => $get_token,
    534562            "shipany_enable_locker_list" => $insert_locker_setting1,
  • shipany/trunk/lang/shipany-zh_HK.po

    r3105502 r3225923  
    867867msgid "Self Drop-off:"
    868868msgstr "自寄:"
     869
     870msgid "DDP - Delivered Duty Paid"
     871msgstr "DDP - 寄方支付清關費用"
     872
     873msgid "DDU - Delivered Duty Unpaid"
     874msgstr "DDU - 收件方支付清關費用"
     875
     876msgid "Default Location"
     877msgstr "預設地址"
  • shipany/trunk/lang/shipany-zh_TW.po

    r3105502 r3225923  
    867867msgid "Self Drop-off:"
    868868msgstr "自寄:"
     869
     870msgid "DDP - Delivered Duty Paid"
     871msgstr "DDP - 寄方支付清關費用"
     872
     873msgid "DDU - Delivered Duty Unpaid"
     874msgstr "DDU - 收件方支付清關費用"
     875
     876msgid "Default Location"
     877msgstr "預設地址"
  • shipany/trunk/readme.txt

    r3218878 r3225923  
    44Requires at least: 4.1
    55Tested up to: 6.7.1
    6 Stable tag: 1.1.64
     6Stable tag: 1.1.65
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    7171== Changelog ==
    7272
     73= 1.1.65 =
     74- Added merchant location
     75- Added incoterms support
     76
    7377= 1.1.64 =
    7478- Added Support for Thailand Region
  • shipany/trunk/shipany-woocommerce.php

    r3218747 r3225923  
    77Plugin URI: http://wordpress.org/plugins/shipany
    88Description: ShipAny one-stop logistics platform interconnects WooCommerce to multiple logistics service providers (including SF Express, Kerry Express, SF Cold-Chain, Alfred Locker, Hongkong Post, SF Locker, Convenience Store, etc.) so merchants can enjoy full-set features of logistics automation which disrupt the manual logistics process and bring E-Commerce to new generation.
    9 Version: 1.1.64
     9Version: 1.1.65
    1010Author: ShipAny
    1111Author URI: https://www.shipany.io
     
    690690    class SHIPANY_WC {
    691691        public static $list;
    692         private $version = "1.1.64";
     692        private $version = "1.1.65";
    693693
    694694        protected static $_instance = null;
Note: See TracChangeset for help on using the changeset viewer.