WooCommerce Payments – Fully Integrated Solution Built and Supported by Woo - Version 2.3.1

Version Description

  • 2021-04-26 =
  • Fix - Various account connection cache tweaks
  • Update - Use option instead of transient for caching account data
  • Fix - Error when using SCA / 3DS credit card in checkout block.
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Payments – Fully Integrated Solution Built and Supported by Woo
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.1

changelog.txt CHANGED
@@ -1,5 +1,10 @@
1
  *** WooCommerce Payments Changelog ***
2
 
 
 
 
 
 
3
  = 2.3.0 - 2021-04-21 =
4
  * Add - Introduced deposit currency filter for transactions overview page.
5
  * Add - Download transactions report in CSV.
1
  *** WooCommerce Payments Changelog ***
2
 
3
+ = 2.3.1 - 2021-04-26 =
4
+ * Fix - Various account connection cache tweaks
5
+ * Update - Use option instead of transient for caching account data
6
+ * Fix - Error when using SCA / 3DS credit card in checkout block.
7
+
8
  = 2.3.0 - 2021-04-21 =
9
  * Add - Introduced deposit currency filter for transactions overview page.
10
  * Add - Download transactions report in CSV.
dist/blocks-checkout.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'd8ed83ee7b860fa35cdcf567101c1339');
1
+ <?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '21d9d01516897ac1414f204b856e4b80');
dist/blocks-checkout.js CHANGED
@@ -1 +1 @@
1
- !function(){var e={664:function(e,t,n){!function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t=t&&t.hasOwnProperty("default")?t.default:t;function i(){}function a(){}a.resetWarningCache=i;var c,u=(function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}()}(c={exports:{}},c.exports),c.exports),s=function(e){return null!==e&&"object"===n(e)},l="[object Object]",f=function e(t,n){if(!s(t)||!s(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===l;if(o!==(Object.prototype.toString.call(n)===l))return!1;if(!o&&!r)return!1;var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var c={},u=0;u<i.length;u+=1)c[i[u]]=!0;for(var f=0;f<a.length;f+=1)c[a[f]]=!0;var p=Object.keys(c);if(p.length!==i.length)return!1;var d=t,m=n;return p.every((function(t){return e(d[t],m[t])}))},p=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},d=function(e){if(null===e||s(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},m=function(e){if(function(e){return s(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(d)};var t=d(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},y=t.createContext(null);y.displayName="ElementsContext";var h=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useRef(!1),c=t.useRef(!0),u=t.useMemo((function(){return m(n)}),[n]),s=o(t.useState((function(){return{stripe:null,elements:null}})),2),l=s[0],d=s[1],h=p(n),v=p(r);return null!==h&&(h!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),f(r,v)||console.warn("Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.")),a.current||("sync"===u.tag&&(a.current=!0,d({stripe:u.stripe,elements:u.stripe.elements(r)})),"async"===u.tag&&(a.current=!0,u.stripePromise.then((function(e){e&&c.current&&d({stripe:e,elements:e.elements(r)})})))),t.useEffect((function(){return function(){c.current=!1}}),[]),t.useEffect((function(){var e=l.stripe;e&&e._registerWrapper&&e._registerWrapper({name:"react-stripe-js",version:"1.1.2"})}),[l.stripe]),t.createElement(y.Provider,{value:l},i)};h.propTypes={stripe:u.any,options:u.object};var v=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(y),e)},g=function(e){return(0,e.children)(v("mounts <ElementsConsumer>"))};g.propTypes={children:u.func.isRequired};var w=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),function(){n.current&&n.current.apply(n,arguments)}},b=function(e){return s(e)?(e.paymentRequest,r(e,["paymentRequest"])):{}},S=function(){},_=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),i=n?function(e){v("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r=n.id,i=n.className,a=n.options,c=void 0===a?{}:a,u=n.onBlur,s=void 0===u?S:u,l=n.onFocus,p=void 0===l?S:l,d=n.onReady,m=void 0===d?S:d,y=n.onChange,h=void 0===y?S:y,g=n.onEscape,_=void 0===g?S:g,E=n.onClick,O=void 0===E?S:E,x=v("mounts <".concat(o,">")).elements,j=t.useRef(null),k=t.useRef(null),C=w(m),P=w(s),D=w(p),T=w(O),A=w(h),I=w(_);t.useLayoutEffect((function(){if(null==j.current&&x&&null!=k.current){var t=x.create(e,c);j.current=t,t.mount(k.current),t.on("ready",(function(){return C(t)})),t.on("change",A),t.on("blur",P),t.on("focus",D),t.on("escape",I),t.on("click",T)}}));var R=t.useRef(c);return t.useEffect((function(){R.current&&R.current.paymentRequest!==c.paymentRequest&&console.warn("Unsupported prop change: options.paymentRequest is not a customizable property.");var e=b(c);0===Object.keys(e).length||f(e,b(R.current))||j.current&&(j.current.update(e),R.current=c)}),[c]),t.useEffect((function(){return function(){j.current&&j.current.destroy()}}),[]),t.createElement("div",{id:r,className:i,ref:k})};return i.propTypes={id:u.string,className:u.string,onChange:u.func,onBlur:u.func,onFocus:u.func,onReady:u.func,onClick:u.func,options:u.object},i.displayName=o,i.__elementType=e,i},E="undefined"==typeof window,O=_("auBankAccount",E),x=_("card",E),j=_("cardNumber",E),k=_("cardExpiry",E),C=_("cardCvc",E),P=_("fpxBank",E),D=_("iban",E),T=_("idealBank",E),A=_("paymentRequestButton",E);e.AuBankAccountElement=O,e.CardCvcElement=C,e.CardElement=x,e.CardExpiryElement=k,e.CardNumberElement=j,e.Elements=h,e.ElementsConsumer=g,e.FpxBankElement=P,e.IbanElement=D,e.IdealBankElement=T,e.PaymentRequestButtonElement=A,e.useElements=function(){return v("calls useElements()").elements},e.useStripe=function(){return v("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(804))},804:function(e){"use strict";e.exports=window.React}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.i18n,r=window.wc.wcBlocksRegistry,o="woocommerce_payments",i=function(e){return("undefined"!=typeof wcpay_config?wcpay_config:wc.wcSettings.getSetting("woocommerce_payments_data"))[e]||null};function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(){function e(t,n){s(this,e),this.options=t,this.stripe=null,this.stripePlatform=null,this.request=n}return f(e,[{key:"getStripe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.options,n=t.publishableKey,r=t.accountId,o=t.forceNetworkSavedCards;return o&&!e?(this.stripePlatform||(this.stripePlatform=new Stripe(n)),this.stripePlatform):(this.stripe||(this.stripe=new Stripe(n,{stripeAccount:r})),this.stripe)}},{key:"generatePaymentMethodRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getStripe();return new(function(){function r(){s(this,r),this.args=d(d({},e),{},{billing_details:{address:{}}})}return f(r,[{key:"prepareValue",value:function(e,n){if(void 0!==n&&0!==n.length||(n=t[e]),void 0!==n&&0<n.length)return n}},{key:"setBillingDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details[e]=n)}},{key:"setAddressDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details.address[e]=n)}},{key:"send",value:function(){return n.createPaymentMethod(this.args).then((function(e){if(e.error)throw e.error;return e}))}}]),r}())}},{key:"confirmIntent",value:function(e,t){var n=this,r=e.match(/#wcpay-confirm-(pi|si):(.+):(.+):(.+)$/);if(!r)return!0;var o="si"===r[1],a=r[2],u=r[3];!function(e,t){if("undefined"!=typeof wcpay_config)wcpay_config[e]=t;else{var n=wc.wcSettings.getSetting("woocommerce_payments_data");n[e]=t,wc.wcSettings.setSetting("woocommerce_payments_data",n)}}("updateOrderStatusNonce",r[4]);var s=e.indexOf("order-pay"),l=-1<s,f=l&&e.substring(s).match(/\d+/);return f&&(a=f[0]),{request:(o?this.getStripe().confirmCardSetup(u):this.getStripe(!0).confirmCardPayment(u)).then((function(e){var r=e.paymentIntent&&e.paymentIntent.id||e.setupIntent&&e.setupIntent.id||e.error&&e.error.payment_intent&&e.error.payment_intent.id||e.error.setup_intent&&e.error.setup_intent.id;return[n.request(i("ajaxUrl"),{action:"update_order_status",order_id:a,_ajax_nonce:i("updateOrderStatusNonce"),intent_id:r,payment_method_id:t||null}),e.error]})).then((function(e){var t=c(e,2),n=t[0],r=t[1];if(r)throw r;return n.then((function(e){var t=JSON.parse(e);if(t.error)throw t.error;return t.return_url}))})),isOrderPage:l}}},{key:"setupIntent",value:function(e){var t=this;return this.request(i("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":e,_ajax_nonce:i("createSetupIntentNonce")}).then((function(e){if(!e.success)throw e.data.error;return"succeeded"===e.data.status?e.data:t.getStripe().confirmCardSetup(e.data.client_secret).then((function(e){var t=e.setupIntent,n=e.error;if(n)throw n;return t}))}))}}]),e}();function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=n(664);function v(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,c,"next",e)}function c(e){v(i,r,o,a,c,"throw",e)}a(void 0)}))}}var w=window.regeneratorRuntime,b=n.n(w),S=function(){var e=g(b().mark((function e(t,n,r){var i,a,c;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=t.generatePaymentMethodRequest(n)).setBillingDetail("name",(r.first_name+" "+r.last_name).trim()),i.setBillingDetail("email",r.email),i.setBillingDetail("phone",r.phone),i.setAddressDetail("city",r.city),i.setAddressDetail("country",r.country),i.setAddressDetail("line1",r.address_1),i.setAddressDetail("line2",r.address_2),i.setAddressDetail("postal_code",r.postcode),i.setAddressDetail("state",r.state),e.prev=10,e.next=13,i.send();case 13:return a=e.sent,c=a.paymentMethod.id,e.abrupt("return",{type:"success",meta:{paymentMethodData:{paymentMethod:o,"wcpay-payment-method":c}}});case 18:return e.prev=18,e.t0=e.catch(10),e.abrupt("return",{type:"error",message:e.t0.message});case 21:case"end":return e.stop()}}),e,null,[[10,18]])})));return function(t,n,r){return e.apply(this,arguments)}}();function _(){return(_=g(b().mark((function e(t,n,r){var o,i,a,c;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.redirect,e.prev=1,!0!==(i=t.confirmIntent(o))){e.next=5;break}return e.abrupt("return",{type:"success",redirectUrl:o});case 5:return a=i.request,e.next=8,a;case 8:return c=e.sent,e.abrupt("return",{type:"success",redirectUrl:c});case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",{type:"error",message:e.t0.message,messageContext:r.noticeContexts.PAYMENTS});case 15:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}var E=function(t){var n=t.api,r=t.activePaymentMethod,i=t.stripe,a=t.elements,u=t.billing.billingData,s=t.eventRegistration,l=s.onPaymentProcessing,f=s.onCheckoutAfterProcessingWithSuccess,p=t.emitResponse,d=c((0,e.useState)(null),2),m=d[0],y=d[1];return(0,e.useEffect)((function(){return l((function(){if(o===r){if(m)return{type:"error",message:m};var e=a.getElement(h.CardElement);return S(n,{type:"card",card:e},u)}}))}),[a,i,r]),(0,e.useEffect)((function(){return f((function(e){var t=e.processingResponse.paymentDetails;return function(e,t,n){return _.apply(this,arguments)}(n,t,p)}))}),[a,i]),(0,e.createElement)(h.CardElement,{options:{hidePostalCode:!0,classes:{base:"wcpay-card-mounted"}},onChange:function(e){var t=e.error;y(t?t.message:null)}})},O=function(t){var n=t.api,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["api"]);return(0,e.createElement)(h.Elements,{stripe:n.getStripe()},(0,e.createElement)(h.ElementsConsumer,null,(function(t){var o=t.elements,i=t.stripe;return(0,e.createElement)(E,y({api:n,elements:o,stripe:i},r))})))};function x(){return(x=g(b().mark((function e(t,n){var r,o,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o in r=new FormData,n)r.append(o,n[o]);return e.next=4,fetch(t,{method:"POST",body:r});case 4:return i=e.sent,e.abrupt("return",i.text());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var j="https://cdn.sift.com/s.js",k="https://js.stripe.com/v3",C={forter:function(e){var t=e.site_id;if(!document.querySelector('script[id="'+t+'"]')){var n=document.createElement("script");n.id=t,n.textContent="(function () {var eu = 'g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv';var siteId = \""+t+'";function t(t,e){for(var n=t.split(""),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join("")}function e(e){return t(e,-v).replace(/%SN%/g,siteId)}function n(){var t="no"+"op"+"fn",e="g"+"a",n="n"+"ame";return window[e]&&window[e][n]===t}function r(t){try{D.ex=t,n()&&D.ex.indexOf(S.uB)===-1&&(D.ex+=S.uB),y(D)}catch(e){}}function o(t,e,n,r){function o(e){try{e.blockedURI===t&&(r(!0),i=!0,document.removeEventListener("securitypolicyviolation",o))}catch(n){document.removeEventListener("securitypolicyviolation",o)}}var i=!1;t="https://"+t,document.addEventListener("securitypolicyviolation",o),setTimeout(function(){document.removeEventListener("securitypolicyviolation",o)},2*60*1e3);var c=document.createElement("script");c.onerror=function(){if(!i)try{r(!1),i=!0}catch(t){}},c.onload=n,c.type="text/javascript",c.id="ftr__script",c.async=!0,c.src=t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a)}function i(){I(S.uAL),setTimeout(c,w,S.uAL)}function c(t){try{var e=t===S.uDF?h:p,n=function(){try{b(),r(t+S.uS)}catch(e){}},c=function(e){try{b(),D.td=1*new Date-D.ts,r(e?t+S.uF+S.cP:t+S.uF),t===S.uDF&&i()}catch(n){r(S.eUoe)}};o(e,void 0,n,c)}catch(a){r(t+S.eTlu)}}var a={write:function(t,e,n,r){void 0===r&&(r=!0);var o,i;if(n?(o=new Date,o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()):i="",!r)return void(document.cookie=escape(t)+"="+escape(e)+i+"; path=/");var c,a,u;if(u=location.host,1===u.split(".").length)document.cookie=escape(t)+"="+escape(e)+i+"; path=/";else{a=u.split("."),a.shift(),c="."+a.join("."),document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c;var d=this.read(t);null!=d&&d==e||(c="."+u,document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c)}},read:function(t){var e=null;try{for(var n=escape(t)+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];" "==i.charAt(0);)i=i.substring(1,i.length);0===i.indexOf(n)&&(e=unescape(i.substring(n.length,i.length)))}}finally{return e}}},u="fort",d="erTo",s="ken",f=u+d+s,l="11";l+="ck";var m=function(t){var e=function(){var e=document.createElement("link");return e.setAttribute("rel","pre"+"con"+"nect"),e.setAttribute("cros"+"sori"+"gin","anonymous"),e.onload=function(){document.head.removeChild(e)},e.onerror=function(t){document.head.removeChild(e)},e.setAttribute("href",t),document.head.appendChild(e),e};if(document.head){var n=e();setTimeout(function(){document.head.removeChild(n)},3e3)}},v=3,h=e("(VQ(1fgq71iruwhu1frp2vq2(VQ(2vfulsw1mv"),p=e(eu||"g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv"),w=10;window.ftr__startScriptLoad=1*new Date;var g=function(t){var e=1e3,n="ft"+"r:tok"+"enR"+"eady";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+="_tt";var e=document.createEvent("Event");e.initEvent(n,!1,!1),e.detail=t,document.dispatchEvent(e)}catch(r){}},e)},y=function(t){var e=function(t){return t||""},n=e(t.id)+"_"+e(t.ts)+"_"+e(t.td)+"_"+e(t.ex)+"_"+e(l);a.write(f,n,1825,!0),g(n)},T=function(){var t=a.read(f)||"",e=t.split("_"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},_=function(){for(var t={},e="fgu",n=[],r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);var o=function(t,e,r,o,i){var c=i?"-":"";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+c+n[255&e]+n[e>>8&255]+c+n[e>>16&15|64]+n[e>>24&255]+c+n[63&r|128]+n[r>>8&255]+c+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},c=function(){var t="",e=function(t,e){for(var n="",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,"0123456789"),t+=e(1,"123456789"),t+=e(8,"0123456789")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(n){try{return e+c()}catch(n){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),S={uDF:"UDF",uAL:"UAL",mLd:"1",eTlu:"2",eUoe:"3",uS:"4",uF:"9",tmos:["T5","T10","T15","T30","T60"],tmosSecs:[5,10,15,30,60],bIR:"43",uB:"u",cP:"c"},k=function(t,e){for(var n=S.tmos,r=0;r<n.length;r++)if(t+n[r]===e)return!0;return!1};try{var D=T();try{D.id&&(_.isValidNumericalToken(D.id)||_.isValidUUIDToken(D.id)||_.isValidFGUToken(D.id))?window.ftr__ncd=!1:(D.id=_.safeGenerateNoDash(),window.ftr__ncd=!0),D.ts=window.ftr__startScriptLoad,y(D);for(var x="for"+"ter"+".co"+"m",A="ht"+"tps://c"+"dn9."+x,U="ht"+"tps://"+D.id+"-"+siteId+".cd"+"n."+x,F="http"+"s://cd"+"n3."+x,L=[A,U,F],E=0;E<L.length;E++)m(L[E]);var V=new Array(S.tmosSecs.length),I=function(t){for(var e=0;e<S.tmosSecs.length;e++)V[e]=setTimeout(r,1e3*S.tmosSecs[e],t+S.tmos[e])},b=function(){for(var t=0;t<S.tmosSecs.length;t++)clearTimeout(V[t])};k(S.uDF,D.ex)?i():(I(S.uDF),setTimeout(c,w,S.uDF))}catch(C){r(S.mLd)}}catch(C){}})()',document.body.appendChild(n)}},sift:function(e){var t=e.beacon_key,n=e.session_id,r=e.user_id,o=window._sift=window._sift||[];if(o.push(["_setAccount",t]),o.push(["_setUserId",r]),o.push(["_setSessionId",n]),o.push(["_trackPageview"]),!document.querySelector('[src="'.concat(j,'"]'))){var i=document.createElement("script");i.src=j,i.async=!0,document.body.appendChild(i)}},stripe:function(){if(!document.querySelector('[src^="'.concat(k,'"]'))){var e=document.createElement("script");e.src=k,e.async=!0,document.body.appendChild(e)}}},P=new m({publishableKey:i("publishableKey"),accountId:i("accountId"),forceNetworkSavedCards:i("forceNetworkSavedCards")},(function(e,t){return x.apply(this,arguments)}));(0,r.registerPaymentMethod)((function(n){return new n({name:o,content:(0,e.createElement)(O,{api:P}),edit:(0,e.createElement)(O,{api:P}),canMakePayment:function(){return!!P.getStripe()},paymentMethodId:o,label:(0,t.__)("Credit Card","woocommerce-payments"),ariaLabel:(0,t.__)("Credit Card","woocommerce-payments"),supports:{features:i("features")}})})),window.addEventListener("load",(function(){!function(e){for(var t in e){var n=C[t];n&&e[t]&&n(e[t])}}(i("fraudServices"))}))}()}();
1
+ !function(){var e={664:function(e,t,n){!function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t=t&&t.hasOwnProperty("default")?t.default:t;function i(){}function a(){}a.resetWarningCache=i;var c,u=(function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}()}(c={exports:{}},c.exports),c.exports),s=function(e){return null!==e&&"object"===n(e)},l="[object Object]",f=function e(t,n){if(!s(t)||!s(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===l;if(o!==(Object.prototype.toString.call(n)===l))return!1;if(!o&&!r)return!1;var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var c={},u=0;u<i.length;u+=1)c[i[u]]=!0;for(var f=0;f<a.length;f+=1)c[a[f]]=!0;var p=Object.keys(c);if(p.length!==i.length)return!1;var d=t,m=n;return p.every((function(t){return e(d[t],m[t])}))},p=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},d=function(e){if(null===e||s(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},m=function(e){if(function(e){return s(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(d)};var t=d(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},y=t.createContext(null);y.displayName="ElementsContext";var h=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useRef(!1),c=t.useRef(!0),u=t.useMemo((function(){return m(n)}),[n]),s=o(t.useState((function(){return{stripe:null,elements:null}})),2),l=s[0],d=s[1],h=p(n),v=p(r);return null!==h&&(h!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),f(r,v)||console.warn("Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.")),a.current||("sync"===u.tag&&(a.current=!0,d({stripe:u.stripe,elements:u.stripe.elements(r)})),"async"===u.tag&&(a.current=!0,u.stripePromise.then((function(e){e&&c.current&&d({stripe:e,elements:e.elements(r)})})))),t.useEffect((function(){return function(){c.current=!1}}),[]),t.useEffect((function(){var e=l.stripe;e&&e._registerWrapper&&e._registerWrapper({name:"react-stripe-js",version:"1.1.2"})}),[l.stripe]),t.createElement(y.Provider,{value:l},i)};h.propTypes={stripe:u.any,options:u.object};var v=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(y),e)},g=function(e){return(0,e.children)(v("mounts <ElementsConsumer>"))};g.propTypes={children:u.func.isRequired};var w=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),function(){n.current&&n.current.apply(n,arguments)}},b=function(e){return s(e)?(e.paymentRequest,r(e,["paymentRequest"])):{}},S=function(){},_=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),i=n?function(e){v("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r=n.id,i=n.className,a=n.options,c=void 0===a?{}:a,u=n.onBlur,s=void 0===u?S:u,l=n.onFocus,p=void 0===l?S:l,d=n.onReady,m=void 0===d?S:d,y=n.onChange,h=void 0===y?S:y,g=n.onEscape,_=void 0===g?S:g,E=n.onClick,O=void 0===E?S:E,x=v("mounts <".concat(o,">")).elements,j=t.useRef(null),k=t.useRef(null),C=w(m),P=w(s),D=w(p),T=w(O),A=w(h),I=w(_);t.useLayoutEffect((function(){if(null==j.current&&x&&null!=k.current){var t=x.create(e,c);j.current=t,t.mount(k.current),t.on("ready",(function(){return C(t)})),t.on("change",A),t.on("blur",P),t.on("focus",D),t.on("escape",I),t.on("click",T)}}));var R=t.useRef(c);return t.useEffect((function(){R.current&&R.current.paymentRequest!==c.paymentRequest&&console.warn("Unsupported prop change: options.paymentRequest is not a customizable property.");var e=b(c);0===Object.keys(e).length||f(e,b(R.current))||j.current&&(j.current.update(e),R.current=c)}),[c]),t.useEffect((function(){return function(){j.current&&j.current.destroy()}}),[]),t.createElement("div",{id:r,className:i,ref:k})};return i.propTypes={id:u.string,className:u.string,onChange:u.func,onBlur:u.func,onFocus:u.func,onReady:u.func,onClick:u.func,options:u.object},i.displayName=o,i.__elementType=e,i},E="undefined"==typeof window,O=_("auBankAccount",E),x=_("card",E),j=_("cardNumber",E),k=_("cardExpiry",E),C=_("cardCvc",E),P=_("fpxBank",E),D=_("iban",E),T=_("idealBank",E),A=_("paymentRequestButton",E);e.AuBankAccountElement=O,e.CardCvcElement=C,e.CardElement=x,e.CardExpiryElement=k,e.CardNumberElement=j,e.Elements=h,e.ElementsConsumer=g,e.FpxBankElement=P,e.IbanElement=D,e.IdealBankElement=T,e.PaymentRequestButtonElement=A,e.useElements=function(){return v("calls useElements()").elements},e.useStripe=function(){return v("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(804))},804:function(e){"use strict";e.exports=window.React}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.i18n,r=window.wc.wcBlocksRegistry,o="woocommerce_payments",i=function(e){return("undefined"!=typeof wcpay_config?wcpay_config:wc.wcSettings.getSetting("woocommerce_payments_data"))[e]||null};function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(){function e(t,n){s(this,e),this.options=t,this.stripe=null,this.stripePlatform=null,this.request=n}return f(e,[{key:"getStripe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.options,n=t.publishableKey,r=t.accountId,o=t.forceNetworkSavedCards;return o&&!e?(this.stripePlatform||(this.stripePlatform=new Stripe(n)),this.stripePlatform):(this.stripe||(this.stripe=new Stripe(n,{stripeAccount:r})),this.stripe)}},{key:"generatePaymentMethodRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getStripe();return new(function(){function r(){s(this,r),this.args=d(d({},e),{},{billing_details:{address:{}}})}return f(r,[{key:"prepareValue",value:function(e,n){if(void 0!==n&&0!==n.length||(n=t[e]),void 0!==n&&0<n.length)return n}},{key:"setBillingDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details[e]=n)}},{key:"setAddressDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details.address[e]=n)}},{key:"send",value:function(){return n.createPaymentMethod(this.args).then((function(e){if(e.error)throw e.error;return e}))}}]),r}())}},{key:"confirmIntent",value:function(e,t){var n=this,r=e.match(/#wcpay-confirm-(pi|si):(.+):(.+):(.+)$/);if(!r)return!0;var o="si"===r[1],a=r[2],u=r[3],s=r[4],l=e.indexOf("order-pay"),f=-1<l,p=f&&e.substring(l).match(/\d+/);return p&&(a=p[0]),{request:(o?this.getStripe().confirmCardSetup(u):this.getStripe(!0).confirmCardPayment(u)).then((function(e){var r=e.paymentIntent&&e.paymentIntent.id||e.setupIntent&&e.setupIntent.id||e.error&&e.error.payment_intent&&e.error.payment_intent.id||e.error.setup_intent&&e.error.setup_intent.id;return[n.request(i("ajaxUrl"),{action:"update_order_status",order_id:a,_ajax_nonce:s,intent_id:r,payment_method_id:t||null}),e.error]})).then((function(e){var t=c(e,2),n=t[0],r=t[1];if(r)throw r;return n.then((function(e){var t=JSON.parse(e);if(t.error)throw t.error;return t.return_url}))})),isOrderPage:f}}},{key:"setupIntent",value:function(e){var t=this;return this.request(i("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":e,_ajax_nonce:i("createSetupIntentNonce")}).then((function(e){if(!e.success)throw e.data.error;return"succeeded"===e.data.status?e.data:t.getStripe().confirmCardSetup(e.data.client_secret).then((function(e){var t=e.setupIntent,n=e.error;if(n)throw n;return t}))}))}}]),e}();function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=n(664);function v(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,c,"next",e)}function c(e){v(i,r,o,a,c,"throw",e)}a(void 0)}))}}var w=window.regeneratorRuntime,b=n.n(w),S=function(){var e=g(b().mark((function e(t,n,r){var i,a,c;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=t.generatePaymentMethodRequest(n)).setBillingDetail("name",(r.first_name+" "+r.last_name).trim()),i.setBillingDetail("email",r.email),i.setBillingDetail("phone",r.phone),i.setAddressDetail("city",r.city),i.setAddressDetail("country",r.country),i.setAddressDetail("line1",r.address_1),i.setAddressDetail("line2",r.address_2),i.setAddressDetail("postal_code",r.postcode),i.setAddressDetail("state",r.state),e.prev=10,e.next=13,i.send();case 13:return a=e.sent,c=a.paymentMethod.id,e.abrupt("return",{type:"success",meta:{paymentMethodData:{paymentMethod:o,"wcpay-payment-method":c}}});case 18:return e.prev=18,e.t0=e.catch(10),e.abrupt("return",{type:"error",message:e.t0.message});case 21:case"end":return e.stop()}}),e,null,[[10,18]])})));return function(t,n,r){return e.apply(this,arguments)}}();function _(){return(_=g(b().mark((function e(t,n,r){var o,i,a,c;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.redirect,e.prev=1,!0!==(i=t.confirmIntent(o))){e.next=5;break}return e.abrupt("return",{type:"success",redirectUrl:o});case 5:return a=i.request,e.next=8,a;case 8:return c=e.sent,e.abrupt("return",{type:"success",redirectUrl:c});case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",{type:"error",message:e.t0.message,messageContext:r.noticeContexts.PAYMENTS});case 15:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}var E=function(t){var n=t.api,r=t.activePaymentMethod,i=t.stripe,a=t.elements,u=t.billing.billingData,s=t.eventRegistration,l=s.onPaymentProcessing,f=s.onCheckoutAfterProcessingWithSuccess,p=t.emitResponse,d=c((0,e.useState)(null),2),m=d[0],y=d[1];return(0,e.useEffect)((function(){return l((function(){if(o===r){if(m)return{type:"error",message:m};var e=a.getElement(h.CardElement);return S(n,{type:"card",card:e},u)}}))}),[a,i,r]),(0,e.useEffect)((function(){return f((function(e){var t=e.processingResponse.paymentDetails;return function(e,t,n){return _.apply(this,arguments)}(n,t,p)}))}),[a,i]),(0,e.createElement)(h.CardElement,{options:{hidePostalCode:!0,classes:{base:"wcpay-card-mounted"}},onChange:function(e){var t=e.error;y(t?t.message:null)}})},O=function(t){var n=t.api,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["api"]);return(0,e.createElement)(h.Elements,{stripe:n.getStripe()},(0,e.createElement)(h.ElementsConsumer,null,(function(t){var o=t.elements,i=t.stripe;return(0,e.createElement)(E,y({api:n,elements:o,stripe:i},r))})))};function x(){return(x=g(b().mark((function e(t,n){var r,o,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o in r=new FormData,n)r.append(o,n[o]);return e.next=4,fetch(t,{method:"POST",body:r});case 4:return i=e.sent,e.abrupt("return",i.text());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var j="https://cdn.sift.com/s.js",k="https://js.stripe.com/v3",C={forter:function(e){var t=e.site_id;if(!document.querySelector('script[id="'+t+'"]')){var n=document.createElement("script");n.id=t,n.textContent="(function () {var eu = 'g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv';var siteId = \""+t+'";function t(t,e){for(var n=t.split(""),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join("")}function e(e){return t(e,-v).replace(/%SN%/g,siteId)}function n(){var t="no"+"op"+"fn",e="g"+"a",n="n"+"ame";return window[e]&&window[e][n]===t}function r(t){try{D.ex=t,n()&&D.ex.indexOf(S.uB)===-1&&(D.ex+=S.uB),y(D)}catch(e){}}function o(t,e,n,r){function o(e){try{e.blockedURI===t&&(r(!0),i=!0,document.removeEventListener("securitypolicyviolation",o))}catch(n){document.removeEventListener("securitypolicyviolation",o)}}var i=!1;t="https://"+t,document.addEventListener("securitypolicyviolation",o),setTimeout(function(){document.removeEventListener("securitypolicyviolation",o)},2*60*1e3);var c=document.createElement("script");c.onerror=function(){if(!i)try{r(!1),i=!0}catch(t){}},c.onload=n,c.type="text/javascript",c.id="ftr__script",c.async=!0,c.src=t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a)}function i(){I(S.uAL),setTimeout(c,w,S.uAL)}function c(t){try{var e=t===S.uDF?h:p,n=function(){try{b(),r(t+S.uS)}catch(e){}},c=function(e){try{b(),D.td=1*new Date-D.ts,r(e?t+S.uF+S.cP:t+S.uF),t===S.uDF&&i()}catch(n){r(S.eUoe)}};o(e,void 0,n,c)}catch(a){r(t+S.eTlu)}}var a={write:function(t,e,n,r){void 0===r&&(r=!0);var o,i;if(n?(o=new Date,o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()):i="",!r)return void(document.cookie=escape(t)+"="+escape(e)+i+"; path=/");var c,a,u;if(u=location.host,1===u.split(".").length)document.cookie=escape(t)+"="+escape(e)+i+"; path=/";else{a=u.split("."),a.shift(),c="."+a.join("."),document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c;var d=this.read(t);null!=d&&d==e||(c="."+u,document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c)}},read:function(t){var e=null;try{for(var n=escape(t)+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];" "==i.charAt(0);)i=i.substring(1,i.length);0===i.indexOf(n)&&(e=unescape(i.substring(n.length,i.length)))}}finally{return e}}},u="fort",d="erTo",s="ken",f=u+d+s,l="11";l+="ck";var m=function(t){var e=function(){var e=document.createElement("link");return e.setAttribute("rel","pre"+"con"+"nect"),e.setAttribute("cros"+"sori"+"gin","anonymous"),e.onload=function(){document.head.removeChild(e)},e.onerror=function(t){document.head.removeChild(e)},e.setAttribute("href",t),document.head.appendChild(e),e};if(document.head){var n=e();setTimeout(function(){document.head.removeChild(n)},3e3)}},v=3,h=e("(VQ(1fgq71iruwhu1frp2vq2(VQ(2vfulsw1mv"),p=e(eu||"g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv"),w=10;window.ftr__startScriptLoad=1*new Date;var g=function(t){var e=1e3,n="ft"+"r:tok"+"enR"+"eady";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+="_tt";var e=document.createEvent("Event");e.initEvent(n,!1,!1),e.detail=t,document.dispatchEvent(e)}catch(r){}},e)},y=function(t){var e=function(t){return t||""},n=e(t.id)+"_"+e(t.ts)+"_"+e(t.td)+"_"+e(t.ex)+"_"+e(l);a.write(f,n,1825,!0),g(n)},T=function(){var t=a.read(f)||"",e=t.split("_"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},_=function(){for(var t={},e="fgu",n=[],r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);var o=function(t,e,r,o,i){var c=i?"-":"";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+c+n[255&e]+n[e>>8&255]+c+n[e>>16&15|64]+n[e>>24&255]+c+n[63&r|128]+n[r>>8&255]+c+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},c=function(){var t="",e=function(t,e){for(var n="",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,"0123456789"),t+=e(1,"123456789"),t+=e(8,"0123456789")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(n){try{return e+c()}catch(n){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),S={uDF:"UDF",uAL:"UAL",mLd:"1",eTlu:"2",eUoe:"3",uS:"4",uF:"9",tmos:["T5","T10","T15","T30","T60"],tmosSecs:[5,10,15,30,60],bIR:"43",uB:"u",cP:"c"},k=function(t,e){for(var n=S.tmos,r=0;r<n.length;r++)if(t+n[r]===e)return!0;return!1};try{var D=T();try{D.id&&(_.isValidNumericalToken(D.id)||_.isValidUUIDToken(D.id)||_.isValidFGUToken(D.id))?window.ftr__ncd=!1:(D.id=_.safeGenerateNoDash(),window.ftr__ncd=!0),D.ts=window.ftr__startScriptLoad,y(D);for(var x="for"+"ter"+".co"+"m",A="ht"+"tps://c"+"dn9."+x,U="ht"+"tps://"+D.id+"-"+siteId+".cd"+"n."+x,F="http"+"s://cd"+"n3."+x,L=[A,U,F],E=0;E<L.length;E++)m(L[E]);var V=new Array(S.tmosSecs.length),I=function(t){for(var e=0;e<S.tmosSecs.length;e++)V[e]=setTimeout(r,1e3*S.tmosSecs[e],t+S.tmos[e])},b=function(){for(var t=0;t<S.tmosSecs.length;t++)clearTimeout(V[t])};k(S.uDF,D.ex)?i():(I(S.uDF),setTimeout(c,w,S.uDF))}catch(C){r(S.mLd)}}catch(C){}})()',document.body.appendChild(n)}},sift:function(e){var t=e.beacon_key,n=e.session_id,r=e.user_id,o=window._sift=window._sift||[];if(o.push(["_setAccount",t]),o.push(["_setUserId",r]),o.push(["_setSessionId",n]),o.push(["_trackPageview"]),!document.querySelector('[src="'.concat(j,'"]'))){var i=document.createElement("script");i.src=j,i.async=!0,document.body.appendChild(i)}},stripe:function(){if(!document.querySelector('[src^="'.concat(k,'"]'))){var e=document.createElement("script");e.src=k,e.async=!0,document.body.appendChild(e)}}},P=new m({publishableKey:i("publishableKey"),accountId:i("accountId"),forceNetworkSavedCards:i("forceNetworkSavedCards")},(function(e,t){return x.apply(this,arguments)}));(0,r.registerPaymentMethod)((function(n){return new n({name:o,content:(0,e.createElement)(O,{api:P}),edit:(0,e.createElement)(O,{api:P}),canMakePayment:function(){return!!P.getStripe()},paymentMethodId:o,label:(0,t.__)("Credit Card","woocommerce-payments"),ariaLabel:(0,t.__)("Credit Card","woocommerce-payments"),supports:{features:i("features")}})})),window.addEventListener("load",(function(){!function(e){for(var t in e){var n=C[t];n&&e[t]&&n(e[t])}}(i("fraudServices"))}))}()}();
dist/checkout.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'c4f0ab2a7a0664fdd7b3b3838ab8e854');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => '9ef58f0c1b6a0524d5410c0b7323c941');
dist/checkout.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e=function(e){return("undefined"!=typeof wcpay_config?wcpay_config:wc.wcSettings.getSetting("woocommerce_payments_data"))[e]||null};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s=function(){function n(e,t){r(this,n),this.options=e,this.stripe=null,this.stripePlatform=null,this.request=t}return i(n,[{key:"getStripe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.options,n=t.publishableKey,r=t.accountId,o=t.forceNetworkSavedCards;return o&&!e?(this.stripePlatform||(this.stripePlatform=new Stripe(n)),this.stripePlatform):(this.stripe||(this.stripe=new Stripe(n,{stripeAccount:r})),this.stripe)}},{key:"generatePaymentMethodRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getStripe();return new(function(){function o(){r(this,o),this.args=c(c({},e),{},{billing_details:{address:{}}})}return i(o,[{key:"prepareValue",value:function(e,n){if(void 0!==n&&0!==n.length||(n=t[e]),void 0!==n&&0<n.length)return n}},{key:"setBillingDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details[e]=n)}},{key:"setAddressDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details.address[e]=n)}},{key:"send",value:function(){return n.createPaymentMethod(this.args).then((function(e){if(e.error)throw e.error;return e}))}}]),o}())}},{key:"confirmIntent",value:function(n,r){var o=this,i=n.match(/#wcpay-confirm-(pi|si):(.+):(.+):(.+)$/);if(!i)return!0;var a="si"===i[1],c=i[2],s=i[3];!function(e,t){if("undefined"!=typeof wcpay_config)wcpay_config[e]=t;else{var n=wc.wcSettings.getSetting("woocommerce_payments_data");n[e]=t,wc.wcSettings.setSetting("woocommerce_payments_data",n)}}("updateOrderStatusNonce",i[4]);var u=n.indexOf("order-pay"),d=-1<u,l=d&&n.substring(u).match(/\d+/);return l&&(c=l[0]),{request:(a?this.getStripe().confirmCardSetup(s):this.getStripe(!0).confirmCardPayment(s)).then((function(t){var n=t.paymentIntent&&t.paymentIntent.id||t.setupIntent&&t.setupIntent.id||t.error&&t.error.payment_intent&&t.error.payment_intent.id||t.error.setup_intent&&t.error.setup_intent.id;return[o.request(e("ajaxUrl"),{action:"update_order_status",order_id:c,_ajax_nonce:e("updateOrderStatusNonce"),intent_id:n,payment_method_id:r||null}),t.error]})).then((function(e){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];if(a)throw a;return i.then((function(e){var t=JSON.parse(e);if(t.error)throw t.error;return t.return_url}))})),isOrderPage:d}}},{key:"setupIntent",value:function(t){var n=this;return this.request(e("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":t,_ajax_nonce:e("createSetupIntentNonce")}).then((function(e){if(!e.success)throw e.data.error;return"succeeded"===e.data.status?e.data:n.getStripe().confirmCardSetup(e.data.client_secret).then((function(e){var t=e.setupIntent,n=e.error;if(n)throw n;return t}))}))}}]),n}(),u="https://cdn.sift.com/s.js",d="https://js.stripe.com/v3",l={forter:function(e){var t=e.site_id;if(!document.querySelector('script[id="'+t+'"]')){var n=document.createElement("script");n.id=t,n.textContent="(function () {var eu = 'g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv';var siteId = \""+t+'";function t(t,e){for(var n=t.split(""),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join("")}function e(e){return t(e,-v).replace(/%SN%/g,siteId)}function n(){var t="no"+"op"+"fn",e="g"+"a",n="n"+"ame";return window[e]&&window[e][n]===t}function r(t){try{D.ex=t,n()&&D.ex.indexOf(S.uB)===-1&&(D.ex+=S.uB),y(D)}catch(e){}}function o(t,e,n,r){function o(e){try{e.blockedURI===t&&(r(!0),i=!0,document.removeEventListener("securitypolicyviolation",o))}catch(n){document.removeEventListener("securitypolicyviolation",o)}}var i=!1;t="https://"+t,document.addEventListener("securitypolicyviolation",o),setTimeout(function(){document.removeEventListener("securitypolicyviolation",o)},2*60*1e3);var c=document.createElement("script");c.onerror=function(){if(!i)try{r(!1),i=!0}catch(t){}},c.onload=n,c.type="text/javascript",c.id="ftr__script",c.async=!0,c.src=t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a)}function i(){I(S.uAL),setTimeout(c,w,S.uAL)}function c(t){try{var e=t===S.uDF?h:p,n=function(){try{b(),r(t+S.uS)}catch(e){}},c=function(e){try{b(),D.td=1*new Date-D.ts,r(e?t+S.uF+S.cP:t+S.uF),t===S.uDF&&i()}catch(n){r(S.eUoe)}};o(e,void 0,n,c)}catch(a){r(t+S.eTlu)}}var a={write:function(t,e,n,r){void 0===r&&(r=!0);var o,i;if(n?(o=new Date,o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()):i="",!r)return void(document.cookie=escape(t)+"="+escape(e)+i+"; path=/");var c,a,u;if(u=location.host,1===u.split(".").length)document.cookie=escape(t)+"="+escape(e)+i+"; path=/";else{a=u.split("."),a.shift(),c="."+a.join("."),document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c;var d=this.read(t);null!=d&&d==e||(c="."+u,document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c)}},read:function(t){var e=null;try{for(var n=escape(t)+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];" "==i.charAt(0);)i=i.substring(1,i.length);0===i.indexOf(n)&&(e=unescape(i.substring(n.length,i.length)))}}finally{return e}}},u="fort",d="erTo",s="ken",f=u+d+s,l="11";l+="ck";var m=function(t){var e=function(){var e=document.createElement("link");return e.setAttribute("rel","pre"+"con"+"nect"),e.setAttribute("cros"+"sori"+"gin","anonymous"),e.onload=function(){document.head.removeChild(e)},e.onerror=function(t){document.head.removeChild(e)},e.setAttribute("href",t),document.head.appendChild(e),e};if(document.head){var n=e();setTimeout(function(){document.head.removeChild(n)},3e3)}},v=3,h=e("(VQ(1fgq71iruwhu1frp2vq2(VQ(2vfulsw1mv"),p=e(eu||"g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv"),w=10;window.ftr__startScriptLoad=1*new Date;var g=function(t){var e=1e3,n="ft"+"r:tok"+"enR"+"eady";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+="_tt";var e=document.createEvent("Event");e.initEvent(n,!1,!1),e.detail=t,document.dispatchEvent(e)}catch(r){}},e)},y=function(t){var e=function(t){return t||""},n=e(t.id)+"_"+e(t.ts)+"_"+e(t.td)+"_"+e(t.ex)+"_"+e(l);a.write(f,n,1825,!0),g(n)},T=function(){var t=a.read(f)||"",e=t.split("_"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},_=function(){for(var t={},e="fgu",n=[],r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);var o=function(t,e,r,o,i){var c=i?"-":"";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+c+n[255&e]+n[e>>8&255]+c+n[e>>16&15|64]+n[e>>24&255]+c+n[63&r|128]+n[r>>8&255]+c+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},c=function(){var t="",e=function(t,e){for(var n="",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,"0123456789"),t+=e(1,"123456789"),t+=e(8,"0123456789")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(n){try{return e+c()}catch(n){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),S={uDF:"UDF",uAL:"UAL",mLd:"1",eTlu:"2",eUoe:"3",uS:"4",uF:"9",tmos:["T5","T10","T15","T30","T60"],tmosSecs:[5,10,15,30,60],bIR:"43",uB:"u",cP:"c"},k=function(t,e){for(var n=S.tmos,r=0;r<n.length;r++)if(t+n[r]===e)return!0;return!1};try{var D=T();try{D.id&&(_.isValidNumericalToken(D.id)||_.isValidUUIDToken(D.id)||_.isValidFGUToken(D.id))?window.ftr__ncd=!1:(D.id=_.safeGenerateNoDash(),window.ftr__ncd=!0),D.ts=window.ftr__startScriptLoad,y(D);for(var x="for"+"ter"+".co"+"m",A="ht"+"tps://c"+"dn9."+x,U="ht"+"tps://"+D.id+"-"+siteId+".cd"+"n."+x,F="http"+"s://cd"+"n3."+x,L=[A,U,F],E=0;E<L.length;E++)m(L[E]);var V=new Array(S.tmosSecs.length),I=function(t){for(var e=0;e<S.tmosSecs.length;e++)V[e]=setTimeout(r,1e3*S.tmosSecs[e],t+S.tmos[e])},b=function(){for(var t=0;t<S.tmosSecs.length;t++)clearTimeout(V[t])};k(S.uDF,D.ex)?i():(I(S.uDF),setTimeout(c,w,S.uDF))}catch(C){r(S.mLd)}}catch(C){}})()',document.body.appendChild(n)}},sift:function(e){var t=e.beacon_key,n=e.session_id,r=e.user_id,o=window._sift=window._sift||[];if(o.push(["_setAccount",t]),o.push(["_setUserId",r]),o.push(["_setSessionId",n]),o.push(["_trackPageview"]),!document.querySelector('[src="'.concat(u,'"]'))){var i=document.createElement("script");i.src=u,i.async=!0,document.body.appendChild(i)}},stripe:function(){if(!document.querySelector('[src^="'.concat(d,'"]'))){var e=document.createElement("script");e.src=d,e.async=!0,document.body.appendChild(e)}}};jQuery((function(t){!function(e){for(var t in e){var n=l[t];n&&e[t]&&n(e[t])}}(e("fraudServices"));var n=e("publishableKey");if(n){var r=new s({publishableKey:n,accountId:e("accountId"),forceNetworkSavedCards:e("forceNetworkSavedCards")},(function(e,t){return new Promise((function(n,r){jQuery.post(e,t).then(n).fail(r)}))})),o=r.getStripe().elements(),i={},a=o.create("card",{hidePostalCode:!0,classes:{base:"wcpay-card-mounted"}}),c={type:"card",card:a},u=o.create("iban",{supportedCountries:["SEPA"],classes:{base:"wcpay-sepa-mounted"}}),d={type:"sepa_debit",sepa_debit:u},m=function(){return t("#payment_method_woocommerce_payments_sepa").is(":checked")};t(document.body).on("updated_checkout",(function(){t("#wcpay-card-element").length&&!t("#wcpay-card-element").children().length&&(a.unmount(),a.mount("#wcpay-card-element"),t("#wcpay-sepa-element").length&&u.mount("#wcpay-sepa-element"))})),(t("form#add_payment_method").length||t("form#order_review").length)&&(a.mount("#wcpay-card-element"),t("#wcpay-sepa-element").length&&u.mount("#wcpay-sepa-element")),a.addEventListener("change",(function(e){var n=t("#wcpay-errors");e.error?n.html('<ul class="woocommerce-error"><li /></ul>').find("li").text(e.error.message):n.empty()})),u.addEventListener("change",(function(e){var n=t("#wcpay-sepa-errors");e.error?n.html('<ul class="woocommerce-error"><li /></ul>').find("li").text(e.error.message):n.empty()}));var p,f=function(e){e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},h=function(e){var n='<ul class="woocommerce-error" role="alert">'+e+"</ul>",r=t(".woocommerce-notices-wrapper, form.checkout").first();if(r.length){t(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),r.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+n+"</div>"),r.find(".input-text, select, input:checkbox").trigger("validate").blur();var o=t(".woocommerce-NoticeGroup-checkout");o.length||(o=r),t.scroll_to_notices(o),t(document.body).trigger("checkout_error")}},v=function(e,n){r.setupIntent(n.id).then((function(n){e.append(t('<input type="hidden" />').attr("id","wcpay-setup-intent").attr("name","wcpay-setup-intent").val(n.id));var r=t.blockUI.defaults.ignoreIfBlocked;t.blockUI.defaults.ignoreIfBlocked=!0,e.removeClass("processing").submit(),t.blockUI.defaults.ignoreIfBlocked=r})).catch((function(t){p=null,e.removeClass("processing").unblock(),h(t.message)}))},y=function(e,n){var r=n.id,o=m()?"#wcpay-payment-method-sepa":"#wcpay-payment-method";t(o).val(r),e.removeClass("processing").submit()},w=function(e,n,o,a){if(!p){f(e);var c=r.generatePaymentMethodRequest(a,i);return o&&(c.setBillingDetail("name",(t("#billing_first_name").val()+" "+t("#billing_last_name").val()).trim()),c.setBillingDetail("email",t("#billing_email").val()),c.setBillingDetail("phone",t("#billing_phone").val()),c.setAddressDetail("city",t("#billing_city").val()),c.setAddressDetail("country",t("#billing_country").val()),c.setAddressDetail("line1",t("#billing_address_1").val()),c.setAddressDetail("line2",t("#billing_address_2").val()),c.setAddressDetail("postal_code",t("#billing_postcode").val()),c.setAddressDetail("state",t("#billing_state").val())),c.send().then((function(t){var r=t.paymentMethod;p=!0,n(e,r)})).catch((function(t){e.removeClass("processing").unblock(),h(t.message)})),!1}p=null},g=function(){var n=m()?t("#wcpay-payment-method-sepa").val():t("#wcpay-payment-method").val(),o=t("#wc-woocommerce_payments-new-payment-method").is(":checked"),i=r.confirmIntent(window.location.href,o?n:null);if(!0!==i){var a=i.request;i.isOrderPage&&(f(t("#order_review")),t("#payment").hide(500)),history.replaceState("",document.title,window.location.pathname+window.location.search),a.then((function(e){window.location=e})).catch((function(n){t("form.checkout").removeClass("processing").unblock(),t("#order_review").removeClass("processing").unblock(),t("#payment").show(500);var r=n.message;n instanceof Error&&(r=e("genericErrorMessage")),h(r)}))}};t("form.checkout").on("checkout_place_order_woocommerce_payments checkout_place_order_woocommerce_payments_sepa",(function(){if(!_())return w(t(this),y,!0,m()?d:c)})),t("#order_review").on("submit",(function(){if(!_()&&(t("#payment_method_woocommerce_payments").is(":checked")||m()))return w(t("#order_review"),y,!0,m()?d:c)})),t("form#add_payment_method").on("submit",(function(){if(!t("#wcpay-setup-intent").val())return w(t("form#add_payment_method"),v,!1,m()?d:c)})),g(),window.addEventListener("hashchange",(function(){window.location.hash.startsWith("#wcpay-confirm-")&&g()}))}function _(){return m()?t("#wc-woocommerce_payments-payment-sepa-token-new").length&&!t("#wc-woocommerce_payments-payment-sepa-token-new").is(":checked"):t("#wc-woocommerce_payments-payment-token-new").length&&!t("#wc-woocommerce_payments-payment-token-new").is(":checked")}}))}();
1
+ !function(){"use strict";var e=function(e){return("undefined"!=typeof wcpay_config?wcpay_config:wc.wcSettings.getSetting("woocommerce_payments_data"))[e]||null};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s=function(){function n(e,t){r(this,n),this.options=e,this.stripe=null,this.stripePlatform=null,this.request=t}return i(n,[{key:"getStripe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.options,n=t.publishableKey,r=t.accountId,o=t.forceNetworkSavedCards;return o&&!e?(this.stripePlatform||(this.stripePlatform=new Stripe(n)),this.stripePlatform):(this.stripe||(this.stripe=new Stripe(n,{stripeAccount:r})),this.stripe)}},{key:"generatePaymentMethodRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getStripe();return new(function(){function o(){r(this,o),this.args=c(c({},e),{},{billing_details:{address:{}}})}return i(o,[{key:"prepareValue",value:function(e,n){if(void 0!==n&&0!==n.length||(n=t[e]),void 0!==n&&0<n.length)return n}},{key:"setBillingDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details[e]=n)}},{key:"setAddressDetail",value:function(e,t){var n=this.prepareValue(e,t);void 0!==n&&(this.args.billing_details.address[e]=n)}},{key:"send",value:function(){return n.createPaymentMethod(this.args).then((function(e){if(e.error)throw e.error;return e}))}}]),o}())}},{key:"confirmIntent",value:function(n,r){var o=this,i=n.match(/#wcpay-confirm-(pi|si):(.+):(.+):(.+)$/);if(!i)return!0;var a="si"===i[1],c=i[2],s=i[3],u=i[4],d=n.indexOf("order-pay"),l=-1<d,m=l&&n.substring(d).match(/\d+/);return m&&(c=m[0]),{request:(a?this.getStripe().confirmCardSetup(s):this.getStripe(!0).confirmCardPayment(s)).then((function(t){var n=t.paymentIntent&&t.paymentIntent.id||t.setupIntent&&t.setupIntent.id||t.error&&t.error.payment_intent&&t.error.payment_intent.id||t.error.setup_intent&&t.error.setup_intent.id;return[o.request(e("ajaxUrl"),{action:"update_order_status",order_id:c,_ajax_nonce:u,intent_id:n,payment_method_id:r||null}),t.error]})).then((function(e){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];if(a)throw a;return i.then((function(e){var t=JSON.parse(e);if(t.error)throw t.error;return t.return_url}))})),isOrderPage:l}}},{key:"setupIntent",value:function(t){var n=this;return this.request(e("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":t,_ajax_nonce:e("createSetupIntentNonce")}).then((function(e){if(!e.success)throw e.data.error;return"succeeded"===e.data.status?e.data:n.getStripe().confirmCardSetup(e.data.client_secret).then((function(e){var t=e.setupIntent,n=e.error;if(n)throw n;return t}))}))}}]),n}(),u="https://cdn.sift.com/s.js",d="https://js.stripe.com/v3",l={forter:function(e){var t=e.site_id;if(!document.querySelector('script[id="'+t+'"]')){var n=document.createElement("script");n.id=t,n.textContent="(function () {var eu = 'g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv';var siteId = \""+t+'";function t(t,e){for(var n=t.split(""),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join("")}function e(e){return t(e,-v).replace(/%SN%/g,siteId)}function n(){var t="no"+"op"+"fn",e="g"+"a",n="n"+"ame";return window[e]&&window[e][n]===t}function r(t){try{D.ex=t,n()&&D.ex.indexOf(S.uB)===-1&&(D.ex+=S.uB),y(D)}catch(e){}}function o(t,e,n,r){function o(e){try{e.blockedURI===t&&(r(!0),i=!0,document.removeEventListener("securitypolicyviolation",o))}catch(n){document.removeEventListener("securitypolicyviolation",o)}}var i=!1;t="https://"+t,document.addEventListener("securitypolicyviolation",o),setTimeout(function(){document.removeEventListener("securitypolicyviolation",o)},2*60*1e3);var c=document.createElement("script");c.onerror=function(){if(!i)try{r(!1),i=!0}catch(t){}},c.onload=n,c.type="text/javascript",c.id="ftr__script",c.async=!0,c.src=t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a)}function i(){I(S.uAL),setTimeout(c,w,S.uAL)}function c(t){try{var e=t===S.uDF?h:p,n=function(){try{b(),r(t+S.uS)}catch(e){}},c=function(e){try{b(),D.td=1*new Date-D.ts,r(e?t+S.uF+S.cP:t+S.uF),t===S.uDF&&i()}catch(n){r(S.eUoe)}};o(e,void 0,n,c)}catch(a){r(t+S.eTlu)}}var a={write:function(t,e,n,r){void 0===r&&(r=!0);var o,i;if(n?(o=new Date,o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()):i="",!r)return void(document.cookie=escape(t)+"="+escape(e)+i+"; path=/");var c,a,u;if(u=location.host,1===u.split(".").length)document.cookie=escape(t)+"="+escape(e)+i+"; path=/";else{a=u.split("."),a.shift(),c="."+a.join("."),document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c;var d=this.read(t);null!=d&&d==e||(c="."+u,document.cookie=escape(t)+"="+escape(e)+i+"; path=/; domain="+c)}},read:function(t){var e=null;try{for(var n=escape(t)+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];" "==i.charAt(0);)i=i.substring(1,i.length);0===i.indexOf(n)&&(e=unescape(i.substring(n.length,i.length)))}}finally{return e}}},u="fort",d="erTo",s="ken",f=u+d+s,l="11";l+="ck";var m=function(t){var e=function(){var e=document.createElement("link");return e.setAttribute("rel","pre"+"con"+"nect"),e.setAttribute("cros"+"sori"+"gin","anonymous"),e.onload=function(){document.head.removeChild(e)},e.onerror=function(t){document.head.removeChild(e)},e.setAttribute("href",t),document.head.appendChild(e),e};if(document.head){var n=e();setTimeout(function(){document.head.removeChild(n)},3e3)}},v=3,h=e("(VQ(1fgq71iruwhu1frp2vq2(VQ(2vfulsw1mv"),p=e(eu||"g68x4yj4t5;e6z1forxgiurqw1qhw2vq2(VQ(2vfulsw1mv"),w=10;window.ftr__startScriptLoad=1*new Date;var g=function(t){var e=1e3,n="ft"+"r:tok"+"enR"+"eady";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+="_tt";var e=document.createEvent("Event");e.initEvent(n,!1,!1),e.detail=t,document.dispatchEvent(e)}catch(r){}},e)},y=function(t){var e=function(t){return t||""},n=e(t.id)+"_"+e(t.ts)+"_"+e(t.td)+"_"+e(t.ex)+"_"+e(l);a.write(f,n,1825,!0),g(n)},T=function(){var t=a.read(f)||"",e=t.split("_"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},_=function(){for(var t={},e="fgu",n=[],r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);var o=function(t,e,r,o,i){var c=i?"-":"";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+c+n[255&e]+n[e>>8&255]+c+n[e>>16&15|64]+n[e>>24&255]+c+n[63&r|128]+n[r>>8&255]+c+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},c=function(){var t="",e=function(t,e){for(var n="",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,"0123456789"),t+=e(1,"123456789"),t+=e(8,"0123456789")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(n){try{return e+c()}catch(n){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),S={uDF:"UDF",uAL:"UAL",mLd:"1",eTlu:"2",eUoe:"3",uS:"4",uF:"9",tmos:["T5","T10","T15","T30","T60"],tmosSecs:[5,10,15,30,60],bIR:"43",uB:"u",cP:"c"},k=function(t,e){for(var n=S.tmos,r=0;r<n.length;r++)if(t+n[r]===e)return!0;return!1};try{var D=T();try{D.id&&(_.isValidNumericalToken(D.id)||_.isValidUUIDToken(D.id)||_.isValidFGUToken(D.id))?window.ftr__ncd=!1:(D.id=_.safeGenerateNoDash(),window.ftr__ncd=!0),D.ts=window.ftr__startScriptLoad,y(D);for(var x="for"+"ter"+".co"+"m",A="ht"+"tps://c"+"dn9."+x,U="ht"+"tps://"+D.id+"-"+siteId+".cd"+"n."+x,F="http"+"s://cd"+"n3."+x,L=[A,U,F],E=0;E<L.length;E++)m(L[E]);var V=new Array(S.tmosSecs.length),I=function(t){for(var e=0;e<S.tmosSecs.length;e++)V[e]=setTimeout(r,1e3*S.tmosSecs[e],t+S.tmos[e])},b=function(){for(var t=0;t<S.tmosSecs.length;t++)clearTimeout(V[t])};k(S.uDF,D.ex)?i():(I(S.uDF),setTimeout(c,w,S.uDF))}catch(C){r(S.mLd)}}catch(C){}})()',document.body.appendChild(n)}},sift:function(e){var t=e.beacon_key,n=e.session_id,r=e.user_id,o=window._sift=window._sift||[];if(o.push(["_setAccount",t]),o.push(["_setUserId",r]),o.push(["_setSessionId",n]),o.push(["_trackPageview"]),!document.querySelector('[src="'.concat(u,'"]'))){var i=document.createElement("script");i.src=u,i.async=!0,document.body.appendChild(i)}},stripe:function(){if(!document.querySelector('[src^="'.concat(d,'"]'))){var e=document.createElement("script");e.src=d,e.async=!0,document.body.appendChild(e)}}};jQuery((function(t){!function(e){for(var t in e){var n=l[t];n&&e[t]&&n(e[t])}}(e("fraudServices"));var n=e("publishableKey");if(n){var r=new s({publishableKey:n,accountId:e("accountId"),forceNetworkSavedCards:e("forceNetworkSavedCards")},(function(e,t){return new Promise((function(n,r){jQuery.post(e,t).then(n).fail(r)}))})),o=r.getStripe().elements(),i={},a=o.create("card",{hidePostalCode:!0,classes:{base:"wcpay-card-mounted"}}),c={type:"card",card:a},u=o.create("iban",{supportedCountries:["SEPA"],classes:{base:"wcpay-sepa-mounted"}}),d={type:"sepa_debit",sepa_debit:u},m=function(){return t("#payment_method_woocommerce_payments_sepa").is(":checked")};t(document.body).on("updated_checkout",(function(){t("#wcpay-card-element").length&&!t("#wcpay-card-element").children().length&&(a.unmount(),a.mount("#wcpay-card-element"),t("#wcpay-sepa-element").length&&u.mount("#wcpay-sepa-element"))})),(t("form#add_payment_method").length||t("form#order_review").length)&&(a.mount("#wcpay-card-element"),t("#wcpay-sepa-element").length&&u.mount("#wcpay-sepa-element")),a.addEventListener("change",(function(e){var n=t("#wcpay-errors");e.error?n.html('<ul class="woocommerce-error"><li /></ul>').find("li").text(e.error.message):n.empty()})),u.addEventListener("change",(function(e){var n=t("#wcpay-sepa-errors");e.error?n.html('<ul class="woocommerce-error"><li /></ul>').find("li").text(e.error.message):n.empty()}));var p,f=function(e){e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},h=function(e){var n='<ul class="woocommerce-error" role="alert">'+e+"</ul>",r=t(".woocommerce-notices-wrapper, form.checkout").first();if(r.length){t(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),r.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+n+"</div>"),r.find(".input-text, select, input:checkbox").trigger("validate").blur();var o=t(".woocommerce-NoticeGroup-checkout");o.length||(o=r),t.scroll_to_notices(o),t(document.body).trigger("checkout_error")}},v=function(e,n){r.setupIntent(n.id).then((function(n){e.append(t('<input type="hidden" />').attr("id","wcpay-setup-intent").attr("name","wcpay-setup-intent").val(n.id));var r=t.blockUI.defaults.ignoreIfBlocked;t.blockUI.defaults.ignoreIfBlocked=!0,e.removeClass("processing").submit(),t.blockUI.defaults.ignoreIfBlocked=r})).catch((function(t){p=null,e.removeClass("processing").unblock(),h(t.message)}))},y=function(e,n){var r=n.id,o=m()?"#wcpay-payment-method-sepa":"#wcpay-payment-method";t(o).val(r),e.removeClass("processing").submit()},w=function(e,n,o,a){if(!p){f(e);var c=r.generatePaymentMethodRequest(a,i);return o&&(c.setBillingDetail("name",(t("#billing_first_name").val()+" "+t("#billing_last_name").val()).trim()),c.setBillingDetail("email",t("#billing_email").val()),c.setBillingDetail("phone",t("#billing_phone").val()),c.setAddressDetail("city",t("#billing_city").val()),c.setAddressDetail("country",t("#billing_country").val()),c.setAddressDetail("line1",t("#billing_address_1").val()),c.setAddressDetail("line2",t("#billing_address_2").val()),c.setAddressDetail("postal_code",t("#billing_postcode").val()),c.setAddressDetail("state",t("#billing_state").val())),c.send().then((function(t){var r=t.paymentMethod;p=!0,n(e,r)})).catch((function(t){e.removeClass("processing").unblock(),h(t.message)})),!1}p=null},g=function(){var n=m()?t("#wcpay-payment-method-sepa").val():t("#wcpay-payment-method").val(),o=t("#wc-woocommerce_payments-new-payment-method").is(":checked"),i=r.confirmIntent(window.location.href,o?n:null);if(!0!==i){var a=i.request;i.isOrderPage&&(f(t("#order_review")),t("#payment").hide(500)),history.replaceState("",document.title,window.location.pathname+window.location.search),a.then((function(e){window.location=e})).catch((function(n){t("form.checkout").removeClass("processing").unblock(),t("#order_review").removeClass("processing").unblock(),t("#payment").show(500);var r=n.message;n instanceof Error&&(r=e("genericErrorMessage")),h(r)}))}};t("form.checkout").on("checkout_place_order_woocommerce_payments checkout_place_order_woocommerce_payments_sepa",(function(){if(!_())return w(t(this),y,!0,m()?d:c)})),t("#order_review").on("submit",(function(){if(!_()&&(t("#payment_method_woocommerce_payments").is(":checked")||m()))return w(t("#order_review"),y,!0,m()?d:c)})),t("form#add_payment_method").on("submit",(function(){if(!t("#wcpay-setup-intent").val())return w(t("form#add_payment_method"),v,!1,m()?d:c)})),g(),window.addEventListener("hashchange",(function(){window.location.hash.startsWith("#wcpay-confirm-")&&g()}))}function _(){return m()?t("#wc-woocommerce_payments-payment-sepa-token-new").length&&!t("#wc-woocommerce_payments-payment-sepa-token-new").is(":checked"):t("#wc-woocommerce_payments-payment-token-new").length&&!t("#wc-woocommerce_payments-payment-token-new").is(":checked")}}))}();
dist/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wc-components', 'wc-currency', 'wc-navigation', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-mediaelement', 'wp-polyfill', 'wp-url'), 'version' => '5370a9b296ac16bef7f7e59df962e0b6');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wc-components', 'wc-currency', 'wc-navigation', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-mediaelement', 'wp-polyfill', 'wp-url'), 'version' => '344b0931fbfa8588a9c30b7c31d2d731');
includes/admin/class-wc-payments-admin.php CHANGED
@@ -473,7 +473,12 @@ class WC_Payments_Admin {
473
  */
474
  public function add_menu_notification_badge() {
475
  global $menu;
476
- if ( $this->account->is_stripe_connected() || 'yes' === get_option( 'wcpay_menu_badge_hidden', 'no' ) ) {
 
 
 
 
 
477
  return;
478
  }
479
 
473
  */
474
  public function add_menu_notification_badge() {
475
  global $menu;
476
+ if ( 'yes' === get_option( 'wcpay_menu_badge_hidden', 'no' ) ) {
477
+ return;
478
+ }
479
+
480
+ if ( $this->account->is_stripe_connected() ) {
481
+ update_option( 'wcpay_menu_badge_hidden', 'yes' );
482
  return;
483
  }
484
 
includes/admin/class-wc-rest-payments-accounts-controller.php CHANGED
@@ -40,6 +40,6 @@ class WC_REST_Payments_Accounts_Controller extends WC_Payments_REST_Controller {
40
  * @param WP_REST_Request $request Full data about the request.
41
  */
42
  public function get_account_data( $request ) {
43
- return $this->forward_request( 'get_account_data', [ $request ] );
44
  }
45
  }
40
  * @param WP_REST_Request $request Full data about the request.
41
  */
42
  public function get_account_data( $request ) {
43
+ return WC_Payments::get_account_service()->get_cached_account_data();
44
  }
45
  }
includes/class-wc-payment-gateway-wcpay.php CHANGED
@@ -462,7 +462,6 @@ class WC_Payment_Gateway_WCPay extends WC_Payment_Gateway_CC {
462
  'publishableKey' => $this->account->get_publishable_key( $this->is_in_test_mode() ),
463
  'accountId' => $this->account->get_stripe_account_id(),
464
  'ajaxUrl' => admin_url( 'admin-ajax.php' ),
465
- 'updateOrderStatusNonce' => wp_create_nonce( 'wcpay_update_order_status_nonce' ),
466
  'createSetupIntentNonce' => wp_create_nonce( 'wcpay_create_setup_intent_nonce' ),
467
  'genericErrorMessage' => __( 'There was a problem processing the payment. Please check your email inbox and refresh the page to try again.', 'woocommerce-payments' ),
468
  'fraudServices' => $this->account->get_fraud_services_config(),
462
  'publishableKey' => $this->account->get_publishable_key( $this->is_in_test_mode() ),
463
  'accountId' => $this->account->get_stripe_account_id(),
464
  'ajaxUrl' => admin_url( 'admin-ajax.php' ),
 
465
  'createSetupIntentNonce' => wp_create_nonce( 'wcpay_create_setup_intent_nonce' ),
466
  'genericErrorMessage' => __( 'There was a problem processing the payment. Please check your email inbox and refresh the page to try again.', 'woocommerce-payments' ),
467
  'fraudServices' => $this->account->get_fraud_services_config(),
includes/class-wc-payments-account.php CHANGED
@@ -18,7 +18,9 @@ use WCPay\Logger;
18
  */
19
  class WC_Payments_Account {
20
 
 
21
  const ACCOUNT_TRANSIENT = 'wcpay_account_data';
 
22
  const ACCOUNT_RETRIEVAL_ERROR = 'ERROR';
23
  const ON_BOARDING_DISABLED_TRANSIENT = 'wcpay_on_boarding_disabled';
24
  const ERROR_MESSAGE_TRANSIENT = 'wcpay_error_message';
@@ -48,10 +50,10 @@ class WC_Payments_Account {
48
  }
49
 
50
  /**
51
- * Wipes the account transient, forcing to re-fetch the account status from WP.com.
52
  */
53
  public function clear_cache() {
54
- delete_transient( self::ACCOUNT_TRANSIENT );
55
  }
56
 
57
  /**
@@ -556,19 +558,18 @@ class WC_Payments_Account {
556
  *
557
  * @return array|bool Account data or false if failed to retrieve account data.
558
  */
559
- private function get_cached_account_data() {
560
  if ( ! $this->payments_api_client->is_server_connected() ) {
561
  return [];
562
  }
563
 
564
- $account = get_transient( self::ACCOUNT_TRANSIENT );
565
 
566
  if ( $this->is_valid_cached_account( $account ) ) {
567
  return $account;
568
  }
569
 
570
- // If the transient contains the error value and has not expired, return false early and do not attempt another
571
- // API call.
572
  if ( self::ACCOUNT_RETRIEVAL_ERROR === $account ) {
573
  return false;
574
  }
@@ -592,7 +593,8 @@ class WC_Payments_Account {
592
  } else {
593
  // Failed to retrieve account data. Exception is logged in http client.
594
  // Rate limit the account retrieval failures - set a transient for a short time.
595
- set_transient( self::ACCOUNT_TRANSIENT, self::ACCOUNT_RETRIEVAL_ERROR, 2 * MINUTE_IN_SECONDS );
 
596
  // Return false to signal account retrieval error.
597
  return false;
598
  }
@@ -607,21 +609,39 @@ class WC_Payments_Account {
607
  }
608
 
609
  /**
610
- * Caches account data for two hours
611
  *
612
- * @param array $account - Account data to cache.
 
613
  */
614
- private function cache_account( $account ) {
615
- set_transient( self::ACCOUNT_TRANSIENT, $account, 2 * HOUR_IN_SECONDS );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  }
617
 
618
  /**
619
  * Refetches account data and returns the fresh data.
620
  *
621
- * @return mixed Either the new account data or false if unavailable.
622
  */
623
  public function refresh_account_data() {
624
- delete_transient( self::ACCOUNT_TRANSIENT );
625
  return $this->get_cached_account_data();
626
  }
627
 
@@ -706,7 +726,7 @@ class WC_Payments_Account {
706
  * @return bool True if at least one parameter value is changed.
707
  */
708
  private function settings_changed( $changes = [] ) {
709
- $account = get_transient( self::ACCOUNT_TRANSIENT );
710
 
711
  // Consider changes as valid if we don't have cached account data.
712
  if ( ! $this->is_valid_cached_account( $account ) ) {
@@ -794,27 +814,19 @@ class WC_Payments_Account {
794
  return $account['country'] ?? 'US';
795
  }
796
 
797
- /**
798
- * Checks to see if the account is eligible for Instant Deposits.
799
- *
800
- * @return bool
801
- */
802
- public function is_instant_deposits_eligible(): bool {
803
- $account = $this->get_cached_account_data();
804
- if ( ! isset( $account['instant_deposits_eligible'] ) || ! $account['instant_deposits_eligible'] ) {
805
- return false;
806
- }
807
-
808
- return true;
809
- }
810
-
811
  /**
812
  * Handles adding a note if the merchant is eligible for Instant Deposits.
813
  *
 
 
814
  * @return void
815
  */
816
- public function handle_instant_deposits_inbox_note() {
817
- if ( ! $this->is_instant_deposits_eligible() ) {
 
 
 
 
818
  return;
819
  }
820
 
@@ -832,7 +844,7 @@ class WC_Payments_Account {
832
  public function handle_instant_deposits_inbox_reminder() {
833
  require_once WCPAY_ABSPATH . 'includes/notes/class-wc-payments-notes-instant-deposits-eligible.php';
834
  WC_Payments_Notes_Instant_Deposits_Eligible::possibly_delete_note();
835
- $this->handle_instant_deposits_inbox_note();
836
  }
837
 
838
  /**
@@ -851,4 +863,41 @@ class WC_Payments_Account {
851
  $reminder_time = time() + ( 90 * DAY_IN_SECONDS );
852
  $action_scheduler_service->schedule_job( $reminder_time, $action_hook );
853
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
854
  }
18
  */
19
  class WC_Payments_Account {
20
 
21
+ // ACCOUNT_TRANSIENT is only used in the supporting dev tools plugin, it can be removed once everyone has upgraded.
22
  const ACCOUNT_TRANSIENT = 'wcpay_account_data';
23
+ const ACCOUNT_OPTION = 'wcpay_account_data';
24
  const ACCOUNT_RETRIEVAL_ERROR = 'ERROR';
25
  const ON_BOARDING_DISABLED_TRANSIENT = 'wcpay_on_boarding_disabled';
26
  const ERROR_MESSAGE_TRANSIENT = 'wcpay_error_message';
50
  }
51
 
52
  /**
53
+ * Wipes the account data option, forcing to re-fetch the account status from WP.com.
54
  */
55
  public function clear_cache() {
56
+ delete_option( self::ACCOUNT_OPTION );
57
  }
58
 
59
  /**
558
  *
559
  * @return array|bool Account data or false if failed to retrieve account data.
560
  */
561
+ public function get_cached_account_data() {
562
  if ( ! $this->payments_api_client->is_server_connected() ) {
563
  return [];
564
  }
565
 
566
+ $account = $this->read_account_from_cache();
567
 
568
  if ( $this->is_valid_cached_account( $account ) ) {
569
  return $account;
570
  }
571
 
572
+ // If the option contains the error value, return false early and do not attempt another API call.
 
573
  if ( self::ACCOUNT_RETRIEVAL_ERROR === $account ) {
574
  return false;
575
  }
593
  } else {
594
  // Failed to retrieve account data. Exception is logged in http client.
595
  // Rate limit the account retrieval failures - set a transient for a short time.
596
+ $this->cache_account( self::ACCOUNT_RETRIEVAL_ERROR, 2 * MINUTE_IN_SECONDS );
597
+
598
  // Return false to signal account retrieval error.
599
  return false;
600
  }
609
  }
610
 
611
  /**
612
+ * Caches account data for a period of time.
613
  *
614
+ * @param array|string $account - Account data to cache.
615
+ * @param int|null $expiration - The length of time to cache the account data, expressed in seconds.
616
  */
617
+ private function cache_account( $account, int $expiration = null ) {
618
+ // Default expiration to 2 hours if not set.
619
+ if ( null === $expiration ) {
620
+ $expiration = 2 * HOUR_IN_SECONDS;
621
+ }
622
+
623
+ // Add the account data and expiry time to the array we're caching.
624
+ $account_cache = [];
625
+ $account_cache['account'] = $account;
626
+ $account_cache['expires'] = time() + $expiration;
627
+
628
+ // Create or update the account option cache.
629
+ if ( false === get_option( self::ACCOUNT_OPTION ) ) {
630
+ $result = add_option( self::ACCOUNT_OPTION, $account_cache, '', 'no' );
631
+ } else {
632
+ $result = update_option( self::ACCOUNT_OPTION, $account_cache, 'no' );
633
+ }
634
+
635
+ return $result;
636
  }
637
 
638
  /**
639
  * Refetches account data and returns the fresh data.
640
  *
641
+ * @return array|bool|string Either the new account data or false if unavailable.
642
  */
643
  public function refresh_account_data() {
644
+ $this->clear_cache();
645
  return $this->get_cached_account_data();
646
  }
647
 
726
  * @return bool True if at least one parameter value is changed.
727
  */
728
  private function settings_changed( $changes = [] ) {
729
+ $account = $this->read_account_from_cache();
730
 
731
  // Consider changes as valid if we don't have cached account data.
732
  if ( ! $this->is_valid_cached_account( $account ) ) {
814
  return $account['country'] ?? 'US';
815
  }
816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817
  /**
818
  * Handles adding a note if the merchant is eligible for Instant Deposits.
819
  *
820
+ * @param array $account The account data.
821
+ *
822
  * @return void
823
  */
824
+ public function handle_instant_deposits_inbox_note( $account ) {
825
+ if ( empty( $account ) ) {
826
+ return;
827
+ }
828
+
829
+ if ( ! $this->is_instant_deposits_eligible( $account ) ) {
830
  return;
831
  }
832
 
844
  public function handle_instant_deposits_inbox_reminder() {
845
  require_once WCPAY_ABSPATH . 'includes/notes/class-wc-payments-notes-instant-deposits-eligible.php';
846
  WC_Payments_Notes_Instant_Deposits_Eligible::possibly_delete_note();
847
+ $this->handle_instant_deposits_inbox_note( $this->get_cached_account_data() );
848
  }
849
 
850
  /**
863
  $reminder_time = time() + ( 90 * DAY_IN_SECONDS );
864
  $action_scheduler_service->schedule_job( $reminder_time, $action_hook );
865
  }
866
+
867
+ /**
868
+ * Checks to see if the account is eligible for Instant Deposits.
869
+ *
870
+ * @param array $account The account data.
871
+ *
872
+ * @return bool
873
+ */
874
+ private function is_instant_deposits_eligible( array $account ): bool {
875
+ if ( ! isset( $account['instant_deposits_eligible'] ) || ! $account['instant_deposits_eligible'] ) {
876
+ return false;
877
+ }
878
+
879
+ return true;
880
+ }
881
+
882
+ /**
883
+ * Read the account from the WP option we cache it in.
884
+ *
885
+ * @return array|string|bool
886
+ */
887
+ private function read_account_from_cache() {
888
+ $account_cache = get_option( self::ACCOUNT_OPTION );
889
+
890
+ if ( false === $account_cache || ! isset( $account_cache['account'] ) || ! isset( $account_cache['expires'] ) ) {
891
+ // No option found or the data isn't in the shape we expect.
892
+ return false;
893
+ }
894
+
895
+ // Set $account to false if the cache has expired, triggering another fetch.
896
+ if ( $account_cache['expires'] < time() ) {
897
+ return false;
898
+ }
899
+
900
+ // We have fresh account data in the cache, so return it.
901
+ return $account_cache['account'];
902
+ }
903
  }
includes/class-wc-payments.php CHANGED
@@ -543,6 +543,15 @@ class WC_Payments {
543
  return self::$card_gateway;
544
  }
545
 
 
 
 
 
 
 
 
 
 
546
  /**
547
  * Registers the payment method with the blocks registry.
548
  *
543
  return self::$card_gateway;
544
  }
545
 
546
+ /**
547
+ * Returns the WC_Payments_Account instance
548
+ *
549
+ * @return WC_Payments_Account account service instance
550
+ */
551
+ public static function get_account_service() {
552
+ return self::$account;
553
+ }
554
+
555
  /**
556
  * Registers the payment method with the blocks registry.
557
  *
includes/wc-payment-api/class-wc-payments-api-client.php CHANGED
@@ -687,6 +687,8 @@ class WC_Payments_API_Client {
687
  * Get current account data
688
  *
689
  * @return array An array describing an account object.
 
 
690
  */
691
  public function get_account_data() {
692
  return $this->request(
687
  * Get current account data
688
  *
689
  * @return array An array describing an account object.
690
+ *
691
+ * @throws API_Exception - Error contacting the API.
692
  */
693
  public function get_account_data() {
694
  return $this->request(
languages/woocommerce-payments.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the WooCommerce Payments package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Payments 2.3.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-payments\n"
8
- "POT-Creation-Date: 2021-04-21 11:32:50+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -330,44 +330,44 @@ msgstr ""
330
  msgid "All payment methods"
331
  msgstr ""
332
 
333
- #: includes/class-wc-payment-gateway-wcpay.php:467
334
  msgid ""
335
  "There was a problem processing the payment. Please check your email inbox "
336
  "and refresh the page to try again."
337
  msgstr ""
338
 
339
- #: includes/class-wc-payment-gateway-wcpay.php:513
340
  msgid "Save payment information to my account for future purchases."
341
  msgstr ""
342
 
343
- #: includes/class-wc-payment-gateway-wcpay.php:550
344
  #. translators: link to Stripe testing page
345
  msgid ""
346
  "<strong>Test mode:</strong> use the test VISA card 4242424242424242 with "
347
  "any expiry date and CVC, or any test card numbers listed <a>here</a>."
348
  msgstr ""
349
 
350
- #: includes/class-wc-payment-gateway-wcpay.php:586
351
  #: includes/payment-method/class-sepa.php:121
352
  msgid ""
353
  "An error was encountered when preparing the payment form. Please try again "
354
  "later."
355
  msgstr ""
356
 
357
- #: includes/class-wc-payment-gateway-wcpay.php:610
358
  msgid ""
359
  "There was an error while processing the payment. If you continue to see "
360
  "this notice, please contact the admin."
361
  msgstr ""
362
 
363
- #: includes/class-wc-payment-gateway-wcpay.php:612
364
- #: includes/class-wc-payment-gateway-wcpay.php:1566
365
  msgid ""
366
  "We're not able to process this payment. Please refresh the page and try "
367
  "again."
368
  msgstr ""
369
 
370
- #: includes/class-wc-payment-gateway-wcpay.php:623
371
  #: includes/compat/subscriptions/class-wc-payment-gateway-wcpay-subscriptions-compat.php:155
372
  #. translators: %1: the failed payment amount, %2: error message
373
  msgid ""
@@ -375,13 +375,13 @@ msgid ""
375
  "message: <code>%2$s</code>."
376
  msgstr ""
377
 
378
- #: includes/class-wc-payment-gateway-wcpay.php:740
379
  #. translators: %1: the last 4 digit of the credit card
380
  msgid "Payment method is changed to: <strong>Credit Card ending in %1$s</strong>."
381
  msgstr ""
382
 
383
- #: includes/class-wc-payment-gateway-wcpay.php:816
384
- #: includes/class-wc-payment-gateway-wcpay.php:1620
385
  #. translators: %1: the successfully charged amount, %2: transaction ID of the
386
  #. payment
387
  msgid ""
@@ -389,22 +389,22 @@ msgid ""
389
  "WooCommerce Payments (<a>%2$s</a>)."
390
  msgstr ""
391
 
392
- #: includes/class-wc-payment-gateway-wcpay.php:835
393
- #: includes/class-wc-payment-gateway-wcpay.php:1642
394
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
395
  msgid ""
396
  "A payment of %1$s was <strong>authorized</strong> using WooCommerce "
397
  "Payments (<a>%2$s</a>)."
398
  msgstr ""
399
 
400
- #: includes/class-wc-payment-gateway-wcpay.php:855
401
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
402
  msgid ""
403
  "A payment of %1$s was <strong>started</strong> using WooCommerce Payments "
404
  "(<code>%2$s</code>)."
405
  msgstr ""
406
 
407
- #: includes/class-wc-payment-gateway-wcpay.php:968
408
  #. translators: an error message which will appear if a user tries to refund an
409
  #. order which is has been authorized but not yet charged.
410
  msgid ""
@@ -414,142 +414,142 @@ msgid ""
414
  "trigger a refund via the 'Refund' button."
415
  msgstr ""
416
 
417
- #: includes/class-wc-payment-gateway-wcpay.php:986
418
  #. translators: %1: the successfully charged amount, %2: error message
419
  msgid "A refund of %1$s failed to complete: %2$s"
420
  msgstr ""
421
 
422
- #: includes/class-wc-payment-gateway-wcpay.php:1001
423
  #. translators: %1: the successfully charged amount
424
  msgid "A refund of %1$s was successfully processed using WooCommerce Payments."
425
  msgstr ""
426
 
427
- #: includes/class-wc-payment-gateway-wcpay.php:1007
428
  #. translators: %1: the successfully charged amount, %2: reason
429
  msgid ""
430
  "A refund of %1$s was successfully processed using WooCommerce Payments. "
431
  "Reason: %2$s"
432
  msgstr ""
433
 
434
- #: includes/class-wc-payment-gateway-wcpay.php:1035
435
  msgid ""
436
  "Dev mode is active so all transactions will be in test mode. This setting "
437
  "is only available to live accounts."
438
  msgstr ""
439
 
440
- #: includes/class-wc-payment-gateway-wcpay.php:1040
441
  msgid "Dev mode is active so logging is on by default."
442
  msgstr ""
443
 
444
- #: includes/class-wc-payment-gateway-wcpay.php:1060
445
  msgid "Account status"
446
  msgstr ""
447
 
448
- #: includes/class-wc-payment-gateway-wcpay.php:1084
449
  msgid "Base fee"
450
  msgstr ""
451
 
452
- #: includes/class-wc-payment-gateway-wcpay.php:1227
453
  msgid "Failed to update Statement descriptor. "
454
  msgstr ""
455
 
456
- #: includes/class-wc-payment-gateway-wcpay.php:1255
457
  msgid ""
458
  "Customer bank statement is invalid. Statement should be between 5 and 22 "
459
  "characters long, contain at least single Latin character and does not "
460
  "contain special characters: ' \" * &lt; &gt;"
461
  msgstr ""
462
 
463
- #: includes/class-wc-payment-gateway-wcpay.php:1270
464
  #. translators: 1) dashboard login URL
465
  msgid "View and edit account details"
466
  msgstr ""
467
 
468
- #: includes/class-wc-payment-gateway-wcpay.php:1275
469
  msgid ""
470
  "You will automatically be <em>signed in to Stripe</em> with your "
471
  "WooCommerce Payments account."
472
  msgstr ""
473
 
474
- #: includes/class-wc-payment-gateway-wcpay.php:1279
475
- #: includes/class-wc-payment-gateway-wcpay.php:1283
476
  #: client/account-status/index.js:181
477
  msgid "Error determining the connection status."
478
  msgstr ""
479
 
480
- #: includes/class-wc-payment-gateway-wcpay.php:1290
481
  msgid "Account"
482
  msgstr ""
483
 
484
- #: includes/class-wc-payment-gateway-wcpay.php:1317
485
  msgid "Capture charge"
486
  msgstr ""
487
 
488
- #: includes/class-wc-payment-gateway-wcpay.php:1318
489
  msgid "Cancel authorization"
490
  msgstr ""
491
 
492
- #: includes/class-wc-payment-gateway-wcpay.php:1371
493
  #. translators: %1: the successfully charged amount
494
  msgid ""
495
  "A payment of %1$s was <strong>successfully captured</strong> using "
496
  "WooCommerce Payments."
497
  msgstr ""
498
 
499
- #: includes/class-wc-payment-gateway-wcpay.php:1385
500
  #. translators: %1: the failed capture amount, %2: error message
501
  msgid ""
502
  "A capture of %1$s <strong>failed</strong> to complete with the following "
503
  "message: <code>%2$s</code>."
504
  msgstr ""
505
 
506
- #: includes/class-wc-payment-gateway-wcpay.php:1402
507
  #. translators: %1: the failed capture amount
508
  msgid "A capture of %1$s <strong>failed</strong> to complete."
509
  msgstr ""
510
 
511
- #: includes/class-wc-payment-gateway-wcpay.php:1450
512
  msgid "Payment authorization was successfully <strong>cancelled</strong>."
513
  msgstr ""
514
 
515
- #: includes/class-wc-payment-gateway-wcpay.php:1458
516
  #. translators: %1: error message
517
  msgid ""
518
  "Canceling authorization <strong>failed</strong> to complete with the "
519
  "following message: <code>%1$s</code>."
520
  msgstr ""
521
 
522
- #: includes/class-wc-payment-gateway-wcpay.php:1473
523
  msgid "Canceling authorization <strong>failed</strong> to complete."
524
  msgstr ""
525
 
526
- #: includes/class-wc-payment-gateway-wcpay.php:1575
527
- #: includes/class-wc-payment-gateway-wcpay.php:1588
528
- #: includes/class-wc-payment-gateway-wcpay.php:1602
529
  msgid "We're not able to process this payment. Please try again later."
530
  msgstr ""
531
 
532
- #: includes/class-wc-payment-gateway-wcpay.php:1584
533
  #. translators: This will be used to indicate an unknown value for an ID.
534
  #: client/payment-details/payment-method/index.js:54
535
  msgid "unknown"
536
  msgstr ""
537
 
538
- #: includes/class-wc-payment-gateway-wcpay.php:1666
539
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
540
  msgid ""
541
  "A payment of %1$s <strong>failed</strong> using WooCommerce Payments "
542
  "(<a>%2$s</a>)."
543
  msgstr ""
544
 
545
- #: includes/class-wc-payment-gateway-wcpay.php:1694
546
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
547
  msgid ""
548
  "A payment of %1$s <strong>failed</strong> using WooCommerce Payments "
549
  "(<code>%2$s</code>)."
550
  msgstr ""
551
 
552
- #: includes/class-wc-payment-gateway-wcpay.php:1745
553
  #. translators: %1: transaction ID of the payment or a translated string
554
  #. indicating an unknown ID.
555
  msgid ""
@@ -558,74 +558,74 @@ msgid ""
558
  "so it was ignored and the order was not updated."
559
  msgstr ""
560
 
561
- #: includes/class-wc-payment-gateway-wcpay.php:1789
562
  msgid "A WooCommerce Payments payment method was not provided"
563
  msgstr ""
564
 
565
- #: includes/class-wc-payment-gateway-wcpay.php:1801
566
  msgid "We're not able to add this payment method. Please try again later"
567
  msgstr ""
568
 
569
- #: includes/class-wc-payment-gateway-wcpay.php:1810
570
  msgid "Failed to add the provided payment method. Please try again later"
571
  msgstr ""
572
 
573
- #: includes/class-wc-payment-gateway-wcpay.php:1906
574
  msgid ""
575
  "We're not able to add this payment method. Please refresh the page and try "
576
  "again."
577
  msgstr ""
578
 
579
- #: includes/class-wc-payments-account.php:64
580
  msgid "Clear WooCommerce Payments account cache"
581
  msgstr ""
582
 
583
- #: includes/class-wc-payments-account.php:65
584
  msgid "Clear"
585
  msgstr ""
586
 
587
- #: includes/class-wc-payments-account.php:66
588
  msgid "This tool will clear the account cached values used in WooCommerce Payments."
589
  msgstr ""
590
 
591
- #: includes/class-wc-payments-account.php:133
592
  msgid "Failed to detect connection status"
593
  msgstr ""
594
 
595
- #: includes/class-wc-payments-account.php:321
596
  msgid ""
597
  "There was a problem redirecting you to the account dashboard. Please try "
598
  "again."
599
  msgstr ""
600
 
601
- #: includes/class-wc-payments-account.php:331
602
  msgid ""
603
  "Thanks for verifying your business details. You're ready to start taking "
604
  "payments!"
605
  msgstr ""
606
 
607
- #: includes/class-wc-payments-account.php:333
608
  msgid "Thanks for verifying your business details!"
609
  msgstr ""
610
 
611
- #: includes/class-wc-payments-account.php:347
612
  msgid ""
613
  "Connection to WordPress.com failed. Please connect to WordPress.com to "
614
  "start using WooCommerce Payments."
615
  msgstr ""
616
 
617
- #: includes/class-wc-payments-account.php:357
618
  #. translators: error message.
619
  msgid "There was a problem connecting this site to WordPress.com: \"%s\""
620
  msgstr ""
621
 
622
- #: includes/class-wc-payments-account.php:367
623
  msgid ""
624
  "There was a problem redirecting you to the account connection page. Please "
625
  "try again."
626
  msgstr ""
627
 
628
- #: includes/class-wc-payments-account.php:528
629
  msgid "There was a problem processing your account data. Please try again."
630
  msgstr ""
631
 
@@ -945,19 +945,19 @@ msgstr ""
945
  msgid "Max file size exceeded."
946
  msgstr ""
947
 
948
- #: includes/wc-payment-api/class-wc-payments-api-client.php:791
949
  msgid "Customer ID is required"
950
  msgstr ""
951
 
952
- #: includes/wc-payment-api/class-wc-payments-api-client.php:1020
953
  msgid "Unable to encode body for request to WooCommerce Payments API."
954
  msgstr ""
955
 
956
- #: includes/wc-payment-api/class-wc-payments-api-client.php:1121
957
  msgid "Unable to decode response from WooCommerce Payments API"
958
  msgstr ""
959
 
960
- #: includes/wc-payment-api/class-wc-payments-api-client.php:1140
961
  msgid "Server error. Please try again."
962
  msgstr ""
963
 
@@ -993,7 +993,7 @@ msgstr ""
993
  msgid "https://woocommerce.com/"
994
  msgstr ""
995
 
996
- #: includes/wc-payment-api/class-wc-payments-api-client.php:1145
997
  #. translators: This is an error API response.
998
  msgctxt "API error message to throw as Exception"
999
  msgid "Error: %1$s"
2
  # This file is distributed under the same license as the WooCommerce Payments package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Payments 2.3.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-payments\n"
8
+ "POT-Creation-Date: 2021-04-26 13:05:09+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
330
  msgid "All payment methods"
331
  msgstr ""
332
 
333
+ #: includes/class-wc-payment-gateway-wcpay.php:466
334
  msgid ""
335
  "There was a problem processing the payment. Please check your email inbox "
336
  "and refresh the page to try again."
337
  msgstr ""
338
 
339
+ #: includes/class-wc-payment-gateway-wcpay.php:512
340
  msgid "Save payment information to my account for future purchases."
341
  msgstr ""
342
 
343
+ #: includes/class-wc-payment-gateway-wcpay.php:549
344
  #. translators: link to Stripe testing page
345
  msgid ""
346
  "<strong>Test mode:</strong> use the test VISA card 4242424242424242 with "
347
  "any expiry date and CVC, or any test card numbers listed <a>here</a>."
348
  msgstr ""
349
 
350
+ #: includes/class-wc-payment-gateway-wcpay.php:585
351
  #: includes/payment-method/class-sepa.php:121
352
  msgid ""
353
  "An error was encountered when preparing the payment form. Please try again "
354
  "later."
355
  msgstr ""
356
 
357
+ #: includes/class-wc-payment-gateway-wcpay.php:609
358
  msgid ""
359
  "There was an error while processing the payment. If you continue to see "
360
  "this notice, please contact the admin."
361
  msgstr ""
362
 
363
+ #: includes/class-wc-payment-gateway-wcpay.php:611
364
+ #: includes/class-wc-payment-gateway-wcpay.php:1565
365
  msgid ""
366
  "We're not able to process this payment. Please refresh the page and try "
367
  "again."
368
  msgstr ""
369
 
370
+ #: includes/class-wc-payment-gateway-wcpay.php:622
371
  #: includes/compat/subscriptions/class-wc-payment-gateway-wcpay-subscriptions-compat.php:155
372
  #. translators: %1: the failed payment amount, %2: error message
373
  msgid ""
375
  "message: <code>%2$s</code>."
376
  msgstr ""
377
 
378
+ #: includes/class-wc-payment-gateway-wcpay.php:739
379
  #. translators: %1: the last 4 digit of the credit card
380
  msgid "Payment method is changed to: <strong>Credit Card ending in %1$s</strong>."
381
  msgstr ""
382
 
383
+ #: includes/class-wc-payment-gateway-wcpay.php:815
384
+ #: includes/class-wc-payment-gateway-wcpay.php:1619
385
  #. translators: %1: the successfully charged amount, %2: transaction ID of the
386
  #. payment
387
  msgid ""
389
  "WooCommerce Payments (<a>%2$s</a>)."
390
  msgstr ""
391
 
392
+ #: includes/class-wc-payment-gateway-wcpay.php:834
393
+ #: includes/class-wc-payment-gateway-wcpay.php:1641
394
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
395
  msgid ""
396
  "A payment of %1$s was <strong>authorized</strong> using WooCommerce "
397
  "Payments (<a>%2$s</a>)."
398
  msgstr ""
399
 
400
+ #: includes/class-wc-payment-gateway-wcpay.php:854
401
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
402
  msgid ""
403
  "A payment of %1$s was <strong>started</strong> using WooCommerce Payments "
404
  "(<code>%2$s</code>)."
405
  msgstr ""
406
 
407
+ #: includes/class-wc-payment-gateway-wcpay.php:967
408
  #. translators: an error message which will appear if a user tries to refund an
409
  #. order which is has been authorized but not yet charged.
410
  msgid ""
414
  "trigger a refund via the 'Refund' button."
415
  msgstr ""
416
 
417
+ #: includes/class-wc-payment-gateway-wcpay.php:985
418
  #. translators: %1: the successfully charged amount, %2: error message
419
  msgid "A refund of %1$s failed to complete: %2$s"
420
  msgstr ""
421
 
422
+ #: includes/class-wc-payment-gateway-wcpay.php:1000
423
  #. translators: %1: the successfully charged amount
424
  msgid "A refund of %1$s was successfully processed using WooCommerce Payments."
425
  msgstr ""
426
 
427
+ #: includes/class-wc-payment-gateway-wcpay.php:1006
428
  #. translators: %1: the successfully charged amount, %2: reason
429
  msgid ""
430
  "A refund of %1$s was successfully processed using WooCommerce Payments. "
431
  "Reason: %2$s"
432
  msgstr ""
433
 
434
+ #: includes/class-wc-payment-gateway-wcpay.php:1034
435
  msgid ""
436
  "Dev mode is active so all transactions will be in test mode. This setting "
437
  "is only available to live accounts."
438
  msgstr ""
439
 
440
+ #: includes/class-wc-payment-gateway-wcpay.php:1039
441
  msgid "Dev mode is active so logging is on by default."
442
  msgstr ""
443
 
444
+ #: includes/class-wc-payment-gateway-wcpay.php:1059
445
  msgid "Account status"
446
  msgstr ""
447
 
448
+ #: includes/class-wc-payment-gateway-wcpay.php:1083
449
  msgid "Base fee"
450
  msgstr ""
451
 
452
+ #: includes/class-wc-payment-gateway-wcpay.php:1226
453
  msgid "Failed to update Statement descriptor. "
454
  msgstr ""
455
 
456
+ #: includes/class-wc-payment-gateway-wcpay.php:1254
457
  msgid ""
458
  "Customer bank statement is invalid. Statement should be between 5 and 22 "
459
  "characters long, contain at least single Latin character and does not "
460
  "contain special characters: ' \" * &lt; &gt;"
461
  msgstr ""
462
 
463
+ #: includes/class-wc-payment-gateway-wcpay.php:1269
464
  #. translators: 1) dashboard login URL
465
  msgid "View and edit account details"
466
  msgstr ""
467
 
468
+ #: includes/class-wc-payment-gateway-wcpay.php:1274
469
  msgid ""
470
  "You will automatically be <em>signed in to Stripe</em> with your "
471
  "WooCommerce Payments account."
472
  msgstr ""
473
 
474
+ #: includes/class-wc-payment-gateway-wcpay.php:1278
475
+ #: includes/class-wc-payment-gateway-wcpay.php:1282
476
  #: client/account-status/index.js:181
477
  msgid "Error determining the connection status."
478
  msgstr ""
479
 
480
+ #: includes/class-wc-payment-gateway-wcpay.php:1289
481
  msgid "Account"
482
  msgstr ""
483
 
484
+ #: includes/class-wc-payment-gateway-wcpay.php:1316
485
  msgid "Capture charge"
486
  msgstr ""
487
 
488
+ #: includes/class-wc-payment-gateway-wcpay.php:1317
489
  msgid "Cancel authorization"
490
  msgstr ""
491
 
492
+ #: includes/class-wc-payment-gateway-wcpay.php:1370
493
  #. translators: %1: the successfully charged amount
494
  msgid ""
495
  "A payment of %1$s was <strong>successfully captured</strong> using "
496
  "WooCommerce Payments."
497
  msgstr ""
498
 
499
+ #: includes/class-wc-payment-gateway-wcpay.php:1384
500
  #. translators: %1: the failed capture amount, %2: error message
501
  msgid ""
502
  "A capture of %1$s <strong>failed</strong> to complete with the following "
503
  "message: <code>%2$s</code>."
504
  msgstr ""
505
 
506
+ #: includes/class-wc-payment-gateway-wcpay.php:1401
507
  #. translators: %1: the failed capture amount
508
  msgid "A capture of %1$s <strong>failed</strong> to complete."
509
  msgstr ""
510
 
511
+ #: includes/class-wc-payment-gateway-wcpay.php:1449
512
  msgid "Payment authorization was successfully <strong>cancelled</strong>."
513
  msgstr ""
514
 
515
+ #: includes/class-wc-payment-gateway-wcpay.php:1457
516
  #. translators: %1: error message
517
  msgid ""
518
  "Canceling authorization <strong>failed</strong> to complete with the "
519
  "following message: <code>%1$s</code>."
520
  msgstr ""
521
 
522
+ #: includes/class-wc-payment-gateway-wcpay.php:1472
523
  msgid "Canceling authorization <strong>failed</strong> to complete."
524
  msgstr ""
525
 
526
+ #: includes/class-wc-payment-gateway-wcpay.php:1574
527
+ #: includes/class-wc-payment-gateway-wcpay.php:1587
528
+ #: includes/class-wc-payment-gateway-wcpay.php:1601
529
  msgid "We're not able to process this payment. Please try again later."
530
  msgstr ""
531
 
532
+ #: includes/class-wc-payment-gateway-wcpay.php:1583
533
  #. translators: This will be used to indicate an unknown value for an ID.
534
  #: client/payment-details/payment-method/index.js:54
535
  msgid "unknown"
536
  msgstr ""
537
 
538
+ #: includes/class-wc-payment-gateway-wcpay.php:1665
539
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
540
  msgid ""
541
  "A payment of %1$s <strong>failed</strong> using WooCommerce Payments "
542
  "(<a>%2$s</a>)."
543
  msgstr ""
544
 
545
+ #: includes/class-wc-payment-gateway-wcpay.php:1693
546
  #. translators: %1: the authorized amount, %2: transaction ID of the payment
547
  msgid ""
548
  "A payment of %1$s <strong>failed</strong> using WooCommerce Payments "
549
  "(<code>%2$s</code>)."
550
  msgstr ""
551
 
552
+ #: includes/class-wc-payment-gateway-wcpay.php:1744
553
  #. translators: %1: transaction ID of the payment or a translated string
554
  #. indicating an unknown ID.
555
  msgid ""
558
  "so it was ignored and the order was not updated."
559
  msgstr ""
560
 
561
+ #: includes/class-wc-payment-gateway-wcpay.php:1788
562
  msgid "A WooCommerce Payments payment method was not provided"
563
  msgstr ""
564
 
565
+ #: includes/class-wc-payment-gateway-wcpay.php:1800
566
  msgid "We're not able to add this payment method. Please try again later"
567
  msgstr ""
568
 
569
+ #: includes/class-wc-payment-gateway-wcpay.php:1809
570
  msgid "Failed to add the provided payment method. Please try again later"
571
  msgstr ""
572
 
573
+ #: includes/class-wc-payment-gateway-wcpay.php:1905
574
  msgid ""
575
  "We're not able to add this payment method. Please refresh the page and try "
576
  "again."
577
  msgstr ""
578
 
579
+ #: includes/class-wc-payments-account.php:66
580
  msgid "Clear WooCommerce Payments account cache"
581
  msgstr ""
582
 
583
+ #: includes/class-wc-payments-account.php:67
584
  msgid "Clear"
585
  msgstr ""
586
 
587
+ #: includes/class-wc-payments-account.php:68
588
  msgid "This tool will clear the account cached values used in WooCommerce Payments."
589
  msgstr ""
590
 
591
+ #: includes/class-wc-payments-account.php:135
592
  msgid "Failed to detect connection status"
593
  msgstr ""
594
 
595
+ #: includes/class-wc-payments-account.php:323
596
  msgid ""
597
  "There was a problem redirecting you to the account dashboard. Please try "
598
  "again."
599
  msgstr ""
600
 
601
+ #: includes/class-wc-payments-account.php:333
602
  msgid ""
603
  "Thanks for verifying your business details. You're ready to start taking "
604
  "payments!"
605
  msgstr ""
606
 
607
+ #: includes/class-wc-payments-account.php:335
608
  msgid "Thanks for verifying your business details!"
609
  msgstr ""
610
 
611
+ #: includes/class-wc-payments-account.php:349
612
  msgid ""
613
  "Connection to WordPress.com failed. Please connect to WordPress.com to "
614
  "start using WooCommerce Payments."
615
  msgstr ""
616
 
617
+ #: includes/class-wc-payments-account.php:359
618
  #. translators: error message.
619
  msgid "There was a problem connecting this site to WordPress.com: \"%s\""
620
  msgstr ""
621
 
622
+ #: includes/class-wc-payments-account.php:369
623
  msgid ""
624
  "There was a problem redirecting you to the account connection page. Please "
625
  "try again."
626
  msgstr ""
627
 
628
+ #: includes/class-wc-payments-account.php:530
629
  msgid "There was a problem processing your account data. Please try again."
630
  msgstr ""
631
 
945
  msgid "Max file size exceeded."
946
  msgstr ""
947
 
948
+ #: includes/wc-payment-api/class-wc-payments-api-client.php:793
949
  msgid "Customer ID is required"
950
  msgstr ""
951
 
952
+ #: includes/wc-payment-api/class-wc-payments-api-client.php:1022
953
  msgid "Unable to encode body for request to WooCommerce Payments API."
954
  msgstr ""
955
 
956
+ #: includes/wc-payment-api/class-wc-payments-api-client.php:1123
957
  msgid "Unable to decode response from WooCommerce Payments API"
958
  msgstr ""
959
 
960
+ #: includes/wc-payment-api/class-wc-payments-api-client.php:1142
961
  msgid "Server error. Please try again."
962
  msgstr ""
963
 
993
  msgid "https://woocommerce.com/"
994
  msgstr ""
995
 
996
+ #: includes/wc-payment-api/class-wc-payments-api-client.php:1147
997
  #. translators: This is an error API response.
998
  msgctxt "API error message to throw as Exception"
999
  msgid "Error: %1$s"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, payment, payment request, credit card, automattic
4
  Requires at least: 5.4
5
  Tested up to: 5.7
6
  Requires PHP: 7.0
7
- Stable tag: 2.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -101,6 +101,11 @@ Please note that our support for the checkout block is still experimental and th
101
 
102
  == Changelog ==
103
 
 
 
 
 
 
104
  = 2.3.0 - 2021-04-21 =
105
  * Add - Introduced deposit currency filter for transactions overview page.
106
  * Add - Download transactions report in CSV.
4
  Requires at least: 5.4
5
  Tested up to: 5.7
6
  Requires PHP: 7.0
7
+ Stable tag: 2.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
101
 
102
  == Changelog ==
103
 
104
+ = 2.3.1 - 2021-04-26 =
105
+ * Fix - Various account connection cache tweaks
106
+ * Update - Use option instead of transient for caching account data
107
+ * Fix - Error when using SCA / 3DS credit card in checkout block.
108
+
109
  = 2.3.0 - 2021-04-21 =
110
  * Add - Introduced deposit currency filter for transactions overview page.
111
  * Add - Download transactions report in CSV.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInita539da645841be5865faa61b835dedc8::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit85414029225d8d0aa46b2d7a243ace49::getLoader();
vendor/autoload_packages.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita539da645841be5865faa61b835dedc8
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInita539da645841be5865faa61b835dedc8
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInita539da645841be5865faa61b835dedc8', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInita539da645841be5865faa61b835dedc8', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInita539da645841be5865faa61b835dedc8::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInita539da645841be5865faa61b835dedc8
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInita539da645841be5865faa61b835dedc8::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequirea539da645841be5865faa61b835dedc8($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequirea539da645841be5865faa61b835dedc8($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit85414029225d8d0aa46b2d7a243ace49
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit85414029225d8d0aa46b2d7a243ace49', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit85414029225d8d0aa46b2d7a243ace49', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit85414029225d8d0aa46b2d7a243ace49::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit85414029225d8d0aa46b2d7a243ace49::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire85414029225d8d0aa46b2d7a243ace49($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire85414029225d8d0aa46b2d7a243ace49($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInita539da645841be5865faa61b835dedc8
8
  {
9
  public static $files = array (
10
  'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php',
@@ -71,9 +71,9 @@ class ComposerStaticInita539da645841be5865faa61b835dedc8
71
  public static function getInitializer(ClassLoader $loader)
72
  {
73
  return \Closure::bind(function () use ($loader) {
74
- $loader->prefixLengthsPsr4 = ComposerStaticInita539da645841be5865faa61b835dedc8::$prefixLengthsPsr4;
75
- $loader->prefixDirsPsr4 = ComposerStaticInita539da645841be5865faa61b835dedc8::$prefixDirsPsr4;
76
- $loader->classMap = ComposerStaticInita539da645841be5865faa61b835dedc8::$classMap;
77
 
78
  }, null, ClassLoader::class);
79
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit85414029225d8d0aa46b2d7a243ace49
8
  {
9
  public static $files = array (
10
  'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php',
71
  public static function getInitializer(ClassLoader $loader)
72
  {
73
  return \Closure::bind(function () use ($loader) {
74
+ $loader->prefixLengthsPsr4 = ComposerStaticInit85414029225d8d0aa46b2d7a243ace49::$prefixLengthsPsr4;
75
+ $loader->prefixDirsPsr4 = ComposerStaticInit85414029225d8d0aa46b2d7a243ace49::$prefixDirsPsr4;
76
+ $loader->classMap = ComposerStaticInit85414029225d8d0aa46b2d7a243ace49::$classMap;
77
 
78
  }, null, ClassLoader::class);
79
  }
vendor/jetpack-autoloader/class-autoloader-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-container.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-hook-manager.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-latest-autoloader-guard.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-manifest-reader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-path-processor.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugin-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugins-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-loader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-selector.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpa539da645841be5865faa61b835dedc8;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp85414029225d8d0aa46b2d7a243ace49;
9
 
10
  // phpcs:ignore
11
 
woocommerce-payments.php CHANGED
@@ -10,7 +10,7 @@
10
  * WC requires at least: 4.0
11
  * WC tested up to: 5.1
12
  * Requires WP: 5.4
13
- * Version: 2.3.0
14
  *
15
  * @package WooCommerce\Payments
16
  */
10
  * WC requires at least: 4.0
11
  * WC tested up to: 5.1
12
  * Requires WP: 5.4
13
+ * Version: 2.3.1
14
  *
15
  * @package WooCommerce\Payments
16
  */