← Back
Editing: subscriptions-empty-state.js
(()=>{var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{var t;globalThis.importScripts&&(t=globalThis.location+"");var s=globalThis.document;if(!t&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(t=s.currentScript.src),!t)){var r=s.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=r[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{"use strict";window.React;const t=window.wp.i18n,s=window.wp.element,r=window.wp.components,o=window.wp.domReady;var n=e.n(o);const c=(e,t={})=>{if(window.wcpaySettings){Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country,hosting_provider:wcpaySettings.trackingInfo?.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}n()(()=>{(wc?.tracks?.recordEvent??wcTracks.recordEvent)(e,t)})},i=e.p+"../assets/images/subscriptions-empty-state-unconnected.svg?ver=4b933b521c687a443831",a=window.ReactJSXRuntime,{wcpay:{connectUrl:p,isConnected:_,newProductUrl:d}}=window,w=()=>(0,a.jsx)("img",{src:i,alt:""}),l=()=>(0,a.jsx)("p",{className:"woo_subscriptions_empty_state__description",children:(0,t.sprintf)((0,t.__)("Track recurring revenue and manage active subscriptions directly from your store’s dashboard — powered by %s.","woocommerce-payments"),"WooPayments")}),u=()=>(0,a.jsx)("p",{className:"wcpay-empty-subscriptions__tos",children:(0,s.createInterpolateElement)((0,t.__)('By clicking "Finish setup", you agree to the <a>Terms of Service</a>',"woocommerce-payments"),{a:(0,a.jsx)("a",{href:"https://wordpress.com/tos/",target:"_blank",rel:"noreferrer"})})}),m=()=>{const[e,o]=(0,s.useState)(!1),[n,i]=(0,s.useState)(!1);return(0,a.jsxs)("div",{className:"woo_subscriptions_empty_state__button_container",children:[(0,a.jsx)(r.Button,{disabled:e,href:p,isBusy:e,variant:"primary",onClick:()=>{c("wcpay_subscriptions_empty_state_finish_setup"),o(!0)},__next40pxDefaultSize:!0,children:(0,t.__)("Finish setup","woocommerce-payments")}),(0,a.jsx)(r.Button,{disabled:n,href:d,isBusy:n,variant:"secondary",onClick:()=>{c("wcpay_subscriptions_empty_state_create_product"),i(!0)},__next40pxDefaultSize:!0,children:(0,t.__)("Create subscription product","woocommerce-payments")})]})},y=()=>(0,a.jsxs)("div",{className:"woo_subscriptions_empty_state__container",children:[(0,a.jsx)(w,{}),(0,a.jsx)(l,{}),(0,a.jsx)(u,{}),(0,a.jsx)(m,{})]}),b=document.querySelector("#woo_subscriptions_empty_state");b&&(c("wcpay_subscriptions_empty_state_view",{is_connected:_?"yes":"no"}),_||(0,s.render)((0,a.jsx)(y,{}),b))})()})();
Save File
Cancel