Changeset 3141567
- Timestamp:
- 08/26/2024 10:15:12 AM (19 months ago)
- Location:
- dhlpwc
- Files:
-
- 2 added
- 16 edited
- 1 copied
-
tags/2.1.7 (copied) (copied from dhlpwc/trunk)
-
tags/2.1.7/README.md (modified) (1 diff)
-
tags/2.1.7/assets/css/dhlpwc.admin.css (modified) (2 diffs)
-
tags/2.1.7/assets/js/dhlpwc.settings.js (modified) (1 diff)
-
tags/2.1.7/dhlpwoocommerce.php (modified) (2 diffs)
-
tags/2.1.7/includes/controller/admin/class-dhlpwc-controller-admin-order.php (modified) (3 diffs)
-
tags/2.1.7/includes/controller/admin/class-dhlpwc-controller-admin-settings.php (modified) (1 diff)
-
tags/2.1.7/includes/model/woocommerce/settings/class-dhlpwc-model-woocommerce-settings-shipping-method.php (modified) (2 diffs)
-
tags/2.1.7/includes/view/admin/settings-container.php (added)
-
tags/2.1.7/readme.txt (modified) (2 diffs)
-
trunk/README.md (modified) (1 diff)
-
trunk/assets/css/dhlpwc.admin.css (modified) (2 diffs)
-
trunk/assets/js/dhlpwc.settings.js (modified) (1 diff)
-
trunk/dhlpwoocommerce.php (modified) (2 diffs)
-
trunk/includes/controller/admin/class-dhlpwc-controller-admin-order.php (modified) (3 diffs)
-
trunk/includes/controller/admin/class-dhlpwc-controller-admin-settings.php (modified) (1 diff)
-
trunk/includes/model/woocommerce/settings/class-dhlpwc-model-woocommerce-settings-shipping-method.php (modified) (2 diffs)
-
trunk/includes/view/admin/settings-container.php (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dhlpwc/tags/2.1.7/README.md
r3130949 r3141567 1 1 # DHL eCommerce (Benelux) for WooCommerce 2 3 v2.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 2 8 3 9 v2.1.6 -
dhlpwc/tags/2.1.7/assets/css/dhlpwc.admin.css
r3093985 r3141567 229 229 } 230 230 231 .woocommerce-centered-spinner { 232 display: flex; 233 justify-content: center; 234 } 235 231 236 #mainform > #dhlpwc_shipping_method_settings { 237 visibility: hidden; 232 238 position: relative; 233 239 padding-left: 220px; … … 241 247 242 248 #mainform > #dhlpwc_shipping_method_settings > table { 243 position: relative;249 position: absolute; 244 250 top: 0; 245 left: 0; 246 width: inherit; 247 margin-right: -240px; 251 left: 240px; 248 252 padding: 0 20px; 249 253 } -
dhlpwc/tags/2.1.7/assets/js/dhlpwc.settings.js
r3093985 r3141567 210 210 $(document.body).trigger('dhlpwc:select_settings', [$(this).data('index')]); 211 211 }); 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]); 217 219 218 220 }).on('dhlpwc:highlight_menu', function(e, index) { -
dhlpwc/tags/2.1.7/dhlpwoocommerce.php
r3130949 r3141567 5 5 * Description: This is the official DHL eCommerce (Benelux) for WooCommerce plugin. 6 6 * Author: DHL eCommerce 7 * Version: 2.1. 67 * Version: 2.1.7 8 8 * Requires at least: 4.7.16 9 9 * Tested up to: 6.3 … … 52 52 53 53 // Set constants 54 $this->define('DHLPWC_PLUGIN_VERSION', '2.1. 6');54 $this->define('DHLPWC_PLUGIN_VERSION', '2.1.7'); 55 55 $this->define('DHLPWC_PLUGIN_FILE', __FILE__); 56 56 $this->define('DHLPWC_PLUGIN_BASENAME', plugin_basename(__FILE__)); -
dhlpwc/tags/2.1.7/includes/controller/admin/class-dhlpwc-controller-admin-order.php
r3123181 r3141567 351 351 $links = array(); 352 352 $service = DHLPWC_Model_Service_Access_Control::instance(); 353 353 354 if ($created && $download_id) { 354 355 $order_ids = get_transient('dhlpwc_bulk_download_' . $download_id); … … 357 358 $order_list = implode(', ', $order_texts); 358 359 360 $settings_service = DHLPWC_Model_Service_Settings::instance(); 361 $hpos_enabled = $settings_service->is_hpos_enabled(); 362 $nonce = wp_create_nonce('bulk-orders'); 363 359 364 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 } 360 376 $link = new DHLPWC_Model_Data_Notice_Custom_Links(); 361 377 $link->url = add_query_arg(array( 362 378 'post' => $order_ids, 363 ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_download_labels'));379 ), $url); 364 380 $link->message = sprintf(_n('%sDownload label%s For order: %s.', '%sDownload labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list); 365 381 $link->target = '_blank'; … … 368 384 369 385 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 370 397 $link = new DHLPWC_Model_Data_Notice_Custom_Links(); 371 398 $link->url = add_query_arg(array( 372 399 'post' => $order_ids, 373 ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_print_labels'));400 ), $url); 374 401 $link->message = sprintf(_n('%sPrint label%s For order: %s.', '%sPrint labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list); 375 402 $link->target = '_self'; -
dhlpwc/tags/2.1.7/includes/controller/admin/class-dhlpwc-controller-admin-settings.php
r3130949 r3141567 372 372 strpos($checkoutContent->post_content, 'wp:dhlpwc/dhlpwc-block') === false && 373 373 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.'); 375 375 376 376 $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 71 71 */ 72 72 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); 74 77 } 75 78 … … 744 747 'type' => 'select', 745 748 'label' => __('Enable', 'dhlpwc'), 746 'description' => __('Show same day as a time window option, not as separate shipping method.', 'dhlpwc'),747 749 'options' => array( 748 750 DHLPWC_Model_Service_Delivery_Times::DEFAULT_SELECTION_HOME => 'First option for home delivery (default)', -
dhlpwc/tags/2.1.7/readme.txt
r3130949 r3141567 5 5 Requires PHP: 5.6 6 6 Tested up to: 6.6.0 7 Stable tag: 2.1. 67 Stable tag: 2.1.7 8 8 WC requires at least: 3.0.0 9 9 WC tested up to: 9.0.2 … … 56 56 57 57 == 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 58 63 59 64 = 2.1.6 = -
dhlpwc/trunk/README.md
r3130949 r3141567 1 1 # DHL eCommerce (Benelux) for WooCommerce 2 3 v2.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 2 8 3 9 v2.1.6 -
dhlpwc/trunk/assets/css/dhlpwc.admin.css
r3093985 r3141567 229 229 } 230 230 231 .woocommerce-centered-spinner { 232 display: flex; 233 justify-content: center; 234 } 235 231 236 #mainform > #dhlpwc_shipping_method_settings { 237 visibility: hidden; 232 238 position: relative; 233 239 padding-left: 220px; … … 241 247 242 248 #mainform > #dhlpwc_shipping_method_settings > table { 243 position: relative;249 position: absolute; 244 250 top: 0; 245 left: 0; 246 width: inherit; 247 margin-right: -240px; 251 left: 240px; 248 252 padding: 0 20px; 249 253 } -
dhlpwc/trunk/assets/js/dhlpwc.settings.js
r3093985 r3141567 210 210 $(document.body).trigger('dhlpwc:select_settings', [$(this).data('index')]); 211 211 }); 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]); 217 219 218 220 }).on('dhlpwc:highlight_menu', function(e, index) { -
dhlpwc/trunk/dhlpwoocommerce.php
r3130949 r3141567 5 5 * Description: This is the official DHL eCommerce (Benelux) for WooCommerce plugin. 6 6 * Author: DHL eCommerce 7 * Version: 2.1. 67 * Version: 2.1.7 8 8 * Requires at least: 4.7.16 9 9 * Tested up to: 6.3 … … 52 52 53 53 // Set constants 54 $this->define('DHLPWC_PLUGIN_VERSION', '2.1. 6');54 $this->define('DHLPWC_PLUGIN_VERSION', '2.1.7'); 55 55 $this->define('DHLPWC_PLUGIN_FILE', __FILE__); 56 56 $this->define('DHLPWC_PLUGIN_BASENAME', plugin_basename(__FILE__)); -
dhlpwc/trunk/includes/controller/admin/class-dhlpwc-controller-admin-order.php
r3123181 r3141567 351 351 $links = array(); 352 352 $service = DHLPWC_Model_Service_Access_Control::instance(); 353 353 354 if ($created && $download_id) { 354 355 $order_ids = get_transient('dhlpwc_bulk_download_' . $download_id); … … 357 358 $order_list = implode(', ', $order_texts); 358 359 360 $settings_service = DHLPWC_Model_Service_Settings::instance(); 361 $hpos_enabled = $settings_service->is_hpos_enabled(); 362 $nonce = wp_create_nonce('bulk-orders'); 363 359 364 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 } 360 376 $link = new DHLPWC_Model_Data_Notice_Custom_Links(); 361 377 $link->url = add_query_arg(array( 362 378 'post' => $order_ids, 363 ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_download_labels'));379 ), $url); 364 380 $link->message = sprintf(_n('%sDownload label%s For order: %s.', '%sDownload labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list); 365 381 $link->target = '_blank'; … … 368 384 369 385 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 370 397 $link = new DHLPWC_Model_Data_Notice_Custom_Links(); 371 398 $link->url = add_query_arg(array( 372 399 'post' => $order_ids, 373 ), admin_url('edit.php?post_type=shop_order&action=dhlpwc_print_labels'));400 ), $url); 374 401 $link->message = sprintf(_n('%sPrint label%s For order: %s.', '%sPrint labels%s For orders: %s.', count($order_ids), 'dhlpwc'), '%s', '%s', $order_list); 375 402 $link->target = '_self'; -
dhlpwc/trunk/includes/controller/admin/class-dhlpwc-controller-admin-settings.php
r3130949 r3141567 372 372 strpos($checkoutContent->post_content, 'wp:dhlpwc/dhlpwc-block') === false && 373 373 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.'); 375 375 376 376 $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 71 71 */ 72 72 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); 74 77 } 75 78 … … 744 747 'type' => 'select', 745 748 'label' => __('Enable', 'dhlpwc'), 746 'description' => __('Show same day as a time window option, not as separate shipping method.', 'dhlpwc'),747 749 'options' => array( 748 750 DHLPWC_Model_Service_Delivery_Times::DEFAULT_SELECTION_HOME => 'First option for home delivery (default)', -
dhlpwc/trunk/readme.txt
r3130949 r3141567 5 5 Requires PHP: 5.6 6 6 Tested up to: 6.6.0 7 Stable tag: 2.1. 67 Stable tag: 2.1.7 8 8 WC requires at least: 3.0.0 9 9 WC tested up to: 9.0.2 … … 56 56 57 57 == 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 58 63 59 64 = 2.1.6 =
Note: See TracChangeset
for help on using the changeset viewer.