Файловый менеджер - Редактировать - /home/harasnat/www/labour/wp-content/plugins/google-listings-and-ads/js/build/settings.js
Назад
"use strict";(globalThis.webpackChunkgoogle_listings_and_ads=globalThis.webpackChunkgoogle_listings_and_ads||[]).push([[472],{521:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(7143),a=n(6520),l=n(7692),s=n(2775);const c="products",r={products:[],intervals:[],totals:{}};function i(e){const t=(0,s.A)();return(0,o.useSelect)((n=>{const{getReport:o}=n(a.Ui),s=o(c,e,t,"primary"),i=o(c,e,t,"secondary"),d=s.loaded&&i.loaded;let g=r;return d&&s.data&&i.data&&(g={products:s.data.products||r.products,intervals:s.data.intervals||r.intervals,totals:(0,l.bM)(s.data.totals,i.data.totals,s.reportQuery.fields)}),{data:g,loaded:d}}),[e,t])}},2379:(e,t,n)=>{n.r(t),n.d(t,{default:()=>pe});var o=n(1609),a=n(6087),l=n(6476),s=n(3905),c=n(14),r=n(8e3),i=n(1016),d=n(3666),g=n(3354),u=n(7723),m=n(8242),h=n(3741),E=n(6960),_=n(8864),A=n(8683),p=n(1177),y=n(850);const f=({handleSubmit:e})=>{const{getInputProps:t,adapter:{isSubmitting:n}}=(0,E.h5)(),{onChange:l,...s}=t("tax_rate"),c=t=>{l(t),e()};return(0,o.createElement)(m.A,{title:(0,u.__)("Tax rate (required for U.S. only)","google-listings-and-ads"),description:(0,o.createElement)("div",null,(0,o.createElement)("p",null,(0,u.__)("This tax rate will be shown to potential customers, together with the cost of your product.","google-listings-and-ads")),(0,o.createElement)("p",null,(0,o.createElement)(p.A,{context:"setup-mc-tax-rate",linkId:"tax-rate-read-more",href:"https://support.google.com/merchants/answer/160162"},(0,u.__)("Read more","google-listings-and-ads"))))},(0,o.createElement)(m.A.Card,null,(0,o.createElement)(m.A.Card.Body,null,(0,o.createElement)(y.A,{size:"large"},(0,o.createElement)(A.A,{...s,label:(0,u.__)("My store uses destination-based tax rates.","google-listings-and-ads"),value:"destination",collapsible:!0,disabled:n,onChange:c},(0,o.createElement)(_.A,null,(0,u.__)("Google’s estimated tax rates will automatically be applied to my product listings.","google-listings-and-ads"))),(0,o.createElement)(A.A,{...s,label:(0,u.__)("My store does not use destination-based tax rates.","google-listings-and-ads"),value:"manual",collapsible:!0,disabled:n,onChange:c},(0,o.createElement)(_.A,null,(0,a.createInterpolateElement)((0,u.__)("I’ll set my tax rates up manually in <link>Google Merchant Center</link>. I understand that if I don’t set this up, my products will be disapproved.","google-listings-and-ads"),{link:(0,o.createElement)(p.A,{context:"setup-mc-tax-rate",linkId:"tax-rate-manual",href:"https://www.google.com/retail/solutions/merchant-center/"})})))))))};var C=n(873),v=n(7337);var b=n(5847),G=n(5640),w=n(6876);const x=new Set(["destination","manual"]);function k(){const{settings:e,saveSettings:t,syncSettings:n}=(0,C.A)(),{data:a}=(0,b.A)(),l=((e=null)=>{const{code:t}=(0,v.A)();return"US"===t||!(!e||!e.includes("US"))||(!t||null===e)&&null})(a),{createNotice:s}=(0,G.A)();return l&&e?.hasOwnProperty("tax_rate")?(0,o.createElement)(E.Ay,{initialValues:{tax_rate:e.tax_rate},validate:e=>{const t={};return x.has(e.tax_rate)||(t.tax_rate=(0,u.__)("Please specify tax rate option.","google-listings-and-ads")),t},onSubmit:async o=>{const a={...e,tax_rate:o.tax_rate};return t(a).then(n,(e=>{(0,w.h)(e,(0,u.__)("There was an error saving tax rate.","google-listings-and-ads"))})).catch((e=>{(0,w.h)(e,(0,u.__)("There was an error synchronizing tax rate to Google Merchant Center.","google-listings-and-ads"))})).then((()=>{s("success",(0,u.__)("Your change to tax rate has been saved and will be synced to your Google Merchant Center.","google-listings-and-ads"))}))}},(e=>(0,o.createElement)(f,{handleSubmit:e.handleSubmit}))):!1===l?null:(0,o.createElement)(m.A,null,(0,o.createElement)(h.A,null))}var S=n(6427),D=n(1968),I=n(7401),T=n(7916),N=n(1378),F=n(7892),M=n(6028),P=n(4790),R=n(8678),W=n(458),j=n(7807);function q(e){return(0,o.createElement)(m.A,{title:(0,u.__)("Linked accounts","google-listings-and-ads"),description:(0,u.__)("A WordPress.com account, Google account, Google Merchant Center account, and Google Ads account are required to use this extension in WooCommerce.","google-listings-and-ads"),...e})}var B=n(9457),O=n(7792),z=n(2434);const L="all-accounts",H="ads-account",K={[L]:{title:(0,u.__)("Disconnect all accounts","google-listings-and-ads"),confirmButton:(0,u.__)("Disconnect all accounts","google-listings-and-ads"),confirmation:(0,u.__)("Yes, I want to disconnect all my accounts.","google-listings-and-ads"),contents:[(0,u.__)("I understand that I am disconnecting any WordPress.com account, Google account, Google Merchant Center account and Google Ads account connected to this extension.","google-listings-and-ads"),(0,u.__)("Any active product listings will continue to show on Google. They can be managed, edited, or deleted manually from Google Merchant Center (merchants.google.com).","google-listings-and-ads"),(0,u.__)("Any ongoing campaigns will continue to run. They can be managed, edited, or deleted manually from Google Ads (ads.google.com).","google-listings-and-ads")]},[H]:{title:(0,u.__)("Disconnect Google Ads account","google-listings-and-ads"),confirmButton:(0,u.__)("Disconnect Google Ads Account","google-listings-and-ads"),confirmation:(0,u.__)("Yes, I want to disconnect my Google Ads account.","google-listings-and-ads"),contents:[(0,u.__)("I understand that I am disconnecting my Google Ads account from this WooCommerce extension.","google-listings-and-ads"),(0,u.__)("Any ongoing campaigns will continue to run. They can be managed, edited, or deleted manually from Google Ads (ads.google.com).","google-listings-and-ads"),(0,u.__)("Some configurations for Google Ads created through WooCommerce may be lost. This cannot be undone.","google-listings-and-ads")]}};function U({disconnectTarget:e,onRequestClose:t,onDisconnected:n,disconnectAction:l}){const[s,c]=(0,a.useState)(!1),[r,i]=(0,a.useState)(!1),d=(0,z.j)(),{title:g,confirmButton:m,confirmation:h,contents:E}=K[e],_=()=>{r||t()};return(0,o.createElement)(B.A,{className:"gla-disconnect-accounts-modal",title:(0,o.createElement)(o.Fragment,null,(0,o.createElement)(O.A,{size:20}),g),isDismissible:!r,buttons:[(0,o.createElement)(F.A,{key:"1",isSecondary:!0,disabled:r,onClick:_},(0,u.__)("Never mind","google-listings-and-ads")),(0,o.createElement)(F.A,{key:"2",isPrimary:!0,isDestructive:!0,loading:r,disabled:!s,onClick:()=>{let o=e===L?d.disconnectAllAccounts:d.disconnectGoogleAdsAccount;l&&(o=l),i(!0),o().then((()=>{n(),t()})).catch((()=>{i(!1)}))}},m)],onRequestClose:_},E.map(((e,t)=>(0,o.createElement)("p",{key:t},e))),(0,o.createElement)(S.CheckboxControl,{label:h,checked:s,disabled:r,onChange:c}))}function Y(e){return(0,o.createElement)(U,{...e})}var $=n(6473);const{CONNECTED:Q,INCOMPLETE:J}=s.Wn;function V(){const e=(0,D.A)(),{jetpack:t}=(0,I.A)(),{google:n}=(0,r.A)(),{googleMCAccount:l}=(0,T.A)(),{googleAdsAccount:s}=(0,N.A)(),c=!(t&&n&&l&&s),i=[Q,J].includes(s?.status),[g,h]=(0,a.useState)(null);return(0,o.createElement)(q,null,g&&(0,o.createElement)(Y,{onRequestClose:()=>h(null),onDisconnected:()=>{(0,$.Ff)("gla_disconnected_accounts",{context:g});const t=g===L?e+(0,d.XG)():window.location.href;window.location.href=t},disconnectTarget:g}),c?(0,o.createElement)(M.A,null):(0,o.createElement)(o.Fragment,null,(0,o.createElement)(P.LJ,{jetpack:t}),(0,o.createElement)(R.Az,{googleAccount:n,hideAccountSwitch:!0}),(0,o.createElement)(j.D,{googleMCAccount:l}),i&&(0,o.createElement)(W.Ez,{googleAdsAccount:s,hideAccountSwitch:!0},(0,o.createElement)(m.A.Card.Footer,null,(0,o.createElement)(F.A,{isDestructive:!0,isLink:!0,onClick:()=>h(H)},(0,u.__)("Disconnect Google Ads account only","google-listings-and-ads")))),(0,o.createElement)(S.Flex,{justify:"flex-end"},(0,o.createElement)(F.A,{isPrimary:!0,isDestructive:!0,onClick:()=>h(L)},(0,u.__)("Disconnect from all accounts","google-listings-and-ads")))))}var X=n(7677),Z=n(1903),ee=n(559);function te(){const{jetpack:e}=(0,I.A)(),t="yes"===e?.active;return(0,a.useEffect)((()=>{t&&(0,l.getHistory)().replace((0,d.FN)())}),[t]),e?(0,o.createElement)(q,null,(0,o.createElement)(ee.A,{className:"gla-wpcom-connection-lost-card",isBorderless:!0,size:"small",icon:(0,o.createElement)(X.A,{icon:Z.A,size:24}),title:(0,u.__)("Your WordPress.com account has been disconnected.","google-listings-and-ads"),helper:(0,u.__)("Connect your WordPress.com account to ensure your products stay listed on Google. If you do not re-connect, your products can’t be automatically synced to Google, and any existing listings may be removed from Google.","google-listings-and-ads")}),(0,o.createElement)(P.s9,null)):(0,o.createElement)(h.A,null)}var ne=n(7400),oe=n(9415);function ae({email:e}){const t=(0,D.A)(),[n,s]=(0,a.useState)(null),{disconnectGoogleAccount:c}=(0,z.j)(),[r,i]=(0,a.useState)(!1);return(0,o.createElement)(ee.A,{appearance:ee.x.GOOGLE,description:e},(0,o.createElement)(S.CardDivider,null),(0,o.createElement)(m.A.Card.Body,null,(0,o.createElement)(S.Notice,{status:"error",isDismissible:!1},(0,o.createElement)("p",null,(0,a.createInterpolateElement)((0,u.__)("This Google account, <accountEmail />, was not the Google account previously connected to this integration.","google-listings-and-ads"),{accountEmail:(0,o.createElement)("strong",null,e)})),(0,o.createElement)("p",null,(0,u.__)("Thus, it doesn‘t have access to the Google Merchant Center and/or Google Ads account currently connected to this WooCommerce store.","google-listings-and-ads")),(0,o.createElement)("p",null,(0,u.__)("Try connecting with a different Google account, or completely disconnect all your connected accounts.","google-listings-and-ads")))),(0,o.createElement)(m.A.Card.Footer,{justify:"flex-end"},n&&(0,o.createElement)(Y,{onRequestClose:()=>s(null),onDisconnected:()=>{const e=(0,l.getNewPath)(null,"/google/start",null);window.location.href=t+e},disconnectTarget:n}),(0,o.createElement)(F.A,{isSecondary:!0,isDestructive:!0,disabled:r,onClick:()=>s(L)},(0,u.__)("Disconnect all accounts","google-listings-and-ads")),(0,o.createElement)(F.A,{isPrimary:!0,loading:r,onClick:()=>{i(!0),c().catch((()=>{i(!1)}))}},(0,u.__)("Try another Google account","google-listings-and-ads"))))}function le(){const{data:e}=(0,oe.A)("getGoogleAccountAccess"),t=(0,ne.A)(s.Th.adsSetupComplete,e?.scope),n="yes"===e?.active,c=n?"no"===e?.merchant_access||"no"===e?.ads_access:void 0,r=n&&!c&&t.reconnectionRequired;if((0,a.useEffect)((()=>{r&&(0,l.getHistory)().replace((0,d.uZ)())}),[r]),!e)return(0,o.createElement)(h.A,null);if(!r){const t=c?(0,o.createElement)(ae,{email:e.email}):(0,o.createElement)(R.Ay,null);return(0,o.createElement)(m.A,{title:(0,u.__)("Connect account","google-listings-and-ads")},t)}return null}var se=n(6474),ce=n(5595),re=n(7539),ie=n(2455);const de=()=>{(0,se.A)("full-content");const{updateGoogleMCContactInformation:e}=(0,z.j)(),{data:t}=(0,ce.A)(),[n,s]=(0,a.useState)(!1),c=t.isAddressFilled&&t.isMCAddressDifferent;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(re.A,{title:(0,u.__)("Edit store address","google-listings-and-ads"),helpButton:(0,o.createElement)(ie.A,{eventContext:"edit-store-address"}),backHref:(0,d.FN)()}),(0,o.createElement)("div",{className:"gla-settings"},(0,o.createElement)(m.A,{title:(0,u.__)("Store address","google-listings-and-ads"),description:(0,o.createElement)("div",null,(0,o.createElement)("p",null,(0,u.__)("Your store address is required by Google for verification purposes. It will be shared with the Google Merchant Center and will not be displayed to customers.","google-listings-and-ads")),(0,o.createElement)("p",null,(0,o.createElement)(p.A,{context:"settings-store-address",linkId:"contact-information-read-more",href:"https://woocommerce.com/document/google-for-woocommerce/get-started/requirements/#contact-information"},(0,u.__)("Learn more","google-listings-and-ads"))))},(0,o.createElement)(g.S,null)),(0,o.createElement)(m.A,null,(0,o.createElement)(S.Flex,{justify:"flex-end"},(0,o.createElement)(F.A,{isPrimary:!0,loading:n,disabled:!c,eventName:"gla_contact_information_save_button_click",onClick:()=>{s(!0),e().then((()=>(0,l.getHistory)().push((0,d.FN)()))).catch((()=>s(!1)))}},(0,u.__)("Save details","google-listings-and-ads"))))))};var ge=n(9927),ue=n(5246),me=n(7143);const he="getEnableEnhancedConversions",Ee=()=>{const{hasGoogleAdsConnection:e,hasFinishedResolution:t}=(0,N.A)(),{isEnabled:n,hasFinishedResolution:l}=(()=>{const{hasGoogleAdsConnection:e,hasFinishedResolution:t}=(0,N.A)();return(0,me.useSelect)((n=>{if(!t||!e)return{isEnabled:!1,hasFinishedResolution:t};const o=n(z.U);return{isEnabled:o[he](),hasFinishedResolution:o.hasFinishedResolution(he,[])}}),[e,t])})(),[s,c]=(0,a.useState)(!1),{createNotice:r}=(0,G.A)(),{updateEnhancedConversionsStatus:i}=(0,z.j)(),d=(0,a.useCallback)((async()=>{await i(!n)}),[i,n]);let g=(0,u.__)("Please make sure to follow the documentation to enable Enhanced Conversions. The feature needs to be enabled both here on WooCommerce and on your Google Ads account.","google-listings-and-ads");e||(g=(0,u.__)("Please connect your Google Ads account in order to use Enhanced Conversions data.","google-listings-and-ads"));const h=t&&l,E=!e||s;return(0,o.createElement)(m.A,{title:(0,u.__)("Improve conversion accuracy","google-listings-and-ads"),description:(0,o.createElement)("div",null,(0,o.createElement)("p",null,(0,u.__)("Enhanced Conversions is a feature designed to improve your measurement accuracy by collecting privacy-conscious data without the need for third-party cookies.","google-listings-and-ads")),(0,o.createElement)("p",null,(0,o.createElement)(p.A,{href:"https://support.google.com/google-ads/answer/9888656",context:"setup-enhanced-conversions",linkId:"enhanced-conversions-read-more"},(0,u.__)("Read more","google-listings-and-ads"))))},!h&&(0,o.createElement)(M.A,null),h&&(0,o.createElement)(m.A.Card,null,(0,o.createElement)(m.A.Card.Body,null,(0,o.createElement)(S.CheckboxControl,{label:(0,u.__)("Send Enhanced Conversions data to Google Ads","google-listings-and-ads"),checked:n,disabled:E,onChange:async()=>{try{c(!0),await d(),r("success",(0,u.__)("Enhanced Conversions status updated successfully.","google-listings-and-ads"))}catch(e){}finally{c(!1)}},help:g}))))};var _e=n(2635);const Ae="gla-settings",pe=()=>{const{subpath:e}=(0,l.getQuery)();(0,c.A)(),(0,i.A)();const{google:t}=(0,r.A)(),n=e===d.$K.reconnectGoogleAccount;switch((0,a.useEffect)((()=>{n||"no"!==t?.active||(0,l.getHistory)().replace((0,d.Ke)(s.iH.GOOGLE_DISCONNECTED))}),[n,t]),e){case d.$K.reconnectWPComAccount:return(0,o.createElement)("div",{className:Ae},(0,o.createElement)(te,null));case d.$K.reconnectGoogleAccount:return(0,o.createElement)(le,null);case d.$K.editStoreAddress:return(0,o.createElement)(de,null)}return(0,o.createElement)("div",{className:Ae},(0,o.createElement)(_e.A,null),(0,o.createElement)(ge.A,null),(0,o.createElement)(ue.A,null),(0,o.createElement)(Ee,null),(0,o.createElement)(g.h,null),(0,o.createElement)(k,null),(0,o.createElement)(V,null))}}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка