woocommerce/packages/woocommerce-blocks/build/wc-payment-method-cod.js
2021-12-10 12:03:04 +00:00

1 line
2.0 KiB
JavaScript

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}({1:function(e,t){e.exports=window.wp.i18n},26:function(e,t,n){"use strict";n.r(t);var r,o=n(7),i=n(1),u=n(4),c=n(6),l=Object(u.getSetting)("cod_data",{}),a=Object(i.__)("Cash on delivery",'woocommerce'),s=Object(c.decodeEntities)(l.title)||a,d=function(){return Object(c.decodeEntities)(l.description||"")},f=function(e){var t=e.components.PaymentMethodLabel;return React.createElement(t,{text:s})},p={name:"cod",label:React.createElement(f,null),content:React.createElement(d,null),edit:React.createElement(d,null),canMakePayment:function(e){var t=e.cartNeedsShipping,n=e.selectedShippingMethods;if(!l.enableForVirtual&&!t)return!1;if(!l.enableForShippingMethods.length)return!0;var r=Object.values(n);return l.enableForShippingMethods.some((function(e){return r.some((function(t){return t.includes(e)}))}))},ariaLabel:s,supports:{features:null!==(r=null==l?void 0:l.supports)&&void 0!==r?r:[]}};Object(o.registerPaymentMethod)(p)},4:function(e,t){e.exports=window.wc.wcSettings},6:function(e,t){e.exports=window.wp.htmlEntities},7:function(e,t){e.exports=window.wc.wcBlocksRegistry}});