Plugin Directory

Changeset 3035206


Ignore:
Timestamp:
02/13/2024 05:17:37 PM (2 years ago)
Author:
shindhl
Message:

Release 2.0.19

  • Added a filter to ServicePoint locator to only show pickup locations
  • Fixed shipping zone settings not displaying correctly for the new WooCommerce layout
Location:
dhlpwc
Files:
14 edited
1 copied

Legend:

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

    r3012853 r3035206  
    11# DHL eCommerce for WooCommerce
    22 
     3v2.0.19
     4## Changes
     5- Added a filter to ServicePoint locator to only show pickup locations
     6- Fixed shipping zone settings not displaying correctly for the new WooCommerce layout
     7
    38v2.0.18
    49## Changes
  • dhlpwc/tags/2.0.19/assets/css/dhlpwc.admin.css

    r2974250 r3035206  
    245245    left: 0;
    246246    width: inherit;
    247     display: none;
    248247    margin-right: -240px;
    249248    padding: 0 20px;
    250     height: 0;
    251249}
    252250
  • dhlpwc/tags/2.0.19/assets/js/dhlpwc.parcelshop.locator.js

    r2688414 r3035206  
    9292                    header: false,
    9393                    resizable: true,
    94                     onSelect: window.dhlpwc_select_servicepoint
     94                    onSelect: window.dhlpwc_select_servicepoint,
     95                    filter: {
     96                        serviceType: 'pick-up'
     97                    }
    9598                };
    9699
  • dhlpwc/tags/2.0.19/dhlpwoocommerce.php

    r3012853 r3035206  
    44 * Plugin URI:           https://www.dhlparcel.nl
    55 * Description:          This is the official DHL eCommerce for WooCommerce plugin.
    6  * Author:               DHL Parcel
    7  * Version:              2.0.18
     6 * Author:               DHL eCommerce
     7 * Version:              2.0.19
    88 * Requires at least:    4.7.16
    99 * Tested up to:         6.3
    1010 * Requires PHP:         5.6
    1111 * WC requires at least: 3.0.0
    12  * WC tested up to:      8.0.2
     12 * WC tested up to:      8.5.2
    1313 * License:              GPL v3 or later
    1414 * License URI:          https://www.gnu.org/licenses/gpl-3.0.html
  • dhlpwc/tags/2.0.19/includes/controller/admin/class-dhlpwc-controller-admin-settings.php

    r2995038 r3035206  
    117117    public function load_styles()
    118118    {
    119         if ($this->is_plugin_screen() || $this->is_shipping_zone_screen()) {
     119        if ($this->is_plugin_screen() || $this->is_shipping_zone_screen() || $this->is_shipping_zone_instance_screen()) {
    120120            wp_enqueue_style('dhlpwc-admin-style', DHLPWC_PLUGIN_URL . 'assets/css/dhlpwc.admin.css');
    121121        }
     
    130130        wp_enqueue_script( 'dhlpwc-admin-notices', DHLPWC_PLUGIN_URL . 'assets/js/dhlpwc.notices.js', array('jquery'));
    131131
    132         if ($this->is_plugin_screen() || $this->is_shipping_zone_screen()) {
     132        if ($this->is_plugin_screen() || $this->is_shipping_zone_screen() || $this->is_shipping_zone_instance_screen()) {
    133133
    134134            $condition_templates = array();
     
    250250    }
    251251
     252    protected function is_shipping_zone_instance_screen()
     253    {
     254        if (!function_exists('get_current_screen')) {
     255            return false;
     256        }
     257
     258        $screen = get_current_screen();
     259        if (!isset($screen)) {
     260            return false;
     261        }
     262
     263        if ($screen->base !== 'woocommerce_page_wc-settings') {
     264            return false;
     265        }
     266
     267        if (!isset($_GET['page']) || $_GET['page'] !== 'wc-settings') {
     268            return false;
     269        }
     270
     271        if (!isset($_GET['tab']) || $_GET['tab'] !== 'shipping') {
     272            return false;
     273        }
     274
     275        if (!isset($_GET['instance_id'])) {
     276            return false;
     277        }
     278
     279        /** @var WC_Shipping_Method $shipping_method */
     280        $shipping_method = WC_Shipping_Zones::get_shipping_method($_GET['instance_id']);
     281        if (empty($shipping_method)) {
     282            return false;
     283        }
     284
     285        if ($shipping_method->id !== 'dhlpwc') {
     286            return false;
     287        }
     288
     289        return true;
     290    }
     291
    252292    public function check_for_notices()
    253293    {
  • dhlpwc/tags/2.0.19/includes/model/woocommerce/settings/class-dhlpwc-model-woocommerce-settings-shipping-method.php

    r2995038 r3035206  
    4343        $this->supports = array(
    4444            'instance-settings',
    45             'instance-settings-modal',
    4645            'settings',
    4746        );
  • dhlpwc/tags/2.0.19/readme.txt

    r3012853 r3035206  
    55Requires PHP:         5.6
    66Tested up to:         6.2
    7 Stable tag:           2.0.18
     7Stable tag:           2.0.19
    88WC requires at least: 3.0.0
    9 WC tested up to:      7.3.0
     9WC tested up to:      8.5.2
    1010License:              GPL v3 or later
    1111License URI:          https://www.gnu.org/licenses/gpl-3.0.html
     
    5454== Changelog ==
    5555 
     56= 2.0.19 =
     57- Added a filter to ServicePoint locator to only show pickup locations
     58- Fixed shipping zone settings not displaying correctly for the new WooCommerce layout
     59
    5660= 2.0.18 =
    5761- Fixed DHL Plugin Settings page on WooCommerce v8.4.0
  • dhlpwc/trunk/README.md

    r3012853 r3035206  
    11# DHL eCommerce for WooCommerce
    22 
     3v2.0.19
     4## Changes
     5- Added a filter to ServicePoint locator to only show pickup locations
     6- Fixed shipping zone settings not displaying correctly for the new WooCommerce layout
     7
    38v2.0.18
    49## Changes
  • dhlpwc/trunk/assets/css/dhlpwc.admin.css

    r2974250 r3035206  
    245245    left: 0;
    246246    width: inherit;
    247     display: none;
    248247    margin-right: -240px;
    249248    padding: 0 20px;
    250     height: 0;
    251249}
    252250
  • dhlpwc/trunk/assets/js/dhlpwc.parcelshop.locator.js

    r2688414 r3035206  
    9292                    header: false,
    9393                    resizable: true,
    94                     onSelect: window.dhlpwc_select_servicepoint
     94                    onSelect: window.dhlpwc_select_servicepoint,
     95                    filter: {
     96                        serviceType: 'pick-up'
     97                    }
    9598                };
    9699
  • dhlpwc/trunk/dhlpwoocommerce.php

    r3012853 r3035206  
    44 * Plugin URI:           https://www.dhlparcel.nl
    55 * Description:          This is the official DHL eCommerce for WooCommerce plugin.
    6  * Author:               DHL Parcel
    7  * Version:              2.0.18
     6 * Author:               DHL eCommerce
     7 * Version:              2.0.19
    88 * Requires at least:    4.7.16
    99 * Tested up to:         6.3
    1010 * Requires PHP:         5.6
    1111 * WC requires at least: 3.0.0
    12  * WC tested up to:      8.0.2
     12 * WC tested up to:      8.5.2
    1313 * License:              GPL v3 or later
    1414 * License URI:          https://www.gnu.org/licenses/gpl-3.0.html
  • dhlpwc/trunk/includes/controller/admin/class-dhlpwc-controller-admin-settings.php

    r2995038 r3035206  
    117117    public function load_styles()
    118118    {
    119         if ($this->is_plugin_screen() || $this->is_shipping_zone_screen()) {
     119        if ($this->is_plugin_screen() || $this->is_shipping_zone_screen() || $this->is_shipping_zone_instance_screen()) {
    120120            wp_enqueue_style('dhlpwc-admin-style', DHLPWC_PLUGIN_URL . 'assets/css/dhlpwc.admin.css');
    121121        }
     
    130130        wp_enqueue_script( 'dhlpwc-admin-notices', DHLPWC_PLUGIN_URL . 'assets/js/dhlpwc.notices.js', array('jquery'));
    131131
    132         if ($this->is_plugin_screen() || $this->is_shipping_zone_screen()) {
     132        if ($this->is_plugin_screen() || $this->is_shipping_zone_screen() || $this->is_shipping_zone_instance_screen()) {
    133133
    134134            $condition_templates = array();
     
    250250    }
    251251
     252    protected function is_shipping_zone_instance_screen()
     253    {
     254        if (!function_exists('get_current_screen')) {
     255            return false;
     256        }
     257
     258        $screen = get_current_screen();
     259        if (!isset($screen)) {
     260            return false;
     261        }
     262
     263        if ($screen->base !== 'woocommerce_page_wc-settings') {
     264            return false;
     265        }
     266
     267        if (!isset($_GET['page']) || $_GET['page'] !== 'wc-settings') {
     268            return false;
     269        }
     270
     271        if (!isset($_GET['tab']) || $_GET['tab'] !== 'shipping') {
     272            return false;
     273        }
     274
     275        if (!isset($_GET['instance_id'])) {
     276            return false;
     277        }
     278
     279        /** @var WC_Shipping_Method $shipping_method */
     280        $shipping_method = WC_Shipping_Zones::get_shipping_method($_GET['instance_id']);
     281        if (empty($shipping_method)) {
     282            return false;
     283        }
     284
     285        if ($shipping_method->id !== 'dhlpwc') {
     286            return false;
     287        }
     288
     289        return true;
     290    }
     291
    252292    public function check_for_notices()
    253293    {
  • dhlpwc/trunk/includes/model/woocommerce/settings/class-dhlpwc-model-woocommerce-settings-shipping-method.php

    r2995038 r3035206  
    4343        $this->supports = array(
    4444            'instance-settings',
    45             'instance-settings-modal',
    4645            'settings',
    4746        );
  • dhlpwc/trunk/readme.txt

    r3012853 r3035206  
    55Requires PHP:         5.6
    66Tested up to:         6.2
    7 Stable tag:           2.0.18
     7Stable tag:           2.0.19
    88WC requires at least: 3.0.0
    9 WC tested up to:      7.3.0
     9WC tested up to:      8.5.2
    1010License:              GPL v3 or later
    1111License URI:          https://www.gnu.org/licenses/gpl-3.0.html
     
    5454== Changelog ==
    5555 
     56= 2.0.19 =
     57- Added a filter to ServicePoint locator to only show pickup locations
     58- Fixed shipping zone settings not displaying correctly for the new WooCommerce layout
     59
    5660= 2.0.18 =
    5761- Fixed DHL Plugin Settings page on WooCommerce v8.4.0
Note: See TracChangeset for help on using the changeset viewer.