Changeset 3381129
- Timestamp:
- 10/20/2025 08:22:08 AM (4 months ago)
- Location:
- inpost-international/trunk
- Files:
-
- 30 edited
-
assets/build/inpost-intl-block-frontend.asset.php (modified) (1 diff)
-
assets/build/inpost-intl-block-frontend.js (modified) (1 diff)
-
assets/css/frontend.css (modified) (1 diff)
-
assets/js/admin.js (modified) (1 diff)
-
assets/js/front.js (modified) (1 diff)
-
blocks/src/js/inpost-intl-block/block.js (modified) (5 diffs)
-
changelog.txt (modified) (1 diff)
-
inpost-international.php (modified) (2 diffs)
-
lang/inpost-international-de_DE.mo (modified) (previous)
-
lang/inpost-international-de_DE.po (modified) (2 diffs)
-
lang/inpost-international-es_ES.mo (modified) (previous)
-
lang/inpost-international-es_ES.po (modified) (2 diffs)
-
lang/inpost-international-fr_FR.mo (modified) (previous)
-
lang/inpost-international-fr_FR.po (modified) (2 diffs)
-
lang/inpost-international-it_IT.mo (modified) (previous)
-
lang/inpost-international-it_IT.po (modified) (2 diffs)
-
lang/inpost-international-nl_BE.mo (modified) (previous)
-
lang/inpost-international-nl_BE.po (modified) (2 diffs)
-
lang/inpost-international-nl_NL.mo (modified) (previous)
-
lang/inpost-international-nl_NL.po (modified) (2 diffs)
-
lang/inpost-international-pl_PL.mo (modified) (previous)
-
lang/inpost-international-pl_PL.po (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
src/API/API.php (modified) (12 diffs)
-
src/Frontend/Frontend.php (modified) (4 diffs)
-
src/Helpers/Helper.php (modified) (7 diffs)
-
src/Plugin.php (modified) (6 diffs)
-
src/Settings/Admin_Settings.php (modified) (4 diffs)
-
src/Shipping/Shipping_Method_Base.php (modified) (2 diffs)
-
src/Shipping/Shipping_Method_Courier.php (modified) (1 diff)
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 119 119 } 120 120 /* 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 133 span.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 929 929 let cutoff_postal_code = $( '#inpost_intl_cutoff_postal_code' ).val(); 930 930 931 if( ! cutoff_postal_code || 'undefined' == typeof cutoff_postal_code ) { 932 alert('No selected postal code'); 933 return; 934 } 935 931 936 $.ajax( 932 937 { -
inpost-international/trunk/assets/js/front.js
r3369498 r3381129 13 13 let inpost_intl_geowidget_modal; 14 14 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'; 16 16 let coords = null; 17 17 let selected_country = null; -
inpost-international/trunk/blocks/src/js/inpost-intl-block/block.js
r3369498 r3381129 120 120 selectedShippingInstanceID = method.instance_id; 121 121 let selectedShippingMethodID = method.method_id; 122 if (selectedShippingMethodID.indexOf( 'inpost_international_ ' ) !== -1) {122 if (selectedShippingMethodID.indexOf( 'inpost_international_automated_locker_point' ) !== -1) { 123 123 isInpostShippingMethod = true; 124 124 } else { … … 147 147 148 148 let selectedShippingMethodRadioID = shipping_method_data[0]; 149 if (selectedShippingMethodRadioID.indexOf( 'inpost_international_ ' ) !== -1) {149 if (selectedShippingMethodRadioID.indexOf( 'inpost_international_automated_locker_point' ) !== -1) { 150 150 isInpostShippingMethod = true; 151 151 } else { … … 171 171 function () { 172 172 if ( isInpostShippingMethod && ! inpostDeliveryPoint ) { 173 console.log('block_order'); 173 174 setValidationErrors( 174 175 { … … 291 292 const [shipping_method, instance_id] = method.value.split(':'); 292 293 let inpost_logo = false; 294 let delivery_terms = false; 293 295 if (typeof inpost_methods != 'undefined' && inpost_methods !== null) { 294 296 let inpost_method_data = inpost_methods[instance_id]; … … 301 303 } 302 304 } 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 305 312 const title_span = document.querySelector( 306 313 `span[id="${method.id}__label"]` 307 314 ); 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); 311 337 } 312 338 } -
inpost-international/trunk/changelog.txt
r3369498 r3381129 29 29 ### Fix 30 30 - 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 1 1 <?php 2 2 /** 3 * Plugin Name: Inpost International 3 * Plugin Name: Inpost International 4 4 * Plugin URI: https://wordpress.org/plugins/inpost-international 5 5 * Description: InPost International to oficjalna bezpłatna aplikacja InPost dla obsługi międzynarodowej dostawy 6 6 * Tags: woocommerce, inpost, shipments 7 * Version: 1.0. 67 * Version: 1.0.7 8 8 * Tested up to: 6.8 9 9 * Requires PHP: 7.4 … … 36 36 } 37 37 38 define( 'INPOST_INTL_PLUGIN_VERSION', '1.0. 6' );38 define( 'INPOST_INTL_PLUGIN_VERSION', '1.0.7' ); 39 39 define( 'INPOST_INTL_PLUGIN_SLUG', 'inpost_international' ); 40 40 define( 'INPOST_INTL_PLUGIN_FILE', __FILE__ ); -
inpost-international/trunk/lang/inpost-international-de_DE.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " unbekannt" 667 667 668 msgid " unavailable" 669 msgstr " unbekannt" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "Die Abholung muss nach 9:00 Uhr beginnen." -
inpost-international/trunk/lang/inpost-international-es_ES.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " desconocido" 667 667 668 msgid " unavailable" 669 msgstr " no encontrado" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "La hora de recogida debe comenzar después de las 9:00." -
inpost-international/trunk/lang/inpost-international-fr_FR.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " inconnu" 667 667 668 msgid " unavailable" 669 msgstr " non trouvé" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "Le ramassage doit commencer après 9h00." -
inpost-international/trunk/lang/inpost-international-it_IT.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " sconosciuto" 667 667 668 msgid " unavailable" 669 msgstr " non trovato" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "L'orario di ritiro deve iniziare dopo le 9:00." -
inpost-international/trunk/lang/inpost-international-nl_BE.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " onbekend" 667 667 668 msgid " unavailable" 669 msgstr " niet gevonden" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "Ophaaltijd moet na 9 uur 's ochtends beginnen." -
inpost-international/trunk/lang/inpost-international-nl_NL.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " onbekend" 667 667 668 msgid " unavailable" 669 msgstr " niet gevonden" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "Ophaaltijd moet na 9 uur 's ochtends beginnen." -
inpost-international/trunk/lang/inpost-international-pl_PL.po
r3369498 r3381129 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "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" 7 7 "Last-Translator: Aleksander Sikirytski <[email protected]>\n" 8 8 "Language-Team: Aleksander Sikirytski <[email protected]>\n" … … 666 666 msgstr " nieznany" 667 667 668 msgid " unavailable" 669 msgstr " niedostępny" 670 668 671 msgid "Pickup time has to begin after 9 am." 669 672 msgstr "Odbiór musi rozpocząć się po godzinie 9:00." … … 895 898 896 899 msgid "Map button text for buyers from Belgium" 897 msgstr "Tekst przycisku mapy dla kupujących z Włoch"900 msgstr "Tekst przycisku mapy dla kupujących z Belgii" 898 901 899 902 msgid "Map button text for buyers from Luxembourg" -
inpost-international/trunk/readme.txt
r3369498 r3381129 4 4 Requires at least: 6.0 5 5 Tested up to: 6.8 6 Stable tag: 1.0. 66 Stable tag: 1.0.7 7 7 Requires PHP: 7.4 8 8 License: GPLv3 or later … … 73 73 == Changelog == 74 74 75 = 1.0.7 = 76 * Fix: API connection 77 75 78 = 1.0.6 = 76 79 * Fix: JS conflict with InPost PL -
inpost-international/trunk/src/API/API.php
r3353688 r3381129 108 108 */ 109 109 public function __construct() { 110 110 111 $this->api_token = $this->get_plugin_option( self::API_TOKEN ); 111 112 $this->refresh_token = $this->get_plugin_option( self::REFRESH_TOKEN ); … … 220 221 'redirect_uri' => $redirect_uri, 221 222 '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', 223 224 'code_challenge' => $code_challenge, 224 225 'code_challenge_method' => 'S256', … … 245 246 } 246 247 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 bool258 */259 private function is_refresh_token_expired() {260 if ( $this->get_refresh_token_expiration_time() <= time() ) {261 248 return true; 262 249 } else { … … 355 342 $token_data = json_decode( $response['body'] ); 356 343 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; 358 345 $refresh_token_expires_in = time() + $token_data->refresh_expires_in; 359 346 … … 385 372 public function refresh_api_token() { 386 373 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 } 398 377 399 378 $environment = $this->get_plugin_option( self::API_TYPE_FIELD ); … … 424 403 ); 425 404 426 update_option( 'inpost_intl_api_token_refreshing', 1, true);405 set_transient( 'inpost_intl_api_token_refreshing', 1, 10 ); 427 406 428 407 $response = wp_remote_post( $api_url, $args ); … … 445 424 $this->setup_connection_timeout(); 446 425 447 delete_ option( 'inpost_intl_api_token_refreshing' );426 delete_transient( 'inpost_intl_api_token_refreshing' ); 448 427 449 428 return; … … 494 473 $this->setup_connection_timeout(); 495 474 496 delete_ option( 'inpost_intl_api_token_refreshing' );475 delete_transient( 'inpost_intl_api_token_refreshing' ); 497 476 498 477 return; … … 529 508 $this->setup_connection_timeout(); 530 509 531 delete_ option( 'inpost_intl_api_token_refreshing' );510 delete_transient( 'inpost_intl_api_token_refreshing' ); 532 511 533 512 return; … … 569 548 $this->setup_connection_timeout(); 570 549 571 delete_ option( 'inpost_intl_api_token_refreshing' );550 delete_transient( 'inpost_intl_api_token_refreshing' ); 572 551 573 552 return; 574 553 575 554 } 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; 583 558 // update access tokens and time of expiration. 559 584 560 $acces_token_updated = $this->update_plugin_option( self::API_TOKEN, $token_data->access_token ); 585 561 $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 ); 587 563 $refresh_token_expiartion_updated = $this->update_plugin_option( self::REFRESH_TOKEN_EXPIRATION, $refresh_token_expires_in ); 588 564 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' ); 625 566 } 626 567 } … … 872 813 } 873 814 815 /*if ( $this->is_api_token_expired() ) { 816 $this->refresh_api_token(); 817 }*/ 818 874 819 $environment = $this->get_plugin_option( self::API_TYPE_FIELD ); 875 820 … … 1500 1445 */ 1501 1446 public function create_pickup_order( $request ) { 1447 1502 1448 if ( empty( $this->api_token ) ) { 1503 1449 $settings_page = admin_url( 'admin.php?page=inpost-international-api' ); -
inpost-international/trunk/src/Frontend/Frontend.php
r3353688 r3381129 456 456 $meta = $method->get_meta_data(); 457 457 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>'; 462 475 } 463 476 … … 553 566 if ( 'white' === $chosen_logo ) { 554 567 $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"> 556 569 <img style="width:60px;height:auto;" src="' . esc_url( $img_white ) . '" alt="Inpost International" /> 557 570 </span>'; 558 571 } elseif ( 'yellow' === $chosen_logo ) { 559 572 $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"> 561 574 <img style="width:60px;height:auto;" src="' . esc_url( $img_yellow ) . '" alt="Inpost International" /> 562 575 </span>'; … … 564 577 } elseif ( 'black' === $chosen_logo ) { 565 578 $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"> 567 580 <img style="width:60px;height:auto;" src="' . esc_url( $img_black ) . '" alt="Inpost International" /> 568 581 </span>'; 569 582 } elseif ( 'mondial' === $chosen_logo ) { 570 583 $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"> 572 585 <img style="width:60px;height:auto;" src="' . esc_url( $img_mondial ) . '" alt="Inpost International" /> 573 586 </span>'; … … 584 597 if ( ! empty( $shipping_method_settings['logo_custom'] ) ) { 585 598 $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"> 587 600 <img style="width:60px;height:auto;" src="' . esc_url( $img_src ) . '" alt="Inpost International" /> 588 601 </span>'; -
inpost-international/trunk/src/Helpers/Helper.php
r3369498 r3381129 156 156 $logo_src = $this->get_shipping_method_logo_src( $configured_method->id, $configured_method->instance_id ); 157 157 $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 ); 158 159 159 160 if ( 0 === strpos( $configured_method->id, 'inpost_international_automated_locker_point' ) ) { … … 204 205 $shipping_method_settings = get_option( $shipping_method_settings_name ); 205 206 206 $logo_src = inpost_intl_core()->get_plugin_images_url() . '/white.png';207 $logo_src = ''; 207 208 if ( ! empty( $shipping_method_settings['logo_selected'] ) ) { 208 209 $chosen_logo = $shipping_method_settings['logo_selected']; 209 210 if ( 'white' === $chosen_logo ) { 210 return $logo_src;211 return inpost_intl_core()->get_plugin_images_url() . '/white.png'; 211 212 } elseif ( 'yellow' === $chosen_logo ) { 212 213 return inpost_intl_core()->get_plugin_images_url() . '/yellow.png'; … … 291 292 public function get_checkout_hooks_for_map_button(): array { 292 293 return array( 294 'woocommerce_review_order_after_shipping' => esc_html__( 'After describing the delivery methods', 'inpost-international' ), 293 295 'woocommerce_review_order_before_submit' => esc_html__( 'Before the "Place order" button', 'inpost-international' ), 294 296 'woocommerce_after_order_notes' => esc_html__( 'After the "Add note" field', 'inpost-international' ), … … 297 299 'woocommerce_review_order_before_order_total' => esc_html__( 'Before information about the total amount of the order', 'inpost-international' ), 298 300 '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' ),300 301 'woocommerce_review_order_before_shipping' => esc_html__( 'Before describing the delivery methods', 'inpost-international' ), 301 302 'woocommerce_after_checkout_shipping_form' => esc_html__( 'After form with shipping address', 'inpost-international' ), … … 931 932 } elseif ( 'unknown' === $problem ) { 932 933 $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 ) { 934 937 $problem = esc_html__( 'Pickup time has to begin after 9 am.', 'inpost-international' ); 935 938 } elseif ( stripos( $problem, 'minimal time window is 120 minutes' ) ) { … … 1027 1030 case 'validation.negativeFromTime': 1028 1031 return esc_html__( 'Day in past chosen: ', 'inpost-international' ); 1032 1033 case 'shipment.valueAddedServices.insurance': 1034 return esc_html__( 'Insurance amount', 'inpost-international' ); 1029 1035 1030 1036 default: … … 1943 1949 return false; 1944 1950 } 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 } 1945 1974 } -
inpost-international/trunk/src/Plugin.php
r3369498 r3381129 19 19 use Ilabs\Inpost_International\Settings\Admin_Settings; 20 20 use Ilabs\Inpost_International\Settings\Product_Settings; 21 use Ilabs\Inpost_International\Settings\Settings;22 21 use Ilabs\Inpost_International\Settings\Settings_Helper; 23 22 use Ilabs\Inpost_International\Shipping\Shipping_Method_Base; … … 155 154 'BE' => ! empty( $plugin_geowidget_settings['geowidget_button_text_be'] ) ? $plugin_geowidget_settings['geowidget_button_text_be'] : 'Sélectionner un point de collecte', 156 155 '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', 157 158 ); 158 159 … … 166 167 'BE' => 'Point de collecte', 167 168 'LU' => 'Point de collecte', 169 'HU' => 'Válasszon egy átvételi pontot', 170 'AT' => 'Lieferung des Schließfachs oder Relaispunkts', 168 171 ); 169 172 … … 346 349 347 350 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 352 362 } 353 363 … … 406 416 ); 407 417 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 425 419 } catch ( Exception $exception ) { 426 420 if ( function_exists( 'wc_get_logger' ) ) { … … 485 479 486 480 return false; 487 }488 489 490 /**491 * Validate server CRON request492 *493 * @param string $param $param.494 *495 * @return bool496 */497 private function validate_server_cron_request( $param ) {498 return $param === $this->get_cron_secret_param();499 }500 501 502 /**503 * Cron504 */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 URL515 *516 * @return string517 */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 string527 */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;541 481 } 542 482 -
inpost-international/trunk/src/Settings/Admin_Settings.php
r3353688 r3381129 288 288 <input type="hidden" id="inpost-intl-connection-nonce" data-id="<?php echo esc_attr( wp_create_nonce( 'inpost-intl-connection' ) ); ?>"> 289 289 290 <?php if ( $connection_is_active ) { ?> 290 <?php if ( $connection_is_active ) { 291 wp_clear_scheduled_hook( 'inpost_intl_cron' ); 292 ?> 291 293 <a id="inpost-intl-disconnect" href="#" class="inpost-intl-connection disconnect" title="Disconnect API" style="margin-left:30px;"> 292 294 <?php esc_html_e( 'Disconnect', 'inpost-international' ); ?> … … 295 297 <?php } ?> 296 298 <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 } ?>313 299 </div> 314 300 <?php … … 435 421 $fifth_tab_section_id, 436 422 array( 437 'id' => 'geowidget_button_text_ nl',423 'id' => 'geowidget_button_text_at', 438 424 'type' => 'text', 439 425 'name' => '', 440 'default' => 'L evering van Locker of Relaispun',426 'default' => 'Lieferung des Schließfachs oder Relaispunkts', 441 427 'desc' => function () { 442 428 ?> 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> 444 430 <?php 445 431 }, … … 476 462 ) 477 463 ); 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 ); 478 479 479 480 $this->settings_helper->add_field( -
inpost-international/trunk/src/Shipping/Shipping_Method_Base.php
r3291728 r3381129 211 211 'desc_tip' => false, 212 212 ), 213 'delivery_terms' => array( 214 'title' => esc_html__( 'Terms of delivery', 'inpost-international' ), 215 'type' => 'text', 216 'default' => '', 217 'desc_tip' => false, 218 ), 213 219 'insurance_inpost_intl' => array( 214 220 'title' => esc_html__( 'Insurance', 'inpost-international' ), … … 390 396 $args['meta_data'] = array( 391 397 'inpost_order_sm_logo' => $this->get_instance_option( 'logo_selected' ), 398 'inpost_delivery_terms' => $this->get_instance_option( 'delivery_terms' ), 392 399 ); 393 400 -
inpost-international/trunk/src/Shipping/Shipping_Method_Courier.php
r3353688 r3381129 80 80 'desc_tip' => false, 81 81 ), 82 'delivery_terms' => array( 83 'title' => esc_html__( 'Terms of delivery', 'inpost-international' ), 84 'type' => 'text', 85 'default' => '', 86 'desc_tip' => false, 87 ), 82 88 'insurance_inpost_intl' => array( 83 89 'title' => esc_html__( 'Insurance', 'inpost-international' ),
Note: See TracChangeset
for help on using the changeset viewer.