Plugin Directory

Changeset 3141567


Ignore:
Timestamp:
08/26/2024 10:15:12 AM (19 months ago)
Author:
dhlparcel
Message:

Release 2.1.7

  • Fixed the Download Label button in the popup shown after creating a label in the HPOS menu
  • Fixed styling in plugin settings menu and added a loader icon
  • Removed an incorrect duplicate text in settings menu
Location:
dhlpwc
Files:
2 added
16 edited
1 copied

Legend:

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

    r3130949 r3141567  
    11# DHL eCommerce (Benelux) for WooCommerce
     2 
     3v2.1.7
     4## Changes
     5- Fixed the Download Label button in the popup shown after creating a label in the HPOS menu
     6- Fixed styling in plugin settings menu and added a loader icon
     7- Removed an incorrect duplicate text in settings menu
    28 
    39v2.1.6
  • dhlpwc/tags/2.1.7/assets/css/dhlpwc.admin.css

    r3093985 r3141567  
    229229}
    230230
     231.woocommerce-centered-spinner {
     232    display: flex;
     233    justify-content: center;
     234}
     235
    231236#mainform > #dhlpwc_shipping_method_settings {
     237    visibility: hidden;
    232238    position: relative;
    233239    padding-left: 220px;
     
    241247
    242248#mainform > #dhlpwc_shipping_method_settings > table {
    243     position: relative;
     249    position: absolute;
    244250    top: 0;
    245     left: 0;
    246     width: inherit;
    247     margin-right: -240px;
     251    left: 240px;
    248252    padding: 0 20px;
    249253}
  • dhlpwc/tags/2.1.7/assets/js/dhlpwc.settings.js

    r3093985 r3141567  
    210210                $(document.body).trigger('dhlpwc:select_settings', [$(this).data('index')]);
    211211            });
    212 
    213             // Select first setting
    214             $(document.body).trigger('dhlpwc:deselect_settings');
    215             $(document.body).trigger('dhlpwc:select_settings', [0]);
    216         });
     212        });
     213        $('#dhlpwc_shipping_method_settings').css('visibility', 'visible');
     214        $('#dhlpwc_shipping_method_settings').parent().find('.woocommerce-centered-spinner').css('display', 'none');
     215
     216        // Select first setting
     217        $(document.body).trigger('dhlpwc:deselect_settings');
     218        $(document.body).trigger('dhlpwc:select_settings', [0]);
    217219
    218220    }).on('dhlpwc:highlight_menu', function(e, index) {
  • dhlpwc/tags/2.1.7/dhlpwoocommerce.php

    r3130949 r3141567  
    55 * Description:          This is the official DHL eCommerce (Benelux) for WooCommerce plugin.
    66 * Author:               DHL eCommerce
    7  * Version:              2.1.6
     7 * Version:              2.1.7
    88 * Requires at least:    4.7.16
    99 * Tested up to:         6.3
     
    5252
    5353        // Set constants
    54         $this->define('DHLPWC_PLUGIN_VERSION', '2.1.6');
     54        $this->define('DHLPWC_PLUGIN_VERSION', '2.1.7');
    5555        $this->define('DHLPWC_PLUGIN_FILE', __FILE__);
    5656        $this->define('DHLPWC_PLUGIN_BASENAME', plugin_basename(__FILE__));
  • dhlpwc/tags/2.1.7/includes/controller/admin/class-dhlpwc-controller-admin-order.php

    r3123181 r3141567  
    351351                $links = array();
    352352                $service = DHLPWC_Model_Service_Access_Control::instance();
     353
    353354                if ($created && $download_id) {
    354355                    $order_ids = get_transient('dhlpwc_bulk_download_' . $download_id);
     
    357358                        $order_list = implode(', ', $order_texts);
    358359
     360                        $settings_service = DHLPWC_Model_Service_Settings::instance();
     361                        $hpos_enabled = $settings_service->is_hpos_enabled();
     362                        $nonce = wp_create_nonce('bulk-orders');
     363
    359364                        if ($service->check(DHLPWC_Model_Service_Access_Control::ACCESS_BULK_DOWNLOAD)) {
     365                            $url = admin_url('edit.php?post_type=shop_order&action=dhlpwc_download_labels');
     366                            if ($hpos_enabled) {
     367                                $url = add_query_arg(
     368                                    array(
     369                                        'page' => 'wc-orders',
     370                                        '_wpnonce' => $nonce,
     371                                        'action' => 'dhlpwc_download_labels',
     372                                        // Omitting the id parameter somehow causes a redirect without our action being called
     373                                        'id' => ''
     374                                    ), admin_url('admin.php'));
     375                            }
    360376                            $link = new DHLPWC_Model_Data_Notice_Custom_Links();
    361377                            $link->url = add_query_arg(array(
    362378                                'post' => $order_ids,
    363                             ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_download_labels'));
     379                            ), $url);
    364380                            $link->message = sprintf(_n('%sDownload label%s For order: %s.', '%sDownload labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list);
    365381                            $link->target = '_blank';
     
    368384
    369385                        if ($service->check(DHLPWC_Model_Service_Access_Control::ACCESS_PRINTER)) {
     386                            $url = admin_url('edit.php?post_type=shop_order&action=dhlpwc_print_labels');
     387                            if ($hpos_enabled) {
     388                                $url = add_query_arg(array(
     389                                    'page' => 'wc-orders',
     390                                    '_wpnonce' => $nonce,
     391                                    'action' => 'dhlpwc_print_labels',
     392                                    // Omitting the id parameter somehow causes a redirect without our action being called
     393                                    'id' => ''
     394                                ), admin_url('admin.php'));
     395                            }
     396
    370397                            $link = new DHLPWC_Model_Data_Notice_Custom_Links();
    371398                            $link->url = add_query_arg(array(
    372399                                'post' => $order_ids,
    373                             ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_print_labels'));
     400                            ), $url);
    374401                            $link->message = sprintf(_n('%sPrint label%s For order: %s.', '%sPrint labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list);
    375402                            $link->target = '_self';
  • dhlpwc/tags/2.1.7/includes/controller/admin/class-dhlpwc-controller-admin-settings.php

    r3130949 r3141567  
    372372            strpos($checkoutContent->post_content, 'wp:dhlpwc/dhlpwc-block') === false &&
    373373            strpos($checkoutContent->post_content, 'wp:woocommerce/checkout') !== false) {
    374             $messages[] = sprintf(__('You are currently missing DHL shipping elements in your checkout. You can fix this by simply going to the edit page of your checkout page and hit the update button.'));
     374            $messages[] = __('You are currently missing DHL shipping elements in your checkout. You can fix this by simply going to the edit page of your checkout page and hit the update button.');
    375375
    376376            $this->show_notice(self::NOTICE_TAG_GUTENBERG_BLOCKS, $messages, admin_url('post.php?post=' . $id . '&action=edit'), self::NOTICE_TAG_GUTENBERG_BLOCKS_FOREVER);
  • dhlpwc/tags/2.1.7/includes/model/woocommerce/settings/class-dhlpwc-model-woocommerce-settings-shipping-method.php

    r3123181 r3141567  
    7171     */
    7272    public function get_admin_options_html() {
    73         return '<div id="dhlpwc_shipping_method_settings">' . parent::get_admin_options_html() . '</div>';
     73        $view = new DHLPWC_Template('admin.settings-container');
     74        return $view->render(array(
     75            'admin_options_html' => parent::get_admin_options_html(),
     76        ), false);
    7477    }
    7578
     
    744747                    'type'        => 'select',
    745748                    'label'       => __('Enable', 'dhlpwc'),
    746                     'description' => __('Show same day as a time window option, not as separate shipping method.', 'dhlpwc'),
    747749                    'options'     => array(
    748750                                        DHLPWC_Model_Service_Delivery_Times::DEFAULT_SELECTION_HOME => 'First option for home delivery (default)',
  • dhlpwc/tags/2.1.7/readme.txt

    r3130949 r3141567  
    55Requires PHP:         5.6
    66Tested up to:         6.6.0
    7 Stable tag:           2.1.6
     7Stable tag:           2.1.7
    88WC requires at least: 3.0.0
    99WC tested up to:      9.0.2
     
    5656
    5757== Changelog ==
     58 
     59= 2.1.7 =
     60- Fixed the Download Label button in the popup shown after creating a label in the HPOS menu
     61- Fixed styling in plugin settings menu and added a loader icon
     62- Removed an incorrect duplicate text in settings menu
    5863 
    5964= 2.1.6 =
  • dhlpwc/trunk/README.md

    r3130949 r3141567  
    11# DHL eCommerce (Benelux) for WooCommerce
     2 
     3v2.1.7
     4## Changes
     5- Fixed the Download Label button in the popup shown after creating a label in the HPOS menu
     6- Fixed styling in plugin settings menu and added a loader icon
     7- Removed an incorrect duplicate text in settings menu
    28 
    39v2.1.6
  • dhlpwc/trunk/assets/css/dhlpwc.admin.css

    r3093985 r3141567  
    229229}
    230230
     231.woocommerce-centered-spinner {
     232    display: flex;
     233    justify-content: center;
     234}
     235
    231236#mainform > #dhlpwc_shipping_method_settings {
     237    visibility: hidden;
    232238    position: relative;
    233239    padding-left: 220px;
     
    241247
    242248#mainform > #dhlpwc_shipping_method_settings > table {
    243     position: relative;
     249    position: absolute;
    244250    top: 0;
    245     left: 0;
    246     width: inherit;
    247     margin-right: -240px;
     251    left: 240px;
    248252    padding: 0 20px;
    249253}
  • dhlpwc/trunk/assets/js/dhlpwc.settings.js

    r3093985 r3141567  
    210210                $(document.body).trigger('dhlpwc:select_settings', [$(this).data('index')]);
    211211            });
    212 
    213             // Select first setting
    214             $(document.body).trigger('dhlpwc:deselect_settings');
    215             $(document.body).trigger('dhlpwc:select_settings', [0]);
    216         });
     212        });
     213        $('#dhlpwc_shipping_method_settings').css('visibility', 'visible');
     214        $('#dhlpwc_shipping_method_settings').parent().find('.woocommerce-centered-spinner').css('display', 'none');
     215
     216        // Select first setting
     217        $(document.body).trigger('dhlpwc:deselect_settings');
     218        $(document.body).trigger('dhlpwc:select_settings', [0]);
    217219
    218220    }).on('dhlpwc:highlight_menu', function(e, index) {
  • dhlpwc/trunk/dhlpwoocommerce.php

    r3130949 r3141567  
    55 * Description:          This is the official DHL eCommerce (Benelux) for WooCommerce plugin.
    66 * Author:               DHL eCommerce
    7  * Version:              2.1.6
     7 * Version:              2.1.7
    88 * Requires at least:    4.7.16
    99 * Tested up to:         6.3
     
    5252
    5353        // Set constants
    54         $this->define('DHLPWC_PLUGIN_VERSION', '2.1.6');
     54        $this->define('DHLPWC_PLUGIN_VERSION', '2.1.7');
    5555        $this->define('DHLPWC_PLUGIN_FILE', __FILE__);
    5656        $this->define('DHLPWC_PLUGIN_BASENAME', plugin_basename(__FILE__));
  • dhlpwc/trunk/includes/controller/admin/class-dhlpwc-controller-admin-order.php

    r3123181 r3141567  
    351351                $links = array();
    352352                $service = DHLPWC_Model_Service_Access_Control::instance();
     353
    353354                if ($created && $download_id) {
    354355                    $order_ids = get_transient('dhlpwc_bulk_download_' . $download_id);
     
    357358                        $order_list = implode(', ', $order_texts);
    358359
     360                        $settings_service = DHLPWC_Model_Service_Settings::instance();
     361                        $hpos_enabled = $settings_service->is_hpos_enabled();
     362                        $nonce = wp_create_nonce('bulk-orders');
     363
    359364                        if ($service->check(DHLPWC_Model_Service_Access_Control::ACCESS_BULK_DOWNLOAD)) {
     365                            $url = admin_url('edit.php?post_type=shop_order&action=dhlpwc_download_labels');
     366                            if ($hpos_enabled) {
     367                                $url = add_query_arg(
     368                                    array(
     369                                        'page' => 'wc-orders',
     370                                        '_wpnonce' => $nonce,
     371                                        'action' => 'dhlpwc_download_labels',
     372                                        // Omitting the id parameter somehow causes a redirect without our action being called
     373                                        'id' => ''
     374                                    ), admin_url('admin.php'));
     375                            }
    360376                            $link = new DHLPWC_Model_Data_Notice_Custom_Links();
    361377                            $link->url = add_query_arg(array(
    362378                                'post' => $order_ids,
    363                             ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_download_labels'));
     379                            ), $url);
    364380                            $link->message = sprintf(_n('%sDownload label%s For order: %s.', '%sDownload labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list);
    365381                            $link->target = '_blank';
     
    368384
    369385                        if ($service->check(DHLPWC_Model_Service_Access_Control::ACCESS_PRINTER)) {
     386                            $url = admin_url('edit.php?post_type=shop_order&action=dhlpwc_print_labels');
     387                            if ($hpos_enabled) {
     388                                $url = add_query_arg(array(
     389                                    'page' => 'wc-orders',
     390                                    '_wpnonce' => $nonce,
     391                                    'action' => 'dhlpwc_print_labels',
     392                                    // Omitting the id parameter somehow causes a redirect without our action being called
     393                                    'id' => ''
     394                                ), admin_url('admin.php'));
     395                            }
     396
    370397                            $link = new DHLPWC_Model_Data_Notice_Custom_Links();
    371398                            $link->url = add_query_arg(array(
    372399                                'post' => $order_ids,
    373                             ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_print_labels'));
     400                            ), $url);
    374401                            $link->message = sprintf(_n('%sPrint label%s For order: %s.', '%sPrint labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list);
    375402                            $link->target = '_self';
  • dhlpwc/trunk/includes/controller/admin/class-dhlpwc-controller-admin-settings.php

    r3130949 r3141567  
    372372            strpos($checkoutContent->post_content, 'wp:dhlpwc/dhlpwc-block') === false &&
    373373            strpos($checkoutContent->post_content, 'wp:woocommerce/checkout') !== false) {
    374             $messages[] = sprintf(__('You are currently missing DHL shipping elements in your checkout. You can fix this by simply going to the edit page of your checkout page and hit the update button.'));
     374            $messages[] = __('You are currently missing DHL shipping elements in your checkout. You can fix this by simply going to the edit page of your checkout page and hit the update button.');
    375375
    376376            $this->show_notice(self::NOTICE_TAG_GUTENBERG_BLOCKS, $messages, admin_url('post.php?post=' . $id . '&action=edit'), self::NOTICE_TAG_GUTENBERG_BLOCKS_FOREVER);
  • dhlpwc/trunk/includes/model/woocommerce/settings/class-dhlpwc-model-woocommerce-settings-shipping-method.php

    r3123181 r3141567  
    7171     */
    7272    public function get_admin_options_html() {
    73         return '<div id="dhlpwc_shipping_method_settings">' . parent::get_admin_options_html() . '</div>';
     73        $view = new DHLPWC_Template('admin.settings-container');
     74        return $view->render(array(
     75            'admin_options_html' => parent::get_admin_options_html(),
     76        ), false);
    7477    }
    7578
     
    744747                    'type'        => 'select',
    745748                    'label'       => __('Enable', 'dhlpwc'),
    746                     'description' => __('Show same day as a time window option, not as separate shipping method.', 'dhlpwc'),
    747749                    'options'     => array(
    748750                                        DHLPWC_Model_Service_Delivery_Times::DEFAULT_SELECTION_HOME => 'First option for home delivery (default)',
  • dhlpwc/trunk/readme.txt

    r3130949 r3141567  
    55Requires PHP:         5.6
    66Tested up to:         6.6.0
    7 Stable tag:           2.1.6
     7Stable tag:           2.1.7
    88WC requires at least: 3.0.0
    99WC tested up to:      9.0.2
     
    5656
    5757== Changelog ==
     58 
     59= 2.1.7 =
     60- Fixed the Download Label button in the popup shown after creating a label in the HPOS menu
     61- Fixed styling in plugin settings menu and added a loader icon
     62- Removed an incorrect duplicate text in settings menu
    5863 
    5964= 2.1.6 =
Note: See TracChangeset for help on using the changeset viewer.