Plugin Directory

Changeset 3381129


Ignore:
Timestamp:
10/20/2025 08:22:08 AM (4 months ago)
Author:
inpost
Message:

Version 1.0.7

Location:
inpost-international/trunk
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • inpost-international/trunk/assets/build/inpost-intl-block-frontend.asset.php

    r3369498 r3381129  
    1 <?php return array('dependencies' => array('react', 'wc-blocks-checkout', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'd3fdd3d12512670dd01d');
     1<?php return array('dependencies' => array('react', 'wc-blocks-checkout', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '5566f826d8269bba012a');
  • inpost-international/trunk/assets/build/inpost-intl-block-frontend.js

    r3369498 r3381129  
    1 (()=>{"use strict";const e=window.wc.blocksCheckout,t=window.React,n=window.wp.element,o=window.wp.i18n,i=window.wp.data,{ExperimentalOrderMeta:l}=wc.blocksCheckout;function s({handleDeliveryPointChange:e,handleDeliveryPointDescChange:n,inpostDeliveryPoint:o,inpostDeliveryPointDesc:i}){return(0,t.createElement)("div",{className:"inpost-parcel-locker-wrap",style:{display:"none"}},(0,t.createElement)("input",{value:o,type:"text",id:"inpost-international-locker-id",onChange:e}),(0,t.createElement)("input",{value:i,type:"text",id:"inpost-international-locker-description",onChange:n}))}const c=JSON.parse('{"apiVersion":2,"name":"inpost-international/block","version":"1.0.0","title":"Inpost International Map Button","category":"woocommerce","description":"Adds map button and add input to save delivery point data.","supports":{"html":false,"align":false,"multiple":false,"reusable":false},"parent":["woocommerce/checkout-shipping-methods-block"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}},"text":{"type":"string","source":"html","selector":".wp-block-inpost-international","default":""}},"textdomain":"inpost-international","editorStyle":""}');(0,e.registerCheckoutBlock)({metadata:c,component:({checkoutExtensionData:e,extensions:c})=>{let a=!1,r=null;const[p,d]=(0,n.useState)(""),[u,f]=(0,n.useState)(""),{setExtensionData:_}=e,h="inpost-international-delivery-point-error",{setValidationErrors:m,clearValidationError:g}=(0,i.useDispatch)("wc/store/validation");let w=(0,i.useSelect)((function(e){return e("wc/store/cart").getShippingRates()}));const[k,y]=(0,n.useState)(!1),b=(0,i.useSelect)((e=>e("wc/store/checkout").prefersCollection()),[]);(0,n.useEffect)((()=>{y(b)}),[b]),(0,n.useEffect)((()=>{const e=()=>{const e=document.getElementById("shipping-method");if(!e)return;const t=e.querySelectorAll(".wc-block-checkout__shipping-method-option"),n=e.querySelector(".wc-block-checkout__shipping-method-option--selected");if(n&&t.length>0){const e=Array.from(t).indexOf(n),o=1===e;console.log("Selected shipping method index:",e),console.log("isPickup shipping method:",o),o&&g(h),y(o)}};e();const t=document.getElementById("shipping-method");if(t){t.addEventListener("click",(t=>{setTimeout(e,300)}));const n=new MutationObserver((()=>{e()}));return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),()=>{n.disconnect()}}}),[]);const v=wcSettings.inpost_intl_block_data&&wcSettings.inpost_intl_block_data.configured_methods?wcSettings.inpost_intl_block_data.configured_methods:[];if(null!=w){let e=w[Object.keys(w)[0]];if(null!=e&&e.hasOwnProperty("shipping_rates")){const t=e.shipping_rates,n=[];if(null!=t){for(let e of t)if("pickup_location"!==e.method_id){if(!0===e.selected)if(r=e.instance_id,-1!==e.method_id.indexOf("inpost_international_"))a=!0;else{let e=v[r];null!=e&&e.hasOwnProperty("need_map")&&(a=!0)}n.push(e)}if(!r&&n.length>0){const e=document.getElementsByClassName("wc-block-components-shipping-rates-control")[0];if(null!=e){const t=e.querySelector('input[name^="radio-control-"]:checked');if(null!=t){let e=t.getAttribute("id");if(null!=e){let t=e.split(":");if(r=t[t.length-1],-1!==t[0].indexOf("inpost_international_"))a=!0;else{let e=v[r];null!=e&&e.hasOwnProperty("need_map")&&(a=!0)}}}}}}}}const E=(0,n.useCallback)((function(){a&&!p&&m({[h]:{message:(0,o.__)("Parcel locker must be chosen.","inpost-international"),hidden:!0}})}),[p,m,g,a]),S=(0,n.useCallback)((function(){if(p||!a)return g(h),!0}),[p,m,g,a]);(0,n.useEffect)((function(){E(),S(),_("inpost_intl","inpost-international-locker-id",p),_("inpost_intl","inpost-international-locker-description",u)}),[p,u,_,S]);const[x,D]=(0,n.useState)([]);return(0,n.useEffect)((function(){const e=function(){D(function(){const e=document.querySelector(".wc-block-components-shipping-rates-control");if(e){const t=e.querySelectorAll('input[name^="radio-control-"]');return Array.from(t).map((function(e){return{id:e.id,value:e.value,checked:e.checked}}))}return[]}())};e();const t=new MutationObserver(e);return t.observe(document.body,{subtree:!0,childList:!0}),()=>t.disconnect()}),[]),(0,n.useEffect)((function(){(()=>{let e=[];void 0!==window.inpost_intl_frontend&&null!==window.inpost_intl_frontend&&window.inpost_intl_frontend.inpost_methods&&(e=window.inpost_intl_frontend.inpost_methods);let t=!1;if(x.forEach((function(e){if(e.value&&e.value.indexOf(":")>-1){const[n,o]=e.value.split(":");-1!==n.indexOf("inpost_international_automated_locker_point")&&e.checked&&(t=!0)}})),t){const e=document.getElementById("inpost_intl_show_geowidget");e&&(e.style.display="block")}x.forEach((function(t){if(t.value&&t.value.indexOf(":")>-1){const[n,o]=t.value.split(":");let i=!1;if(null!=e){let t=e[o];if(null!=t&&"inpost_icon"in t){let e=t.inpost_icon;e&&null!=e&&(i=e)}}const l=document.querySelector(`span[id="${t.id}__label"]`);if(i&&l&&!l.querySelector(".inpost_icon")){const e=`<img class="inpost_icon" src="${i}" alt="inpost icon" style="height:35px;width:auto;display:block">`;l.insertAdjacentHTML("beforeend",e)}}}))})()}),[x]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(t.Fragment,null,(0,t.createElement)("button",{className:"button alt inpost_intl_show_geowidget",id:"inpost_intl_show_geowidget"},(0,o.__)("Choose pick-up point","inpost-international")),(0,t.createElement)("div",{id:"inpost_intl_selected_point_data_wrap",className:"inpost_intl_selected_point_data_wrap",style:{display:"none"}}),(0,t.createElement)(l,null,(0,t.createElement)(s,{inpostDeliveryPoint:p,inpostDeliveryPointDesc:u,handleDeliveryPointChange:function(e){const t=e.target.value;d(t)},handleDeliveryPointDescChange:function(e){const t=e.target.value;f(t)}}))))}})})();
     1(()=>{"use strict";const e=window.wc.blocksCheckout,t=window.React,n=window.wp.element,i=window.wp.i18n,o=window.wp.data,{ExperimentalOrderMeta:l}=wc.blocksCheckout;function s({handleDeliveryPointChange:e,handleDeliveryPointDescChange:n,inpostDeliveryPoint:i,inpostDeliveryPointDesc:o}){return(0,t.createElement)("div",{className:"inpost-parcel-locker-wrap",style:{display:"none"}},(0,t.createElement)("input",{value:i,type:"text",id:"inpost-international-locker-id",onChange:e}),(0,t.createElement)("input",{value:o,type:"text",id:"inpost-international-locker-description",onChange:n}))}const c=JSON.parse('{"apiVersion":2,"name":"inpost-international/block","version":"1.0.0","title":"Inpost International Map Button","category":"woocommerce","description":"Adds map button and add input to save delivery point data.","supports":{"html":false,"align":false,"multiple":false,"reusable":false},"parent":["woocommerce/checkout-shipping-methods-block"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}},"text":{"type":"string","source":"html","selector":".wp-block-inpost-international","default":""}},"textdomain":"inpost-international","editorStyle":""}');(0,e.registerCheckoutBlock)({metadata:c,component:({checkoutExtensionData:e,extensions:c})=>{let a=!1,r=null;const[p,d]=(0,n.useState)(""),[u,m]=(0,n.useState)(""),{setExtensionData:_}=e,h="inpost-international-delivery-point-error",{setValidationErrors:f,clearValidationError:g}=(0,o.useDispatch)("wc/store/validation");let w=(0,o.useSelect)((function(e){return e("wc/store/cart").getShippingRates()}));const[k,y]=(0,n.useState)(!1),b=(0,o.useSelect)((e=>e("wc/store/checkout").prefersCollection()),[]);(0,n.useEffect)((()=>{y(b)}),[b]),(0,n.useEffect)((()=>{const e=()=>{const e=document.getElementById("shipping-method");if(!e)return;const t=e.querySelectorAll(".wc-block-checkout__shipping-method-option"),n=e.querySelector(".wc-block-checkout__shipping-method-option--selected");if(n&&t.length>0){const e=Array.from(t).indexOf(n),i=1===e;console.log("Selected shipping method index:",e),console.log("isPickup shipping method:",i),i&&g(h),y(i)}};e();const t=document.getElementById("shipping-method");if(t){t.addEventListener("click",(t=>{setTimeout(e,300)}));const n=new MutationObserver((()=>{e()}));return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),()=>{n.disconnect()}}}),[]);const v=wcSettings.inpost_intl_block_data&&wcSettings.inpost_intl_block_data.configured_methods?wcSettings.inpost_intl_block_data.configured_methods:[];if(null!=w){let e=w[Object.keys(w)[0]];if(null!=e&&e.hasOwnProperty("shipping_rates")){const t=e.shipping_rates,n=[];if(null!=t){for(let e of t)if("pickup_location"!==e.method_id){if(!0===e.selected)if(r=e.instance_id,-1!==e.method_id.indexOf("inpost_international_automated_locker_point"))a=!0;else{let e=v[r];null!=e&&e.hasOwnProperty("need_map")&&(a=!0)}n.push(e)}if(!r&&n.length>0){const e=document.getElementsByClassName("wc-block-components-shipping-rates-control")[0];if(null!=e){const t=e.querySelector('input[name^="radio-control-"]:checked');if(null!=t){let e=t.getAttribute("id");if(null!=e){let t=e.split(":");if(r=t[t.length-1],-1!==t[0].indexOf("inpost_international_automated_locker_point"))a=!0;else{let e=v[r];null!=e&&e.hasOwnProperty("need_map")&&(a=!0)}}}}}}}}const E=(0,n.useCallback)((function(){a&&!p&&(console.log("block_order"),f({[h]:{message:(0,i.__)("Parcel locker must be chosen.","inpost-international"),hidden:!0}}))}),[p,f,g,a]),S=(0,n.useCallback)((function(){if(p||!a)return g(h),!0}),[p,f,g,a]);(0,n.useEffect)((function(){E(),S(),_("inpost_intl","inpost-international-locker-id",p),_("inpost_intl","inpost-international-locker-description",u)}),[p,u,_,S]);const[x,D]=(0,n.useState)([]);return(0,n.useEffect)((function(){const e=function(){D(function(){const e=document.querySelector(".wc-block-components-shipping-rates-control");if(e){const t=e.querySelectorAll('input[name^="radio-control-"]');return Array.from(t).map((function(e){return{id:e.id,value:e.value,checked:e.checked}}))}return[]}())};e();const t=new MutationObserver(e);return t.observe(document.body,{subtree:!0,childList:!0}),()=>t.disconnect()}),[]),(0,n.useEffect)((function(){(()=>{let e=[];void 0!==window.inpost_intl_frontend&&null!==window.inpost_intl_frontend&&window.inpost_intl_frontend.inpost_methods&&(e=window.inpost_intl_frontend.inpost_methods);let t=!1;if(x.forEach((function(e){if(e.value&&e.value.indexOf(":")>-1){const[n,i]=e.value.split(":");-1!==n.indexOf("inpost_international_automated_locker_point")&&e.checked&&(t=!0)}})),t){const e=document.getElementById("inpost_intl_show_geowidget");e&&(e.style.display="block")}x.forEach((function(t){if(t.value&&t.value.indexOf(":")>-1){const[n,i]=t.value.split(":");let o=!1,l=!1;if(null!=e){let t=e[i];if(null!=t){if("inpost_icon"in t){let e=t.inpost_icon;e&&null!=e&&(o=e)}"delivery_terms"in t&&t.delivery_terms&&(l=t.delivery_terms)}}const s=document.querySelector(`span[id="${t.id}__label"]`);let c=!1;(o||l)&&(c='<span class="inpost_intl-shipping-method-meta-wrap">',o&&(c+='<span class="inpost_intl-shipping-method-meta-wrap"><span class="inpost-intl-block-shipping-meta inpost-intl-shipping-method-logo">',c+=`<img class="inpost_icon" src="${o}" alt="inpost icon" style="height:35px;width:auto;display:block">`,c+="</span>"),l&&(c+='<span class="inpost-intl-block-shipping-meta inpost-intl-shipping-terms">',c+=l,c+="</span>"),c+="</span>"),c&&s&&!s.querySelector(".inpost_intl-shipping-method-meta-wrap")&&s.insertAdjacentHTML("beforeend",c)}}))})()}),[x]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(t.Fragment,null,(0,t.createElement)("button",{className:"button alt inpost_intl_show_geowidget",id:"inpost_intl_show_geowidget"},(0,i.__)("Choose pick-up point","inpost-international")),(0,t.createElement)("div",{id:"inpost_intl_selected_point_data_wrap",className:"inpost_intl_selected_point_data_wrap",style:{display:"none"}}),(0,t.createElement)(l,null,(0,t.createElement)(s,{inpostDeliveryPoint:p,inpostDeliveryPointDesc:u,handleDeliveryPointChange:function(e){const t=e.target.value;d(t)},handleDeliveryPointDescChange:function(e){const t=e.target.value;m(t)}}))))}})})();
  • inpost-international/trunk/assets/css/frontend.css

    r3291728 r3381129  
    119119}
    120120/* Shipping methods logo end */
     121
     122
     123/* Shipping methods delivery terms */
     124.inpost_intl-shipping-method-meta-wrap {
     125    display: flex;
     126    align-items: center;
     127}
     128
     129.inpost-intl-shipping-meta {
     130    display: inline-block;
     131}
     132
     133span.inpost-intl-shipping-terms, span.inpost-intl-block-shipping-terms {
     134    font-size: 0.7em;
     135    border: 3px dotted #3c3b35;
     136    border-radius: 5px;
     137    padding: 0px 10px;
     138    margin-left: 5px;
     139    margin-top: 5px;
     140    line-height: normal;
     141}
     142
     143
     144.inpost_intl-shipping-method-meta-wrap {
     145    display: flex;
     146    align-items: center;
     147}
     148
     149.inpost-intl-block-shipping-meta {
     150    display: inline-block;
     151}
     152
     153@media (max-width: 767px) {
     154    .inpost_intl-shipping-method-meta-wrap {
     155        flex-direction: column;
     156        align-items: flex-start;
     157    }
     158
     159    .inpost-intl-block-shipping-meta {
     160        margin-top: 8px;
     161    }
     162    span.inpost-intl-shipping-terms, span.inpost-intl-block-shipping-terms {
     163        margin-left: 0px;
     164    }
     165
     166}
     167/* Shipping methods delivery terms end */
  • inpost-international/trunk/assets/js/admin.js

    r3353688 r3381129  
    929929                    let cutoff_postal_code = $( '#inpost_intl_cutoff_postal_code' ).val();
    930930
     931                    if( ! cutoff_postal_code || 'undefined' == typeof cutoff_postal_code ) {
     932                        alert('No selected postal code');
     933                        return;
     934                    }
     935
    931936                    $.ajax(
    932937                        {
  • inpost-international/trunk/assets/js/front.js

    r3369498 r3381129  
    1313            let inpost_intl_geowidget_modal;
    1414            let inpost_global_geowidget_api = null;
    15             let geowidget_countries         = 'PL,BE,IT,FR,LU,PT,ES,NL,HU,AT';
     15            let geowidget_countries         = 'PL,BE,IT,FR,LU,PT,ES,NL,AT';
    1616            let coords                      = null;
    1717            let selected_country            = null;
  • inpost-international/trunk/blocks/src/js/inpost-intl-block/block.js

    r3369498 r3381129  
    120120                            selectedShippingInstanceID   = method.instance_id;
    121121                            let selectedShippingMethodID = method.method_id;
    122                             if (selectedShippingMethodID.indexOf( 'inpost_international_' ) !== -1) {
     122                            if (selectedShippingMethodID.indexOf( 'inpost_international_automated_locker_point' ) !== -1) {
    123123                                isInpostShippingMethod = true;
    124124                            } else {
     
    147147
    148148                                    let selectedShippingMethodRadioID = shipping_method_data[0];
    149                                     if (selectedShippingMethodRadioID.indexOf( 'inpost_international_' ) !== -1) {
     149                                    if (selectedShippingMethodRadioID.indexOf( 'inpost_international_automated_locker_point' ) !== -1) {
    150150                                        isInpostShippingMethod = true;
    151151                                    } else {
     
    171171        function () {
    172172            if ( isInpostShippingMethod && ! inpostDeliveryPoint ) {
     173                console.log('block_order');
    173174                setValidationErrors(
    174175                    {
     
    291292                        const [shipping_method, instance_id] = method.value.split(':');
    292293                        let inpost_logo = false;
     294                        let delivery_terms = false;
    293295                        if (typeof inpost_methods != 'undefined' && inpost_methods !== null) {
    294296                            let inpost_method_data = inpost_methods[instance_id];
     
    301303                                    }
    302304                                }
    303                             }
    304                         }
     305
     306                                if( 'delivery_terms' in inpost_method_data && inpost_method_data.delivery_terms ) {
     307                                    delivery_terms = inpost_method_data.delivery_terms;
     308                                }
     309                            }
     310                        }
     311
    305312                        const title_span = document.querySelector(
    306313                            `span[id="${method.id}__label"]`
    307314                        );
    308                         if (inpost_logo && title_span && !title_span.querySelector('.inpost_icon')) {
    309                             const icon = `<img class="inpost_icon" src="${inpost_logo}" alt="inpost icon" style="height:35px;width:auto;display:block">`;
    310                             title_span.insertAdjacentHTML('beforeend', icon);
     315
     316                        let shipping_info = false;
     317
     318                        if (inpost_logo || delivery_terms ) {
     319                            shipping_info = `<span class="inpost_intl-shipping-method-meta-wrap">`;
     320                            if (inpost_logo) {
     321                                shipping_info += `<span class="inpost_intl-shipping-method-meta-wrap"><span class="inpost-intl-block-shipping-meta inpost-intl-shipping-method-logo">`;
     322                                shipping_info += `<img class="inpost_icon" src="${inpost_logo}" alt="inpost icon" style="height:35px;width:auto;display:block">`;
     323                                shipping_info += `</span>`;
     324                            }
     325
     326                            if (delivery_terms) {
     327                                shipping_info += `<span class="inpost-intl-block-shipping-meta inpost-intl-shipping-terms">`;
     328                                shipping_info += delivery_terms;
     329                                shipping_info += `</span>`;
     330                            }
     331
     332                            shipping_info += `</span>`;
     333                        }
     334
     335                        if (shipping_info && title_span && !title_span.querySelector('.inpost_intl-shipping-method-meta-wrap')) {
     336                            title_span.insertAdjacentHTML('beforeend', shipping_info);
    311337                        }
    312338                    }
  • inpost-international/trunk/changelog.txt

    r3369498 r3381129  
    2929### Fix
    3030- JS conflict with InPost PL
     31
     32## [1.0.7] - 2025-10-20
     33### Fix
     34- API connection
  • inpost-international/trunk/inpost-international.php

    r3369498 r3381129  
    11<?php
    22/**
    3  * Plugin Name: Inpost International
     3 * Plugin Name: Inpost International 
    44 * Plugin URI: https://wordpress.org/plugins/inpost-international
    55 * Description: InPost International to oficjalna bezpłatna aplikacja InPost dla obsługi międzynarodowej dostawy
    66 * Tags: woocommerce, inpost, shipments
    7  * Version: 1.0.6
     7 * Version: 1.0.7
    88 * Tested up to: 6.8
    99 * Requires PHP: 7.4
     
    3636}
    3737
    38 define( 'INPOST_INTL_PLUGIN_VERSION', '1.0.6' );
     38define( 'INPOST_INTL_PLUGIN_VERSION', '1.0.7' );
    3939define( 'INPOST_INTL_PLUGIN_SLUG', 'inpost_international' );
    4040define( 'INPOST_INTL_PLUGIN_FILE', __FILE__ );
  • inpost-international/trunk/lang/inpost-international-de_DE.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:20+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:51+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " unbekannt"
    667667
     668msgid " unavailable"
     669msgstr " unbekannt"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "Die Abholung muss nach 9:00 Uhr beginnen."
  • inpost-international/trunk/lang/inpost-international-es_ES.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:21+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:51+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " desconocido"
    667667
     668msgid " unavailable"
     669msgstr " no encontrado"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "La hora de recogida debe comenzar después de las 9:00."
  • inpost-international/trunk/lang/inpost-international-fr_FR.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:21+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:51+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " inconnu"
    667667
     668msgid " unavailable"
     669msgstr " non trouvé"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "Le ramassage doit commencer après 9h00."
  • inpost-international/trunk/lang/inpost-international-it_IT.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:21+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:52+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " sconosciuto"
    667667
     668msgid " unavailable"
     669msgstr " non trovato"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "L'orario di ritiro deve iniziare dopo le 9:00."
  • inpost-international/trunk/lang/inpost-international-nl_BE.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:22+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:52+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " onbekend"
    667667
     668msgid " unavailable"
     669msgstr " niet gevonden"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "Ophaaltijd moet na 9 uur 's ochtends beginnen."
  • inpost-international/trunk/lang/inpost-international-nl_NL.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:22+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:52+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " onbekend"
    667667
     668msgid " unavailable"
     669msgstr " niet gevonden"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "Ophaaltijd moet na 9 uur 's ochtends beginnen."
  • inpost-international/trunk/lang/inpost-international-pl_PL.po

    r3369498 r3381129  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2024-11-18T15:04:40+02:00\n"
    6 "PO-Revision-Date: 2025-09-18 11:22+0200\n"
     6"PO-Revision-Date: 2025-10-16 10:52+0200\n"
    77"Last-Translator: Aleksander Sikirytski <[email protected]>\n"
    88"Language-Team: Aleksander Sikirytski <[email protected]>\n"
     
    666666msgstr " nieznany"
    667667
     668msgid " unavailable"
     669msgstr " niedostępny"
     670
    668671msgid "Pickup time has to begin after 9 am."
    669672msgstr "Odbiór musi rozpocząć się po godzinie 9:00."
     
    895898
    896899msgid "Map button text for buyers from Belgium"
    897 msgstr "Tekst przycisku mapy dla kupujących z Włoch"
     900msgstr "Tekst przycisku mapy dla kupujących z Belgii"
    898901
    899902msgid "Map button text for buyers from Luxembourg"
  • inpost-international/trunk/readme.txt

    r3369498 r3381129  
    44Requires at least: 6.0
    55Tested up to: 6.8
    6 Stable tag: 1.0.6
     6Stable tag: 1.0.7
    77Requires PHP: 7.4
    88License: GPLv3 or later
     
    7373== Changelog ==
    7474
     75= 1.0.7 =
     76* Fix: API connection
     77
    7578= 1.0.6 =
    7679* Fix: JS conflict with InPost PL
  • inpost-international/trunk/src/API/API.php

    r3353688 r3381129  
    108108     */
    109109    public function __construct() {
     110
    110111        $this->api_token     = $this->get_plugin_option( self::API_TOKEN );
    111112        $this->refresh_token = $this->get_plugin_option( self::REFRESH_TOKEN );
     
    220221                'redirect_uri'          => $redirect_uri,
    221222                'response_type'         => 'code',
    222                 'scope'                 => 'api:shipments:write api:tracking:read api:one-time-pickups:write api:points:read',
     223                'scope'                 => 'api:shipments:write offline_access api:tracking:read api:one-time-pickups:write api:points:read',
    223224                'code_challenge'        => $code_challenge,
    224225                'code_challenge_method' => 'S256',
     
    245246        }
    246247        if ( $this->get_token_expiration_time() <= time() ) {
    247             return true;
    248         } else {
    249             return false;
    250         }
    251     }
    252 
    253 
    254     /**
    255      * Checks if the refresh token has expired.
    256      *
    257      * @return bool
    258      */
    259     private function is_refresh_token_expired() {
    260         if ( $this->get_refresh_token_expiration_time() <= time() ) {
    261248            return true;
    262249        } else {
     
    355342            $token_data = json_decode( $response['body'] );
    356343            if ( isset( $token_data->access_token ) && isset( $token_data->refresh_token ) && isset( $token_data->expires_in ) ) {
    357                 $access_token_expires_in  = time() + $token_data->expires_in;
     344                $access_token_expires_in  = time() + (int) $token_data->expires_in - 60;
    358345                $refresh_token_expires_in = time() + $token_data->refresh_expires_in;
    359346
     
    385372    public function refresh_api_token() {
    386373
    387         if ( $this->is_refresh_token_expired() ) {
    388 
    389             $this->delete_plugin_option( self::API_TOKEN );
    390             $this->delete_plugin_option( self::TOKEN_EXPIRATION );
    391             $this->delete_plugin_option( self::REFRESH_TOKEN );
    392             return;
    393         }
    394 
    395         if ( get_option( 'inpost_intl_api_token_refreshing' ) ) {
    396             return;
    397         }
     374        if ( get_transient( 'inpost_intl_api_token_refreshing' ) ) {
     375            return;
     376        }
    398377
    399378        $environment   = $this->get_plugin_option( self::API_TYPE_FIELD );
     
    424403            );
    425404
    426             update_option( 'inpost_intl_api_token_refreshing', 1, true );
     405            set_transient( 'inpost_intl_api_token_refreshing', 1, 10 );
    427406
    428407            $response = wp_remote_post( $api_url, $args );
     
    445424                $this->setup_connection_timeout();
    446425
    447                 delete_option( 'inpost_intl_api_token_refreshing' );
     426                delete_transient( 'inpost_intl_api_token_refreshing' );
    448427
    449428                return;
     
    494473                $this->setup_connection_timeout();
    495474
    496                 delete_option( 'inpost_intl_api_token_refreshing' );
     475                delete_transient( 'inpost_intl_api_token_refreshing' );
    497476
    498477                return;
     
    529508                $this->setup_connection_timeout();
    530509
    531                 delete_option( 'inpost_intl_api_token_refreshing' );
     510                delete_transient( 'inpost_intl_api_token_refreshing' );
    532511
    533512                return;
     
    569548                $this->setup_connection_timeout();
    570549
    571                 delete_option( 'inpost_intl_api_token_refreshing' );
     550                delete_transient( 'inpost_intl_api_token_refreshing' );
    572551
    573552                return;
    574553
    575554            }
    576             $token_data = json_decode( $response['body'] );
    577 
    578             $access_token_expires_in = time() + $token_data->expires_in;
    579 
    580             $access_token_expires_in = $access_token_expires_in - 120;
    581 
    582             $refresh_token_expires_in = time() + $token_data->refresh_expires_in;
     555
     556            $access_token_expires_in = time() + (int) $token_data->expires_in - 60;
     557            $refresh_token_expires_in = time() + (int) $token_data->refresh_expires_in;
    583558            // update access tokens and time of expiration.
     559
    584560            $acces_token_updated              = $this->update_plugin_option( self::API_TOKEN, $token_data->access_token );
    585561            $acces_token_expiartion_updated   = $this->update_plugin_option( self::TOKEN_EXPIRATION, $access_token_expires_in );
    586             $refresh_token_updated            = $this->update_plugin_option( self::REFRESH_TOKEN, $token_data->refresh_token );
     562            //$refresh_token_updated            = $this->update_plugin_option( self::REFRESH_TOKEN, $token_data->refresh_token );
    587563            $refresh_token_expiartion_updated = $this->update_plugin_option( self::REFRESH_TOKEN_EXPIRATION, $refresh_token_expires_in );
    588564
    589             if ( ! $acces_token_updated || ! $acces_token_expiartion_updated || ! $refresh_token_updated || ! $refresh_token_expiartion_updated ) {
    590 
    591                 // something went wrong during saving of settings.
    592                 $logger = inpost_intl_core()->get_wc_logger();
    593                 if ( $logger ) {
    594                     $logger->log(
    595                         'debug',
    596                         'Inpost International - error during saving API token after refresh',
    597                         array(
    598                             'source'        => 'InPost International: error during saving API tokens',
    599                             'error_details' => array(
    600                                 'debug_place' => __METHOD__ . ': ' . __LINE__,
    601                                 'error_type'  => 'update_option',
    602                             ),
    603                         )
    604                     );
    605                 }
    606 
    607                 inpost_intl_core()->inpost_logger(
    608                     'Inpost International - refresh API token error',
    609                     __METHOD__ . ': ' . __LINE__,
    610                     array(
    611                         'debug_place' => __METHOD__ . ': ' . __LINE__,
    612                         'error_type'  => 'update_option',
    613                     ),
    614                     'inpost-connection',
    615                     'debug'
    616                 );
    617 
    618                 $this->setup_connection_timeout();
    619 
    620             } else {
    621                 delete_option( 'inpost_international_connection_timeout' );
    622             }
    623 
    624             delete_option( 'inpost_intl_api_token_refreshing' );
     565            delete_transient( 'inpost_intl_api_token_refreshing' );
    625566        }
    626567    }
     
    872813        }
    873814
     815        /*if ( $this->is_api_token_expired() ) {
     816            $this->refresh_api_token();
     817        }*/
     818
    874819        $environment = $this->get_plugin_option( self::API_TYPE_FIELD );
    875820
     
    15001445     */
    15011446    public function create_pickup_order( $request ) {
     1447
    15021448        if ( empty( $this->api_token ) ) {
    15031449            $settings_page = admin_url( 'admin.php?page=inpost-international-api' );
  • inpost-international/trunk/src/Frontend/Frontend.php

    r3353688 r3381129  
    456456            $meta = $method->get_meta_data();
    457457
    458             if ( ! empty( $meta['inpost_order_sm_logo'] ) ) {
    459                 $chosen_logo = $meta['inpost_order_sm_logo'];
    460 
    461                 $img = $this->get_shipping_logo_html( $chosen_logo, $method );
     458            if ( ! empty( $meta['inpost_order_sm_logo'] ) || ! empty( $meta['inpost_delivery_terms'] ) ) {
     459
     460                $img .= '<span class="inpost_intl-shipping-method-meta-wrap">';
     461
     462                if ( ! empty( $meta['inpost_order_sm_logo'] ) ) {
     463                    $chosen_logo = $meta['inpost_order_sm_logo'];
     464                    $img         .= $this->get_shipping_logo_html( $chosen_logo, $method );
     465                }
     466
     467                if ( ! empty( $meta['inpost_delivery_terms'] ) ) {
     468                    $delivery_terms = '<span class="inpost-intl-shipping-meta inpost-intl-shipping-terms">';
     469                    $delivery_terms .= esc_html( trim( $meta['inpost_delivery_terms'] ) );
     470                    $delivery_terms .= '</span>';
     471                    $img .= $delivery_terms;
     472                }
     473
     474                $img .= '</span>';
    462475            }
    463476
     
    553566        if ( 'white' === $chosen_logo ) {
    554567            $img_white = inpost_intl_core()->get_plugin_images_url() . '/white.png';
    555             $img       = ' <span class="inpost-intl-shipping-method-logo">
     568            $img       = '<span class="inpost-intl-shipping-meta inpost-intl-shipping-method-logo">
    556569                            <img style="width:60px;height:auto;" src="' . esc_url( $img_white ) . '" alt="Inpost International" />
    557570                        </span>';
    558571        } elseif ( 'yellow' === $chosen_logo ) {
    559572            $img_yellow = inpost_intl_core()->get_plugin_images_url() . '/yellow.png';
    560             $img        = ' <span class="inpost-intl-shipping-method-logo">
     573            $img        = '<span class="inpost-intl-shipping-meta inpost-intl-shipping-method-logo">
    561574                            <img style="width:60px;height:auto;" src="' . esc_url( $img_yellow ) . '" alt="Inpost International" />
    562575                        </span>';
     
    564577        } elseif ( 'black' === $chosen_logo ) {
    565578            $img_black = inpost_intl_core()->get_plugin_images_url() . '/black.png';
    566             $img       = ' <span class="inpost-intl-shipping-method-logo">
     579            $img       = '<span class="inpost-intl-shipping-meta inpost-intl-shipping-method-logo">
    567580                            <img style="width:60px;height:auto;" src="' . esc_url( $img_black ) . '" alt="Inpost International" />
    568581                        </span>';
    569582        } elseif ( 'mondial' === $chosen_logo ) {
    570583            $img_mondial = inpost_intl_core()->get_plugin_images_url() . '/mondial.png';
    571             $img         = ' <span class="inpost-intl-shipping-method-logo">
     584            $img         = '<span class="inpost-intl-shipping-meta inpost-intl-shipping-method-logo">
    572585                            <img style="width:60px;height:auto;" src="' . esc_url( $img_mondial ) . '" alt="Inpost International" />
    573586                        </span>';
     
    584597            if ( ! empty( $shipping_method_settings['logo_custom'] ) ) {
    585598                $img_src = $shipping_method_settings['logo_custom'];
    586                 $img     = ' <span class="inpost-intl-shipping-method-logo">
     599                $img     = '<span class="inpost-intl-shipping-meta inpost-intl-shipping-method-logo">
    587600                            <img style="width:60px;height:auto;" src="' . esc_url( $img_src ) . '" alt="Inpost International" />
    588601                        </span>';
  • inpost-international/trunk/src/Helpers/Helper.php

    r3369498 r3381129  
    156156                        $logo_src = $this->get_shipping_method_logo_src( $configured_method->id, $configured_method->instance_id );
    157157                        $configured_shipping_methods[ $configured_method->instance_id ]['inpost_icon'] = ! empty( $logo_src ) ? $logo_src : false;
     158                        $configured_shipping_methods[ $configured_method->instance_id ]['delivery_terms'] = $this->get_shipping_method_delivery_terms( $configured_method->id, $configured_method->instance_id );
    158159
    159160                        if ( 0 === strpos( $configured_method->id, 'inpost_international_automated_locker_point' ) ) {
     
    204205        $shipping_method_settings      = get_option( $shipping_method_settings_name );
    205206
    206         $logo_src = inpost_intl_core()->get_plugin_images_url() . '/white.png';
     207        $logo_src = '';
    207208        if ( ! empty( $shipping_method_settings['logo_selected'] ) ) {
    208209            $chosen_logo = $shipping_method_settings['logo_selected'];
    209210            if ( 'white' === $chosen_logo ) {
    210                 return $logo_src;
     211                return inpost_intl_core()->get_plugin_images_url() . '/white.png';
    211212            } elseif ( 'yellow' === $chosen_logo ) {
    212213                return inpost_intl_core()->get_plugin_images_url() . '/yellow.png';
     
    291292    public function get_checkout_hooks_for_map_button(): array {
    292293        return array(
     294            'woocommerce_review_order_after_shipping'     => esc_html__( 'After describing the delivery methods', 'inpost-international' ),
    293295            'woocommerce_review_order_before_submit'      => esc_html__( 'Before the "Place order" button', 'inpost-international' ),
    294296            'woocommerce_after_order_notes'               => esc_html__( 'After the "Add note" field', 'inpost-international' ),
     
    297299            'woocommerce_review_order_before_order_total' => esc_html__( 'Before information about the total amount of the order', 'inpost-international' ),
    298300            'woocommerce_review_order_after_order_total'  => esc_html__( 'After information about the total amount of the order', 'inpost-international' ),
    299             'woocommerce_review_order_after_shipping'     => esc_html__( 'After describing the delivery methods', 'inpost-international' ),
    300301            'woocommerce_review_order_before_shipping'    => esc_html__( 'Before describing the delivery methods', 'inpost-international' ),
    301302            'woocommerce_after_checkout_shipping_form'    => esc_html__( 'After form with shipping address', 'inpost-international' ),
     
    931932            } elseif ( 'unknown' === $problem ) {
    932933                $problem = esc_html__( ' unknown', 'inpost-international' );
    933             } elseif ( 'Pickup time has to begin after 9 am.' === $problem ) {
     934            } elseif ( 'unavailable' === $problem ) {
     935                $problem = esc_html__( ' unavailable', 'inpost-international' );
     936            } elseif ( 'Pickup time has to begin after 9 am.' === $problem ) {
    934937                $problem = esc_html__( 'Pickup time has to begin after 9 am.', 'inpost-international' );
    935938            } elseif ( stripos( $problem, 'minimal time window is 120 minutes' ) ) {
     
    10271030            case 'validation.negativeFromTime':
    10281031                return esc_html__( 'Day in past chosen: ', 'inpost-international' );
     1032
     1033            case 'shipment.valueAddedServices.insurance':
     1034                return esc_html__( 'Insurance amount', 'inpost-international' );
    10291035
    10301036            default:
     
    19431949        return false;
    19441950    }
     1951
     1952
     1953    /**
     1954     * Retrieves the delivery terms for a specific shipping method.
     1955     *
     1956     * @param string $shipping_method_id The shipping method ID.
     1957     * @param int $shipping_method_instance_id The shipping method instance ID.
     1958     * @return string|bool The delivery terms text or false if not set.
     1959     *
     1960     * @since 1.0.7
     1961     * @access public
     1962     */
     1963    public function get_shipping_method_delivery_terms( $shipping_method_id, $shipping_method_instance_id ) {
     1964        $shipping_method_settings_name = 'woocommerce_' . $shipping_method_id . '_' . $shipping_method_instance_id . '_settings';
     1965        $shipping_method_settings      = get_option( $shipping_method_settings_name );
     1966
     1967        $delivery_terms = false;
     1968        if ( ! empty( $shipping_method_settings['delivery_terms'] ) ) {
     1969            $delivery_terms = esc_html( trim( $shipping_method_settings['delivery_terms'] ) );
     1970        }
     1971
     1972        return $delivery_terms;
     1973    }
    19451974}
  • inpost-international/trunk/src/Plugin.php

    r3369498 r3381129  
    1919use Ilabs\Inpost_International\Settings\Admin_Settings;
    2020use Ilabs\Inpost_International\Settings\Product_Settings;
    21 use Ilabs\Inpost_International\Settings\Settings;
    2221use Ilabs\Inpost_International\Settings\Settings_Helper;
    2322use Ilabs\Inpost_International\Shipping\Shipping_Method_Base;
     
    155154                'BE' => ! empty( $plugin_geowidget_settings['geowidget_button_text_be'] ) ? $plugin_geowidget_settings['geowidget_button_text_be'] : 'Sélectionner un point de collecte',
    156155                'LU' => ! empty( $plugin_geowidget_settings['geowidget_button_text_lu'] ) ? $plugin_geowidget_settings['geowidget_button_text_lu'] : 'Sélectionner un point de collecte',
     156                'HU' => ! empty( $plugin_geowidget_settings['geowidget_button_text_hu'] ) ? $plugin_geowidget_settings['geowidget_button_text_hu'] : 'Válasszon egy átvételi pontot',
     157                'AT' => ! empty( $plugin_geowidget_settings['geowidget_button_text_at'] ) ? $plugin_geowidget_settings['geowidget_button_text_at'] : 'Lieferung des Schließfachs oder Relaispunkts',
    157158            );
    158159
     
    166167                'BE' => 'Point de collecte',
    167168                'LU' => 'Point de collecte',
     169                'HU' => 'Válasszon egy átvételi pontot',
     170                'AT' => 'Lieferung des Schließfachs oder Relaispunkts',
    168171            );
    169172
     
    346349
    347350                if ( $inpost_international_shipping_allowed ) {
    348                     $inpost_international_locker                  = new Shipping_Method_Base();
    349                     $methods[ $inpost_international_locker->id ]  = get_class( $inpost_international_locker );
    350                     $inpost_international_courier                 = new Shipping_Method_Courier();
    351                     $methods[ $inpost_international_courier->id ] = get_class( $inpost_international_courier );
     351
     352                    if( class_exists('Ilabs\Inpost_International\Shipping\Shipping_Method_Base')) {
     353                        $inpost_international_locker               = new Shipping_Method_Base();
     354                        $methods[$inpost_international_locker->id] = get_class($inpost_international_locker);
     355                    }
     356
     357                    if( class_exists('Ilabs\Inpost_International\Shipping\Shipping_Method_Courier')) {
     358                        $inpost_international_courier = new Shipping_Method_Courier();
     359                        $methods[ $inpost_international_courier->id ] = get_class( $inpost_international_courier );
     360                    }
     361
    352362                }
    353363
     
    406416            );
    407417
    408             add_action( 'inpost_intl_cron', array( $this, 'inpost_intl_cron_callback' ), 10 );
    409             $args = array();
    410             if ( ! wp_next_scheduled( 'inpost_intl_cron', $args ) ) {
    411                 $delay = 1200;
    412                 wp_schedule_event( time() + $delay, 'inpost_intl_5_minutes', 'inpost_intl_cron' );
    413             }
    414 
    415             if ( isset( $_GET['action'] )
    416                 && 'inpost_inter_api_connect' === sanitize_text_field( wp_unslash( $_GET['action'] ) )
    417                 && isset( $_GET['secret'] )
    418                 && $this->validate_server_cron_request( sanitize_text_field( wp_unslash( $_GET['secret'] ) ) )
    419             ) {
    420 
    421                 $api = new API();
    422                 $api->refresh_api_token();
    423 
    424             }
     418
    425419        } catch ( Exception $exception ) {
    426420            if ( function_exists( 'wc_get_logger' ) ) {
     
    485479
    486480        return false;
    487     }
    488 
    489 
    490     /**
    491      * Validate server CRON request
    492      *
    493      * @param string $param $param.
    494      *
    495      * @return bool
    496      */
    497     private function validate_server_cron_request( $param ) {
    498         return $param === $this->get_cron_secret_param();
    499     }
    500 
    501 
    502     /**
    503      * Cron
    504      */
    505     public function inpost_intl_cron_callback() {
    506         $api = new API();
    507         if ( $api->is_api_token_expired() ) {
    508             $api->refresh_api_token();
    509         }
    510     }
    511 
    512 
    513     /**
    514      * Get server CRON URL
    515      *
    516      * @return string
    517      */
    518     public function get_server_cron_url(): string {
    519         $url = add_query_arg( 'action', 'inpost_inter_api_connect', home_url() );
    520 
    521         return add_query_arg( 'secret', $this->get_cron_secret_param(), $url );
    522     }
    523 
    524 
    525     /**
    526      * @return string
    527      */
    528     public function get_cron_secret_param(): string {
    529 
    530         $param = '';
    531 
    532         $plugin_settings = get_option( 'inpost_international_settings_auth' );
    533         $client_id       = ! empty( $plugin_settings['client_id'] ) ? $plugin_settings['client_id'] : null;
    534         $client_secret   = ! empty( $plugin_settings['client_secret'] ) ? $plugin_settings['client_secret'] : null;
    535 
    536         if ( $client_id && $client_secret ) {
    537             $param = md5( $client_id . $client_secret );
    538         }
    539 
    540         return $param;
    541481    }
    542482
  • inpost-international/trunk/src/Settings/Admin_Settings.php

    r3353688 r3381129  
    288288                        <input type="hidden" id="inpost-intl-connection-nonce" data-id="<?php echo esc_attr( wp_create_nonce( 'inpost-intl-connection' ) ); ?>">
    289289
    290                         <?php if ( $connection_is_active ) { ?>
     290                        <?php if ( $connection_is_active ) {
     291                            wp_clear_scheduled_hook( 'inpost_intl_cron' );
     292                            ?>
    291293                        <a id="inpost-intl-disconnect" href="#" class="inpost-intl-connection disconnect" title="Disconnect API"  style="margin-left:30px;">
    292294                            <?php esc_html_e( 'Disconnect', 'inpost-international' ); ?>
     
    295297                        <?php } ?>
    296298                        <div style="clear:both;"></div>
    297                         <?php if ( $connection_is_active ) { ?>
    298                             <p class="inpost_intl_sever_cron_description">
    299                                 <?php esc_html_e( 'WordPress sprawdza zaplanowane zadania tylko wtedy, gdy ktoś przejdzie na Twoją witrynę internetową.', 'inpost-international' ); ?>
    300                                 <br>
    301                                 <?php esc_html_e( 'Alternatywą jest skonfigurowanie odpowiednich zadań CRON zarządzanych przez serwer dostawcy hostingu.', 'inpost-international' ); ?>
    302                                 <br>
    303                                 <?php esc_html_e( 'Opcjonalnie możesz użyć tego łącza, aby skonfigurować zadanie CRON, które będzie odświeżać token API (np. raz na 5 minut).', 'inpost-international' ); ?>
    304                             </p>
    305                             <br>
    306                             <div class="inpost-cron-input-wrapper">
    307                                 <input type="text" id="inpost_international_server_cron" value="<?php echo esc_url( inpost_intl_core()->get_server_cron_url() ); ?>" disabled>
    308                                 <span class="inpost_intl_order_list_label dashicons dashicons-admin-page inpost-copy-icon"  id="inpost-copy-cron-url-btn">
    309                                     <div class="inpost-copy-tooltip" id="copy-tooltip"><?php esc_html_e( 'Copy', 'inpost-international' ); ?></div>
    310                                 </span>
    311                             </div>
    312                         <?php } ?>
    313299                    </div>
    314300                    <?php
     
    435421            $fifth_tab_section_id,
    436422            array(
    437                 'id'      => 'geowidget_button_text_nl',
     423                'id'      => 'geowidget_button_text_at',
    438424                'type'    => 'text',
    439425                'name'    => '',
    440                 'default' => 'Levering van Locker of Relaispun',
     426                'default' => 'Lieferung des Schließfachs oder Relaispunkts',
    441427                'desc'    => function () {
    442428                    ?>
    443                     <p class="inpost_intl_before_setting_description"><?php esc_html_e( 'Map button text for buyers from the Netherlands', 'inpost-international' ); ?></p>
     429                    <p class="inpost_intl_before_setting_description"><?php esc_html_e( 'Map button text for buyers from Austria', 'inpost-international' ); ?></p>
    444430                    <?php
    445431                },
     
    476462            )
    477463        );
     464
     465        $this->settings_helper->add_field(
     466            $fifth_tab_section_id,
     467            array(
     468                'id'      => 'geowidget_button_text_hu',
     469                'type'    => 'text',
     470                'name'    => '',
     471                'default' => 'Válasszon egy átvételi pontot',
     472                'desc'    => function () {
     473                    ?>
     474                    <p class="inpost_intl_before_setting_description"><?php esc_html_e( 'Map button text for buyers from Hungary', 'inpost-international' ); ?></p>
     475                    <?php
     476                },
     477            )
     478        );
    478479
    479480        $this->settings_helper->add_field(
  • inpost-international/trunk/src/Shipping/Shipping_Method_Base.php

    r3291728 r3381129  
    211211                'desc_tip' => false,
    212212            ),
     213            'delivery_terms'                                  => array(
     214                'title'    => esc_html__( 'Terms of delivery', 'inpost-international' ),
     215                'type'     => 'text',
     216                'default'  => '',
     217                'desc_tip' => false,
     218            ),
    213219            'insurance_inpost_intl'                  => array(
    214220                'title'       => esc_html__( 'Insurance', 'inpost-international' ),
     
    390396        $args['meta_data'] = array(
    391397            'inpost_order_sm_logo' => $this->get_instance_option( 'logo_selected' ),
     398            'inpost_delivery_terms' => $this->get_instance_option( 'delivery_terms' ),
    392399        );
    393400
  • inpost-international/trunk/src/Shipping/Shipping_Method_Courier.php

    r3353688 r3381129  
    8080                'desc_tip' => false,
    8181            ),
     82            'delivery_terms'                                  => array(
     83                'title'    => esc_html__( 'Terms of delivery', 'inpost-international' ),
     84                'type'     => 'text',
     85                'default'  => '',
     86                'desc_tip' => false,
     87            ),
    8288            'insurance_inpost_intl'                  => array(
    8389                'title'       => esc_html__( 'Insurance', 'inpost-international' ),
Note: See TracChangeset for help on using the changeset viewer.