Changeset 2826503
- Timestamp:
- 11/30/2022 01:21:15 PM (3 years ago)
- Location:
- posturinn
- Files:
-
- 1 deleted
- 5 edited
- 19 copied
-
tags/1.1.3 (copied) (copied from posturinn/trunk)
-
tags/1.1.3/css/postis-admin-order.css (copied) (copied from posturinn/trunk/css/postis-admin-order.css)
-
tags/1.1.3/css/remodal-default-theme.css (copied) (copied from posturinn/trunk/css/remodal-default-theme.css)
-
tags/1.1.3/css/remodal.css (copied) (copied from posturinn/trunk/css/remodal.css)
-
tags/1.1.3/inc/admin.class.php (copied) (copied from posturinn/trunk/inc/admin.class.php)
-
tags/1.1.3/inc/api.class.php (copied) (copied from posturinn/trunk/inc/api.class.php) (2 diffs)
-
tags/1.1.3/inc/callbacks.php (deleted)
-
tags/1.1.3/inc/checkout-fields.class.php (copied) (copied from posturinn/trunk/inc/checkout-fields.class.php)
-
tags/1.1.3/inc/functions.php (copied) (copied from posturinn/trunk/inc/functions.php) (4 diffs)
-
tags/1.1.3/inc/hooks.php (copied) (copied from posturinn/trunk/inc/hooks.php)
-
tags/1.1.3/inc/postis.class.php (copied) (copied from posturinn/trunk/inc/postis.class.php) (2 diffs)
-
tags/1.1.3/js/postis-admin-order.js (copied) (copied from posturinn/trunk/js/postis-admin-order.js)
-
tags/1.1.3/js/postis-googlemap.js (copied) (copied from posturinn/trunk/js/postis-googlemap.js)
-
tags/1.1.3/js/remodal.js (copied) (copied from posturinn/trunk/js/remodal.js)
-
tags/1.1.3/languages/postis-is_IS.mo (copied) (copied from posturinn/trunk/languages/postis-is_IS.mo)
-
tags/1.1.3/languages/postis-is_IS.po (copied) (copied from posturinn/trunk/languages/postis-is_IS.po)
-
tags/1.1.3/languages/postis.pot (copied) (copied from posturinn/trunk/languages/postis.pot)
-
tags/1.1.3/readme.txt (copied) (copied from posturinn/trunk/readme.txt) (2 diffs)
-
tags/1.1.3/templates/shipment-options.php (copied) (copied from posturinn/trunk/templates/shipment-options.php)
-
tags/1.1.3/wc-posturinn-shipping-api.php (copied) (copied from posturinn/trunk/wc-posturinn-shipping-api.php) (1 diff)
-
trunk/inc/api.class.php (modified) (2 diffs)
-
trunk/inc/functions.php (modified) (4 diffs)
-
trunk/inc/postis.class.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wc-posturinn-shipping-api.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
posturinn/tags/1.1.3/inc/api.class.php
r2798328 r2826503 128 128 129 129 $valid_phonenumber = isset($postmeta['phonenumber']) && $postmeta['phonenumber'] != '' ? wc_sanitize_phone_number( $postmeta['phonenumber'] ): $customer_phone; 130 130 $valid_phonenumber = str_replace('+354','',$valid_phonenumber); 131 131 if ( isset($dynamic_opt_control['cod']) && $dynamic_opt_control['cod'] ) { 132 132 $order_total = $order->get_total(); … … 201 201 }else{ 202 202 if ($shipping_service == 'DPP' OR $shipping_service == 'DPH') { 203 if (substr($ customer_phone, 0, 1) === '6' || substr($customer_phone, 0, 1) === '7' || substr($customer_phone, 0, 1) === '8') {203 if (substr($valid_phonenumber, 0, 1) === '6' || substr($valid_phonenumber, 0, 1) === '7' || substr($valid_phonenumber, 0, 1) === '8') { 204 204 // phoneNumber is valid 205 205 } else { -
posturinn/tags/1.1.3/inc/functions.php
r2682817 r2826503 44 44 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 45 45 // vesion less then 2.7 46 return $product -> weight;46 return (float)$product -> weight; 47 47 } else { 48 return $product -> get_weight();48 return (float)$product -> get_weight(); 49 49 } 50 50 } … … 56 56 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 57 57 // vesion less then 2.7 58 return $product -> width;58 return (int)$product -> width; 59 59 } else { 60 return $product -> get_width();60 return (int)$product -> get_width(); 61 61 } 62 62 } … … 68 68 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 69 69 // vesion less then 2.7 70 return $product -> height;70 return (int)$product -> height; 71 71 } else { 72 return $product -> get_height();72 return (int)$product -> get_height(); 73 73 } 74 74 } … … 80 80 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 81 81 // vesion less then 2.7 82 return $product -> length;82 return (int)$product -> length; 83 83 } else { 84 return $product -> get_length();84 return (int)$product -> get_length(); 85 85 } 86 86 } -
posturinn/tags/1.1.3/inc/postis.class.php
r2798328 r2826503 161 161 'desc_tip' => true, 162 162 ), 163 'lang_switcher' => array( 164 'title' => __( 'Shipping method language', 'postis' ), 165 'type' => 'select', 166 'options' => array( 'default' => 'System default', 167 'is' => 'Icelandic', 168 'en' => 'English' 169 ), 170 'default' => 'default', 171 'description' => __( 'Select language for shipping method titles in cart and checkout. If system default is chosen then it will show user locale.', 'postis' ), 172 'desc_tip' => true, 173 ), 163 174 'postis_services_table' => array( 164 175 'type' => 'postis_services_table' … … 399 410 } else { 400 411 $locale_api_lang = 'en'; 412 } 413 $lang_switcher = postis_get_settings( 'lang_switcher' ); 414 if (isset($lang_switcher) && $lang_switcher !== '' && $lang_switcher !== 'default') { 415 $locale_api_lang = $lang_switcher; 401 416 } 402 417 -
posturinn/tags/1.1.3/readme.txt
r2798328 r2826503 3 3 Tags: shipping, posturinn, icelandic post shipping, shipping rates, woocommerce 4 4 Requires at least: 4.3 5 Tested up to: 6. 0.25 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 7 Stable tag: trunk … … 26 26 27 27 == Changelog == 28 = 1.1.3 = 29 fixed country code on receipient phone number 30 fixed int and floats in weight and size 31 added language switcher 32 28 33 = 1.1.2 = 29 34 add option to remove tariff line item in international shipping -
posturinn/tags/1.1.3/wc-posturinn-shipping-api.php
r2798328 r2826503 3 3 * Plugin Name: Pósturinn's Shipping with WooCommerce 4 4 * Description: This plugin is an WooCommerce extension to extend shipping method with Pósturinn's - Iceland 5 * Version: 1.1. 25 * Version: 1.1.3 6 6 * Author: Pósturinn 7 7 * Author URI: https://postur.is -
posturinn/trunk/inc/api.class.php
r2798328 r2826503 128 128 129 129 $valid_phonenumber = isset($postmeta['phonenumber']) && $postmeta['phonenumber'] != '' ? wc_sanitize_phone_number( $postmeta['phonenumber'] ): $customer_phone; 130 130 $valid_phonenumber = str_replace('+354','',$valid_phonenumber); 131 131 if ( isset($dynamic_opt_control['cod']) && $dynamic_opt_control['cod'] ) { 132 132 $order_total = $order->get_total(); … … 201 201 }else{ 202 202 if ($shipping_service == 'DPP' OR $shipping_service == 'DPH') { 203 if (substr($ customer_phone, 0, 1) === '6' || substr($customer_phone, 0, 1) === '7' || substr($customer_phone, 0, 1) === '8') {203 if (substr($valid_phonenumber, 0, 1) === '6' || substr($valid_phonenumber, 0, 1) === '7' || substr($valid_phonenumber, 0, 1) === '8') { 204 204 // phoneNumber is valid 205 205 } else { -
posturinn/trunk/inc/functions.php
r2682817 r2826503 44 44 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 45 45 // vesion less then 2.7 46 return $product -> weight;46 return (float)$product -> weight; 47 47 } else { 48 return $product -> get_weight();48 return (float)$product -> get_weight(); 49 49 } 50 50 } … … 56 56 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 57 57 // vesion less then 2.7 58 return $product -> width;58 return (int)$product -> width; 59 59 } else { 60 return $product -> get_width();60 return (int)$product -> get_width(); 61 61 } 62 62 } … … 68 68 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 69 69 // vesion less then 2.7 70 return $product -> height;70 return (int)$product -> height; 71 71 } else { 72 return $product -> get_height();72 return (int)$product -> get_height(); 73 73 } 74 74 } … … 80 80 if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 81 81 // vesion less then 2.7 82 return $product -> length;82 return (int)$product -> length; 83 83 } else { 84 return $product -> get_length();84 return (int)$product -> get_length(); 85 85 } 86 86 } -
posturinn/trunk/inc/postis.class.php
r2798328 r2826503 161 161 'desc_tip' => true, 162 162 ), 163 'lang_switcher' => array( 164 'title' => __( 'Shipping method language', 'postis' ), 165 'type' => 'select', 166 'options' => array( 'default' => 'System default', 167 'is' => 'Icelandic', 168 'en' => 'English' 169 ), 170 'default' => 'default', 171 'description' => __( 'Select language for shipping method titles in cart and checkout. If system default is chosen then it will show user locale.', 'postis' ), 172 'desc_tip' => true, 173 ), 163 174 'postis_services_table' => array( 164 175 'type' => 'postis_services_table' … … 399 410 } else { 400 411 $locale_api_lang = 'en'; 412 } 413 $lang_switcher = postis_get_settings( 'lang_switcher' ); 414 if (isset($lang_switcher) && $lang_switcher !== '' && $lang_switcher !== 'default') { 415 $locale_api_lang = $lang_switcher; 401 416 } 402 417 -
posturinn/trunk/readme.txt
r2798328 r2826503 3 3 Tags: shipping, posturinn, icelandic post shipping, shipping rates, woocommerce 4 4 Requires at least: 4.3 5 Tested up to: 6. 0.25 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 7 Stable tag: trunk … … 26 26 27 27 == Changelog == 28 = 1.1.3 = 29 fixed country code on receipient phone number 30 fixed int and floats in weight and size 31 added language switcher 32 28 33 = 1.1.2 = 29 34 add option to remove tariff line item in international shipping -
posturinn/trunk/wc-posturinn-shipping-api.php
r2798328 r2826503 3 3 * Plugin Name: Pósturinn's Shipping with WooCommerce 4 4 * Description: This plugin is an WooCommerce extension to extend shipping method with Pósturinn's - Iceland 5 * Version: 1.1. 25 * Version: 1.1.3 6 6 * Author: Pósturinn 7 7 * Author URI: https://postur.is
Note: See TracChangeset
for help on using the changeset viewer.