Viewing File: /home/rtsgrob/ww6/wp-content/plugins/woocommerce-payments/dist/multi-currency-analytics.js

(()=>{var e={};(()=>{var r;globalThis.importScripts&&(r=globalThis.location+"");var o=globalThis.document;if(!r&&o&&(o.currentScript&&"SCRIPT"===o.currentScript.tagName.toUpperCase()&&(r=o.currentScript.src),!r)){var t=o.getElementsByTagName("script");if(t.length)for(var c=t.length-1;c>-1&&(!r||!/^http(s?):/.test(r));)r=t[c--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=r})(),e.p=window.wcpayAssets.url,(()=>{"use strict";const e=window.wp.hooks,r=window.wp.i18n,o=()=>wcSettings.customerCurrencies?.sort((e,r)=>e.label<r.label?-1:1)??[];(0,e.addFilter)("woocommerce_admin_orders_report_advanced_filters","woocommerce-payments",e=>(e.filters={currency:{labels:{add:(0,r.__)("Customer currency","woocommerce-payments"),remove:(0,r.__)("Remove customer currency filter","woocommerce-payments"),rule:(0,r.__)("Select a customer currency filter match","woocommerce-payments"),title:(0,r.__)("{{title}}Customer Currency{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"),filter:(0,r.__)("Select a customer currency","woocommerce-payments")},rules:[{value:"is",label:(0,r.__)("Is","woocommerce-payments")},{value:"is_not",label:(0,r.__)("Is Not","woocommerce-payments")}],input:{component:"SelectControl",options:o()},allowMultiple:!0},...e.filters},e)),(0,e.addFilter)("woocommerce_admin_report_table","woocommerce-payments",e=>{if(!e.items||!e.items.data||!e.items.data.length||"orders"!==e.endpoint)return e;const o=[...e.headers,{isNumeric:!1,isSortable:!1,key:"customer_currency",label:(0,r.__)("Customer currency","woocommerce-payments"),required:!1,screenReaderLabel:(0,r.__)("Customer currency","woocommerce-payments")}],t=e.rows.map((r,o)=>{const t=e.items.data[o],c=t.hasOwnProperty("order_currency")?t.order_currency:"";return[...r,{display:c,value:c}]});return e.rows=t,e.headers=o,e}),(0,e.addFilter)("woocommerce_admin_orders_report_filters","woocommerce-payments",e=>[{label:(0,r.__)("Customer currency","woocommerce-payments"),param:"currency",staticParams:[],showFilters:()=>!0,filters:[{label:(0,r.__)("All currencies","woocommerce-payments"),value:"all"},...o()]},...e]),(0,e.addFilter)("woocommerce_admin_report_currency","woocommerce-payments",(e,{currency:r})=>{if(!r)return e;const o=Object.values(wcpaySettings?.currencyData??{}).find(e=>e.code===r);return o?{...e,symbol:o.symbol}:e})})()})();
Back to Directory File Manager