Plugin Directory

Changeset 2826503


Ignore:
Timestamp:
11/30/2022 01:21:15 PM (3 years ago)
Author:
posturinn
Message:

Tagging version 1.1.3

Location:
posturinn
Files:
1 deleted
5 edited
19 copied

Legend:

Unmodified
Added
Removed
  • posturinn/tags/1.1.3/inc/api.class.php

    r2798328 r2826503  
    128128       
    129129        $valid_phonenumber     = isset($postmeta['phonenumber']) && $postmeta['phonenumber'] != '' ? wc_sanitize_phone_number( $postmeta['phonenumber'] ): $customer_phone;
    130        
     130        $valid_phonenumber = str_replace('+354','',$valid_phonenumber);
    131131        if ( isset($dynamic_opt_control['cod']) && $dynamic_opt_control['cod'] ) {
    132132            $order_total = $order->get_total();
     
    201201        }else{
    202202            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') {
    204204                    // phoneNumber is valid
    205205                } else {
  • posturinn/tags/1.1.3/inc/functions.php

    r2682817 r2826503  
    4444    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    4545        // vesion less then 2.7
    46         return $product -> weight;
     46        return (float)$product -> weight;
    4747    } else {
    48         return $product -> get_weight();
     48        return (float)$product -> get_weight();
    4949    }
    5050}
     
    5656    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    5757        // vesion less then 2.7
    58         return $product -> width;
     58        return (int)$product -> width;
    5959    } else {
    60         return $product -> get_width();
     60        return (int)$product -> get_width();
    6161    }
    6262}
     
    6868    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    6969        // vesion less then 2.7
    70         return $product -> height;
     70        return (int)$product -> height;
    7171    } else {
    72         return $product -> get_height();
     72        return (int)$product -> get_height();
    7373    }
    7474}
     
    8080    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    8181        // vesion less then 2.7
    82         return $product -> length;
     82        return (int)$product -> length;
    8383    } else {
    84         return $product -> get_length();
     84        return (int)$product -> get_length();
    8585    }
    8686}
  • posturinn/tags/1.1.3/inc/postis.class.php

    r2798328 r2826503  
    161161                        'desc_tip'      => true,
    162162                    ),
     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                    ),
    163174                    'postis_services_table' => array(
    164175                        'type'              => 'postis_services_table'
     
    399410            } else {
    400411                $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;
    401416            }
    402417
  • posturinn/tags/1.1.3/readme.txt

    r2798328 r2826503  
    33Tags: shipping, posturinn, icelandic post shipping, shipping rates, woocommerce
    44Requires at least: 4.3
    5 Tested up to: 6.0.2
     5Tested up to: 6.1.1
    66Requires PHP: 5.6
    77Stable tag: trunk
     
    2626
    2727== Changelog ==
     28= 1.1.3 =
     29fixed country code on receipient phone number
     30fixed int and floats in weight and size
     31added language switcher
     32
    2833= 1.1.2 =
    2934add option to remove tariff line item in international shipping
  • posturinn/tags/1.1.3/wc-posturinn-shipping-api.php

    r2798328 r2826503  
    33 * Plugin Name: Pósturinn's Shipping with WooCommerce
    44 * Description: This plugin is an WooCommerce extension to extend shipping method with Pósturinn's - Iceland
    5  * Version: 1.1.2
     5 * Version: 1.1.3
    66 * Author: Pósturinn
    77 * Author URI: https://postur.is
  • posturinn/trunk/inc/api.class.php

    r2798328 r2826503  
    128128       
    129129        $valid_phonenumber     = isset($postmeta['phonenumber']) && $postmeta['phonenumber'] != '' ? wc_sanitize_phone_number( $postmeta['phonenumber'] ): $customer_phone;
    130        
     130        $valid_phonenumber = str_replace('+354','',$valid_phonenumber);
    131131        if ( isset($dynamic_opt_control['cod']) && $dynamic_opt_control['cod'] ) {
    132132            $order_total = $order->get_total();
     
    201201        }else{
    202202            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') {
    204204                    // phoneNumber is valid
    205205                } else {
  • posturinn/trunk/inc/functions.php

    r2682817 r2826503  
    4444    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    4545        // vesion less then 2.7
    46         return $product -> weight;
     46        return (float)$product -> weight;
    4747    } else {
    48         return $product -> get_weight();
     48        return (float)$product -> get_weight();
    4949    }
    5050}
     
    5656    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    5757        // vesion less then 2.7
    58         return $product -> width;
     58        return (int)$product -> width;
    5959    } else {
    60         return $product -> get_width();
     60        return (int)$product -> get_width();
    6161    }
    6262}
     
    6868    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    6969        // vesion less then 2.7
    70         return $product -> height;
     70        return (int)$product -> height;
    7171    } else {
    72         return $product -> get_height();
     72        return (int)$product -> get_height();
    7373    }
    7474}
     
    8080    if ( version_compare( WC_VERSION, '2.7', '<' ) ) { 
    8181        // vesion less then 2.7
    82         return $product -> length;
     82        return (int)$product -> length;
    8383    } else {
    84         return $product -> get_length();
     84        return (int)$product -> get_length();
    8585    }
    8686}
  • posturinn/trunk/inc/postis.class.php

    r2798328 r2826503  
    161161                        'desc_tip'      => true,
    162162                    ),
     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                    ),
    163174                    'postis_services_table' => array(
    164175                        'type'              => 'postis_services_table'
     
    399410            } else {
    400411                $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;
    401416            }
    402417
  • posturinn/trunk/readme.txt

    r2798328 r2826503  
    33Tags: shipping, posturinn, icelandic post shipping, shipping rates, woocommerce
    44Requires at least: 4.3
    5 Tested up to: 6.0.2
     5Tested up to: 6.1.1
    66Requires PHP: 5.6
    77Stable tag: trunk
     
    2626
    2727== Changelog ==
     28= 1.1.3 =
     29fixed country code on receipient phone number
     30fixed int and floats in weight and size
     31added language switcher
     32
    2833= 1.1.2 =
    2934add option to remove tariff line item in international shipping
  • posturinn/trunk/wc-posturinn-shipping-api.php

    r2798328 r2826503  
    33 * Plugin Name: Pósturinn's Shipping with WooCommerce
    44 * Description: This plugin is an WooCommerce extension to extend shipping method with Pósturinn's - Iceland
    5  * Version: 1.1.2
     5 * Version: 1.1.3
    66 * Author: Pósturinn
    77 * Author URI: https://postur.is
Note: See TracChangeset for help on using the changeset viewer.