Changeset 3044915
- Timestamp:
- 03/04/2024 10:37:48 AM (2 years ago)
- Location:
- posti-warehouse
- Files:
-
- 16 edited
- 1 copied
-
tags/2.5.0 (copied) (copied from posti-warehouse/trunk)
-
tags/2.5.0/README.md (modified) (2 diffs)
-
tags/2.5.0/classes/class-api.php (modified) (1 diff)
-
tags/2.5.0/classes/class-frontend.php (modified) (1 diff)
-
tags/2.5.0/classes/class-settings.php (modified) (1 diff)
-
tags/2.5.0/classes/class-shipping.php (modified) (2 diffs)
-
tags/2.5.0/classes/class-text.php (modified) (1 diff)
-
tags/2.5.0/posti-warehouse.php (modified) (1 diff)
-
tags/2.5.0/readme.txt (modified) (1 diff)
-
trunk/README.md (modified) (2 diffs)
-
trunk/classes/class-api.php (modified) (1 diff)
-
trunk/classes/class-frontend.php (modified) (1 diff)
-
trunk/classes/class-settings.php (modified) (1 diff)
-
trunk/classes/class-shipping.php (modified) (2 diffs)
-
trunk/classes/class-text.php (modified) (1 diff)
-
trunk/posti-warehouse.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
posti-warehouse/tags/2.5.0/README.md
r3037923 r3044915 97 97 98 98 ## Version history 99 - 2.5.0: 100 - Changed "Hide outdoor pickup points" option to support non-Posti pickup points. 101 - Changed sorting in "Posti warehouse" to prefer Posti services. 102 - Removed "Other" pickup point option. 103 - "Verbose logging" setting moved to developer view. 99 104 - 2.4.7: Changed product handling to strip HTML tags when sending product to warehouse. 100 105 - 2.4.6: … … 111 116 - Changed number of log entries 50 -> 100. 112 117 - 2.3.6: Support email update. WP banner update. 113 - 2.3.4: Remove contract number field from settings page.118 - 2.3.4: Removed contract number field from settings page. 114 119 - 2.3.3: Bug fix: Settings link not shown when plugin is installed from shop. 115 120 - 2.3.2: Limit "Hide outdoor pickup points" option to Posti pickup points. -
posti-warehouse/tags/2.5.0/classes/class-api.php
r3037923 r3044915 14 14 private $last_status = false; 15 15 private $token_option = 'posti_wh_api_auth'; 16 private $user_agent = 'woo-wh-client/2. 4.7';16 private $user_agent = 'woo-wh-client/2.5.0'; 17 17 18 18 public function __construct(Posti_Warehouse_Logger $logger, array &$options) { -
posti-warehouse/tags/2.5.0/classes/class-frontend.php
r3031993 r3044915 552 552 } 553 553 554 $options_array['other'] = array(555 'text' => Posti_Warehouse_Text::pickup_point_other(),556 );557 558 554 return $options_array; 559 555 } -
posti-warehouse/tags/2.5.0/classes/class-settings.php
r3037801 r3044915 321 321 [ 322 322 'label_for' => 'posti_wh_field_verbose_logging', 323 'class' => 'posti_wh_row',323 'class' => $developer_fields_class, 324 324 'posti_wh_custom_data' => 'custom', 325 325 ] -
posti-warehouse/tags/2.5.0/classes/class-shipping.php
r3031993 r3044915 217 217 <?php echo esc_html(Posti_Warehouse_Text::pickup_points_title()); ?> 218 218 </label> 219 <?php if (substr($service_name, 0, strlen('Posti:')) === 'Posti:'): ?> 220 <div id="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints][options]'; ?>"> 221 <label> - 222 <input type="checkbox" 223 name="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints_hideoutdoors]'; ?>" 224 value="yes" <?php echo ( ( !empty($values[$method_id][$service_id]['pickuppoints_hideoutdoors']) && 'yes' === $values[$method_id][$service_id]['pickuppoints_hideoutdoors'] )) ? 'checked' : ''; ?>> 225 <?php echo esc_html(Posti_Warehouse_Text::pickup_points_hide_outdoor()); ?> 226 </label> 227 </div> 228 <?php endif; ?> 219 <div id="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints][options]'; ?>"> 220 <label> - 221 <input type="checkbox" 222 name="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints_hideoutdoors]'; ?>" 223 value="yes" <?php echo ( ( !empty($values[$method_id][$service_id]['pickuppoints_hideoutdoors']) && 'yes' === $values[$method_id][$service_id]['pickuppoints_hideoutdoors'] )) ? 'checked' : ''; ?>> 224 <?php echo esc_html(Posti_Warehouse_Text::pickup_points_hide_outdoor()); ?> 225 </label> 226 </div> 229 227 </p> 230 228 </div> … … 294 292 foreach ($all_shipping_methods as $shipping_method) { 295 293 $value = isset($shipping_method->description[$user_lang]) ? $shipping_method->description[$user_lang] : $shipping_method->description['en']; 296 $services[strval($shipping_method->id)] = sprintf('%1$s: %2$s', $shipping_method->deliveryOperator, $value); // note: condition on $service_name starting with 'Posti:' 297 } 298 299 ksort($services); 294 $services[strval($shipping_method->id)] = sprintf('%1$s: %2$s', $shipping_method->deliveryOperator, $value); 295 } 296 297 uasort($services, function ($a, $b) { 298 $pa = substr($a, 0, 6) === 'Posti:'; 299 $ba = substr($b, 0, 6) === 'Posti:'; 300 if ($pa && $ba) { 301 return strnatcmp($a, $b); 302 } 303 elseif ($pa) { 304 return -1; 305 } 306 elseif ($ba) { 307 return 1; 308 } 309 310 return strnatcmp($a, $b); 311 }); 300 312 301 313 return $services; -
posti-warehouse/tags/2.5.0/classes/class-text.php
r3035680 r3044915 47 47 public static function pickup_point_select() { 48 48 return __('Select a pickup point', 'posti-warehouse'); 49 }50 51 public static function pickup_point_other() {52 return __('Other', 'posti-warehouse');53 49 } 54 50 -
posti-warehouse/tags/2.5.0/posti-warehouse.php
r3037923 r3044915 3 3 /** 4 4 * Plugin Name: Posti Warehouse 5 * Version: 2. 4.75 * Version: 2.5.0 6 6 * Description: Provides integration to Posti warehouse and dropshipping services. 7 7 * Author: Posti -
posti-warehouse/tags/2.5.0/readme.txt
r3037923 r3044915 5 5 Tested up to: 6.4.3 6 6 Requires PHP: 7.1 7 Stable tag: 2. 4.77 Stable tag: 2.5.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
posti-warehouse/trunk/README.md
r3037923 r3044915 97 97 98 98 ## Version history 99 - 2.5.0: 100 - Changed "Hide outdoor pickup points" option to support non-Posti pickup points. 101 - Changed sorting in "Posti warehouse" to prefer Posti services. 102 - Removed "Other" pickup point option. 103 - "Verbose logging" setting moved to developer view. 99 104 - 2.4.7: Changed product handling to strip HTML tags when sending product to warehouse. 100 105 - 2.4.6: … … 111 116 - Changed number of log entries 50 -> 100. 112 117 - 2.3.6: Support email update. WP banner update. 113 - 2.3.4: Remove contract number field from settings page.118 - 2.3.4: Removed contract number field from settings page. 114 119 - 2.3.3: Bug fix: Settings link not shown when plugin is installed from shop. 115 120 - 2.3.2: Limit "Hide outdoor pickup points" option to Posti pickup points. -
posti-warehouse/trunk/classes/class-api.php
r3037923 r3044915 14 14 private $last_status = false; 15 15 private $token_option = 'posti_wh_api_auth'; 16 private $user_agent = 'woo-wh-client/2. 4.7';16 private $user_agent = 'woo-wh-client/2.5.0'; 17 17 18 18 public function __construct(Posti_Warehouse_Logger $logger, array &$options) { -
posti-warehouse/trunk/classes/class-frontend.php
r3031993 r3044915 552 552 } 553 553 554 $options_array['other'] = array(555 'text' => Posti_Warehouse_Text::pickup_point_other(),556 );557 558 554 return $options_array; 559 555 } -
posti-warehouse/trunk/classes/class-settings.php
r3037801 r3044915 321 321 [ 322 322 'label_for' => 'posti_wh_field_verbose_logging', 323 'class' => 'posti_wh_row',323 'class' => $developer_fields_class, 324 324 'posti_wh_custom_data' => 'custom', 325 325 ] -
posti-warehouse/trunk/classes/class-shipping.php
r3031993 r3044915 217 217 <?php echo esc_html(Posti_Warehouse_Text::pickup_points_title()); ?> 218 218 </label> 219 <?php if (substr($service_name, 0, strlen('Posti:')) === 'Posti:'): ?> 220 <div id="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints][options]'; ?>"> 221 <label> - 222 <input type="checkbox" 223 name="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints_hideoutdoors]'; ?>" 224 value="yes" <?php echo ( ( !empty($values[$method_id][$service_id]['pickuppoints_hideoutdoors']) && 'yes' === $values[$method_id][$service_id]['pickuppoints_hideoutdoors'] )) ? 'checked' : ''; ?>> 225 <?php echo esc_html(Posti_Warehouse_Text::pickup_points_hide_outdoor()); ?> 226 </label> 227 </div> 228 <?php endif; ?> 219 <div id="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints][options]'; ?>"> 220 <label> - 221 <input type="checkbox" 222 name="<?php echo esc_html($field_key) . '[' . esc_attr($method_id) . '][' . esc_attr($service_id) . '][pickuppoints_hideoutdoors]'; ?>" 223 value="yes" <?php echo ( ( !empty($values[$method_id][$service_id]['pickuppoints_hideoutdoors']) && 'yes' === $values[$method_id][$service_id]['pickuppoints_hideoutdoors'] )) ? 'checked' : ''; ?>> 224 <?php echo esc_html(Posti_Warehouse_Text::pickup_points_hide_outdoor()); ?> 225 </label> 226 </div> 229 227 </p> 230 228 </div> … … 294 292 foreach ($all_shipping_methods as $shipping_method) { 295 293 $value = isset($shipping_method->description[$user_lang]) ? $shipping_method->description[$user_lang] : $shipping_method->description['en']; 296 $services[strval($shipping_method->id)] = sprintf('%1$s: %2$s', $shipping_method->deliveryOperator, $value); // note: condition on $service_name starting with 'Posti:' 297 } 298 299 ksort($services); 294 $services[strval($shipping_method->id)] = sprintf('%1$s: %2$s', $shipping_method->deliveryOperator, $value); 295 } 296 297 uasort($services, function ($a, $b) { 298 $pa = substr($a, 0, 6) === 'Posti:'; 299 $ba = substr($b, 0, 6) === 'Posti:'; 300 if ($pa && $ba) { 301 return strnatcmp($a, $b); 302 } 303 elseif ($pa) { 304 return -1; 305 } 306 elseif ($ba) { 307 return 1; 308 } 309 310 return strnatcmp($a, $b); 311 }); 300 312 301 313 return $services; -
posti-warehouse/trunk/classes/class-text.php
r3035680 r3044915 47 47 public static function pickup_point_select() { 48 48 return __('Select a pickup point', 'posti-warehouse'); 49 }50 51 public static function pickup_point_other() {52 return __('Other', 'posti-warehouse');53 49 } 54 50 -
posti-warehouse/trunk/posti-warehouse.php
r3037923 r3044915 3 3 /** 4 4 * Plugin Name: Posti Warehouse 5 * Version: 2. 4.75 * Version: 2.5.0 6 6 * Description: Provides integration to Posti warehouse and dropshipping services. 7 7 * Author: Posti -
posti-warehouse/trunk/readme.txt
r3037923 r3044915 5 5 Tested up to: 6.4.3 6 6 Requires PHP: 7.1 7 Stable tag: 2. 4.77 Stable tag: 2.5.0 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset
for help on using the changeset viewer.