Plugin Directory

Changeset 2846823


Ignore:
Timestamp:
01/11/2023 02:26:11 PM (3 years ago)
Author:
shindhl
Message:

Release 2.0.10

  • Added a setting to automatically apply the ’Insurance’ service to all shipments. Feature applies to both B2B and B2C shipments, as opposed to old ’Extra Assurance’ feature. Note: Extra Assurance will become unavailable in an upcoming release.
  • Added check to mailbox parcel calculation
  • Bugfix in shipment form in backend
Location:
dhlpwc
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • dhlpwc/tags/2.0.10/README.md

    r2836525 r2846823  
    11# DHL Parcel for WooCommerce
     2 
     3v2.0.10
     4## Changes
     5- Added a setting to automatically apply the ’Insurance’ service to all shipments. Feature applies to both B2B and B2C shipments, as opposed to old ’Extra Assurance’ feature. Note: Extra Assurance will become unavailable in an upcoming release.
     6- Added check to mailbox parcel calculation
     7- Bugfix in shipment form in backend
    28 
    39v2.0.9
  • dhlpwc/tags/2.0.10/assets/js/dhlpwc.metabox.js

    r2688414 r2846823  
    172172        });
    173173
     174        // Force "uncheck" when option is disbled
     175        $("input[name='dhlpwc-label-create-option[]']:checked:disabled").prop( "checked", false )
     176
    174177        $(document.body).trigger('dhlpwc:disable_service_option_exclusions');
    175 
    176178        // Then check all service options
    177179    }).on('dhlpwc:disable_service_option_exclusions', function() {
  • dhlpwc/tags/2.0.10/dhlpwoocommerce.php

    r2836525 r2846823  
    55 * Description:          This is the official DHL Parcel for WooCommerce plugin.
    66 * Author:               DHL Parcel
    7  * Version:              2.0.9
     7 * Version:              2.0.10
    88 * Requires at least:    4.7.16
    99 * Tested up to:         6.1
  • dhlpwc/tags/2.0.10/includes/controller/admin/class-dhlpwc-controller-admin-order-metabox.php

    r2836525 r2846823  
    321321            if (!in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_PS, $preselected_options)) {
    322322                // BP preference
    323                 if ($option_service->send_with_bp($order_id)) {
     323                if ($option_service->send_with_bp($order_id) && $option_service->default_bp($order_id, $preselected_options, $to_business)) {
    324324                    if (in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_DOOR, $preselected_options)) {
    325325                        // Remove DOOR
    326326                        $preselected_options = array_diff($preselected_options, [DHLPWC_Model_Meta_Order_Option_Preference::OPTION_DOOR]);
    327327                    }
     328
    328329                    $preselected_options[] = DHLPWC_Model_Meta_Order_Option_Preference::OPTION_BP;
    329330                }
  • dhlpwc/tags/2.0.10/includes/model/service/class-dhlpwc-model-service-order-meta-option.php

    r2836525 r2846823  
    110110        if (!array_key_exists(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_HANDT, $allowed_shipping_options)
    111111            || in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_HANDT, $exclusions)) {
     112            return false;
     113        }
     114
     115        return true;
     116    }
     117
     118    public function default_bp($order_id, $options, $to_business)
     119    {
     120        $service = DHLPWC_Model_Service_Access_Control::instance();
     121
     122        // Remove DOOR, if selected
     123        if (($doorKey = array_search(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_DOOR, $options)) !== false) {
     124            unset($options[$doorKey]);
     125        }
     126
     127        $allowed_shipping_options = $service->check(DHLPWC_Model_Service_Access_Control::ACCESS_CAPABILITY_ORDER_OPTIONS, array(
     128            'order_id'    => $order_id,
     129            'options'     => $options,
     130            'to_business' => $to_business,
     131        ));
     132
     133        $exclusions = $this->get_exclusions($allowed_shipping_options, $options);
     134
     135        // Disable automatic checking of send signature if there are no parceltypes for it
     136        if (!array_key_exists(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_BP, $allowed_shipping_options)
     137            || in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_BP, $exclusions)) {
    112138            return false;
    113139        }
  • dhlpwc/tags/2.0.10/readme.txt

    r2836525 r2846823  
    55Requires PHP:         5.6
    66Tested up to:         5.9
    7 Stable tag:           2.0.9
     7Stable tag:           2.0.10
    88WC requires at least: 3.0.0
    99WC tested up to:      5.3.0
     
    5353
    5454== Changelog ==
     55 
     56= 2.0.10 =
     57- Added a setting to automatically apply the ’Insurance’ service to all shipments. Feature applies to both B2B and B2C shipments, as opposed to old ’Extra Assurance’ feature. Note: Extra Assurance will become unavailable in an upcoming release.
     58- Added check to mailbox parcel calculation
     59- Bugfix in shipment form in backend
    5560 
    5661= 2.0.9 =
  • dhlpwc/trunk/README.md

    r2836525 r2846823  
    11# DHL Parcel for WooCommerce
     2 
     3v2.0.10
     4## Changes
     5- Added a setting to automatically apply the ’Insurance’ service to all shipments. Feature applies to both B2B and B2C shipments, as opposed to old ’Extra Assurance’ feature. Note: Extra Assurance will become unavailable in an upcoming release.
     6- Added check to mailbox parcel calculation
     7- Bugfix in shipment form in backend
    28 
    39v2.0.9
  • dhlpwc/trunk/assets/js/dhlpwc.metabox.js

    r2688414 r2846823  
    172172        });
    173173
     174        // Force "uncheck" when option is disbled
     175        $("input[name='dhlpwc-label-create-option[]']:checked:disabled").prop( "checked", false )
     176
    174177        $(document.body).trigger('dhlpwc:disable_service_option_exclusions');
    175 
    176178        // Then check all service options
    177179    }).on('dhlpwc:disable_service_option_exclusions', function() {
  • dhlpwc/trunk/dhlpwoocommerce.php

    r2836525 r2846823  
    55 * Description:          This is the official DHL Parcel for WooCommerce plugin.
    66 * Author:               DHL Parcel
    7  * Version:              2.0.9
     7 * Version:              2.0.10
    88 * Requires at least:    4.7.16
    99 * Tested up to:         6.1
  • dhlpwc/trunk/includes/controller/admin/class-dhlpwc-controller-admin-order-metabox.php

    r2836525 r2846823  
    321321            if (!in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_PS, $preselected_options)) {
    322322                // BP preference
    323                 if ($option_service->send_with_bp($order_id)) {
     323                if ($option_service->send_with_bp($order_id) && $option_service->default_bp($order_id, $preselected_options, $to_business)) {
    324324                    if (in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_DOOR, $preselected_options)) {
    325325                        // Remove DOOR
    326326                        $preselected_options = array_diff($preselected_options, [DHLPWC_Model_Meta_Order_Option_Preference::OPTION_DOOR]);
    327327                    }
     328
    328329                    $preselected_options[] = DHLPWC_Model_Meta_Order_Option_Preference::OPTION_BP;
    329330                }
  • dhlpwc/trunk/includes/model/service/class-dhlpwc-model-service-order-meta-option.php

    r2836525 r2846823  
    110110        if (!array_key_exists(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_HANDT, $allowed_shipping_options)
    111111            || in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_HANDT, $exclusions)) {
     112            return false;
     113        }
     114
     115        return true;
     116    }
     117
     118    public function default_bp($order_id, $options, $to_business)
     119    {
     120        $service = DHLPWC_Model_Service_Access_Control::instance();
     121
     122        // Remove DOOR, if selected
     123        if (($doorKey = array_search(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_DOOR, $options)) !== false) {
     124            unset($options[$doorKey]);
     125        }
     126
     127        $allowed_shipping_options = $service->check(DHLPWC_Model_Service_Access_Control::ACCESS_CAPABILITY_ORDER_OPTIONS, array(
     128            'order_id'    => $order_id,
     129            'options'     => $options,
     130            'to_business' => $to_business,
     131        ));
     132
     133        $exclusions = $this->get_exclusions($allowed_shipping_options, $options);
     134
     135        // Disable automatic checking of send signature if there are no parceltypes for it
     136        if (!array_key_exists(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_BP, $allowed_shipping_options)
     137            || in_array(DHLPWC_Model_Meta_Order_Option_Preference::OPTION_BP, $exclusions)) {
    112138            return false;
    113139        }
  • dhlpwc/trunk/readme.txt

    r2836525 r2846823  
    55Requires PHP:         5.6
    66Tested up to:         5.9
    7 Stable tag:           2.0.9
     7Stable tag:           2.0.10
    88WC requires at least: 3.0.0
    99WC tested up to:      5.3.0
     
    5353
    5454== Changelog ==
     55 
     56= 2.0.10 =
     57- Added a setting to automatically apply the ’Insurance’ service to all shipments. Feature applies to both B2B and B2C shipments, as opposed to old ’Extra Assurance’ feature. Note: Extra Assurance will become unavailable in an upcoming release.
     58- Added check to mailbox parcel calculation
     59- Bugfix in shipment form in backend
    5560 
    5661= 2.0.9 =
Note: See TracChangeset for help on using the changeset viewer.