@automattic/newspack-blocks 4.5.0-alpha.2 → 4.5.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -2
- package/dist/modal.asset.php +1 -1
- package/dist/modal.js +1 -1
- package/dist/modalCheckout-rtl.css +1 -1
- package/dist/modalCheckout.asset.php +1 -1
- package/dist/modalCheckout.css +1 -1
- package/includes/class-modal-checkout.php +106 -40
- package/newspack-blocks.php +2 -2
- package/package.json +1 -1
- package/src/modal-checkout/checkout.scss +10 -0
- package/src/modal-checkout/modal.js +16 -8
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
# [4.5.0-alpha.
|
|
1
|
+
# [4.5.0-alpha.3](https://github.com/Automattic/newspack-blocks/compare/v4.5.0-alpha.2...v4.5.0-alpha.3) (2024-12-06)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* **modal-checkout:** allow all gateway assets ([#1988](https://github.com/Automattic/newspack-blocks/issues/1988)) ([e371e30](https://github.com/Automattic/newspack-blocks/commit/e371e309a41dd0239088e5fc8914093073f0e23a))
|
|
7
|
+
* **modal-checkout:** handle paypal ([#1985](https://github.com/Automattic/newspack-blocks/issues/1985)) ([9bb2b8c](https://github.com/Automattic/newspack-blocks/commit/9bb2b8c9d82dbb9e5e110845c2a2f2d077aa7ee7))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add CSS class to variation buttons for tracking ([#1989](https://github.com/Automattic/newspack-blocks/issues/1989)) ([910e6b1](https://github.com/Automattic/newspack-blocks/commit/910e6b157fd6412b37c7b0ffb56589412a0058a2))
|
|
7
13
|
|
|
8
14
|
# [4.4.0](https://github.com/Automattic/newspack-blocks/compare/v4.3.7...v4.4.0) (2024-11-25)
|
|
9
15
|
|
package/dist/modal.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '4f3f70a9011f0284bcc8');
|
package/dist/modal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";function e(e,t=!1){const n=e.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])');if(0===n.length)return!1;const o=n?.[0];let c;o.focus(),t?(document.addEventListener("keydown",(function(e){if(("Tab"===e.key||9===e.keyCode)&&e.shiftKey&&document.activeElement===o){const n=t.contentWindow.document,o=n.getElementById("customer_details"),a=n.getElementById("after_customer_details"),r=n.getElementById("checkout-after-success");null!==r?c=r:null!==o.offsetParent?c=n.getElementById("checkout_continue"):null!==a.offsetParent&&(c=n.getElementById("checkout_back")),c.focus(),e.preventDefault()}})),document.getElementById("newspack-a11y-last-element").addEventListener("focus",(()=>{o.focus()}))):(c=n[n.length-1],document.addEventListener("keydown",(function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===o&&(c.focus(),e.preventDefault()):document.activeElement===c&&(o.focus(),e.preventDefault()))})))}const t=(e,t={})=>({...t,action:e}),n=(e,t="np_modal_checkout_interaction")=>{"function"==typeof window.gtag&&e&&window.gtag("event",t,e)},o=e=>{if("function"!=typeof window.gtag)return;let o="opened";const{action_type:c,amount:a="",currency:r,is_variable:i="",price:s="",product_id:d,product_type:l,recurrence:u,referrer:p,variation_id:_=""}=e,m={action_type:c,currency:r,product_id:d,product_type:l,referrer:p};(a||s)&&(m.amount=a||s),i&&(m.is_variable=i),_&&(m.variation_id=_),u&&(m.recurrence=u),i&&!_&&(o="opened_variations");const y=t(o,m);n(y)},c=e=>{if("function"!=typeof window.gtag)return;e=e||(e=>{const t=document.getElementById("newspack_modal_checkout"),n=!!t&&t.getAttribute("data-order-details");return!!n&&JSON.parse(n)||{}})();const{action_type:o,amount:c="",currency:a,price:r="",product_id:i,product_type:s,recurrence:d,referrer:l,variation_id:u=""}=e,p={action_type:o,currency:a,product_id:i,product_type:s,recurrence:d,referrer:l};(c||r)&&(p.amount=c||r),u&&(p.variation_id=u);const _=t("dismissed",p);n(_)};function a(e,t=null){const n=document.createElement("input");return n.type="hidden",n.name=e,t&&(n.value=t),n}const r=newspackBlocksModal.newspack_class_prefix,i="newspack_modal_checkout_iframe",s="newspack_modal_checkout_container",d=`${r}__modal`,l="newspack-blocks__modal-variation";let u={},p=!1;var _;_=()=>{const t=document.querySelector("#newspack_modal_checkout");if(!t)return;const n=t.querySelector(`.${d}__content`),_=a("modal_checkout","1"),m=n.querySelector(`.${r}__spinner`);let y=document.querySelector(".newspack-reader__account-link")?.[0];const f="600px",h=document.createElement("iframe");function k(){const n=h.contentWindow.location;if(window.newspackReaderActivation&&n.href.indexOf("order-received")>-1){const e=window.newspackReaderActivation,t=new Proxy(new URLSearchParams(n.search),{get:(e,t)=>e.get(t)});t.email&&(e.setReaderEmail(t.email),e.setAuthenticated(!0))}const o=h?.contentDocument?.querySelector(`#${s}`),c=()=>{g.observe(o),"none"!==m.style.display&&(m.style.display="none"),"visible"!==h.style.visibility&&(h.style.visibility="visible"),h._ready=!0};o&&(o.checkoutComplete?($("small"),A(newspackBlocksModal.labels.thankyou_modal_title),c(),e(t.querySelector(`.${d}`))):($(),A(newspackBlocksModal.labels.checkout_modal_title)),o.checkoutReady?c():o.addEventListener("checkout-ready",c))}h.name=i,h.style.height=f,h.style.visibility="hidden",h.addEventListener("load",k);const w=t=>{const n=t.target;n.classList.add("modal-processing");const s=n.dataset.product;if(s){const e=JSON.parse(s);Object.keys(e).forEach((t=>{0===n.querySelectorAll('input[name="'+t+'"]').length&&n.appendChild(a(t,e[t]))}))}const d=new FormData(n);d.get("variation_id")||(y=t.submitter);const _=document.querySelectorAll(`.${l}`);if(_.forEach((e=>{E(e)})),d.get("is_variable")&&!d.get("variation_id")){const c=[..._].find((e=>e.dataset.productId===d.get("product_id")));if(c){c.querySelectorAll(`form[target="${i}"]`).forEach((e=>{["after_success_behavior","after_success_url","after_success_button_label"].forEach((t=>{0===e.querySelectorAll('input[name="'+t+'"]').length&&e.appendChild(a(t,d.get(t)))}));const t=e.dataset.product;if(t){const n=JSON.parse(t);Object.keys(n).forEach((t=>{0===e.querySelectorAll('input[name="'+t+'"]').length&&e.appendChild(a(t,n[t]))}))}})),t.preventDefault(),n.classList.remove("modal-processing"),q(c),e(c,!1);const r=n.getAttribute("data-product");return u=r?JSON.parse(r):{},p||o(u),void document.getElementById("newspack_modal_checkout").setAttribute("data-order-details",JSON.stringify(u))}}n.classList.remove("modal-processing");const m=d.get("newspack_donate"),f=d.get("newspack_checkout");if(f){const e=n.getAttribute("data-product");u=e?JSON.parse(e):{}}else if(m){const e=d.get("donation_frequency");let t="",n="";for(const n of d.keys())n.indexOf("donation_value_"+e)>=0&&"other"!==d.get(n)&&""!==d.get(n)&&(t=d.get(n));const o=JSON.parse(d.get("frequency_ids"));for(const t in o)t===e&&(n=o[t].toString());u={amount:t,action_type:"donation",currency:d.get("donation_currency"),product_id:n,product_type:"donation",recurrence:e,referrer:d.get("_wp_http_referer")}}if(p||o(u),p=!0,"undefined"!=typeof newspack_ras_config&&!newspack_ras_config?.is_logged_in&&!window?.newspackReaderActivation?.getReader?.()?.authenticated&&newspackBlocksModal?.is_registration_required&&window?.newspackReaderActivation?.openAuthModal){t.preventDefault();let e="",o="0",a="";if(m){const e=d.get("donation_frequency"),t=n.querySelectorAll(`.donation-tier__${e}, .donation-frequency__${e}`);if(t?.length){const c=d.get("donation_tier_index");if(c){const n=JSON.parse(t?.[c].dataset.product);n.hasOwnProperty(`donation_price_summary_${e}`)&&(a=n[`donation_price_summary_${e}`])}else{const c=n.querySelectorAll(`input[name="donation_value_${e}"], input[name="donation_value_${e}_untiered"]`);c?.length&&(c.forEach((e=>{e.checked&&"other"!==e.value&&(o=e.value)})),t.forEach((t=>{const n=JSON.parse(t.dataset.product);if(n.hasOwnProperty(`donation_price_summary_${e}`)){const t=n[`donation_price_summary_${e}`];new RegExp(`(?<=\\D)${o}(?=\\D)`).test(t)&&(a=t)}if("0"===o&&a){let t=d.get(`donation_value_${e}_other`);t||(t=d.get(`donation_value_${e}_untiered`)),t&&(a=a.replace("0",t))}})))}}}else if(f){const e=n.querySelector('input[name="product_price_summary"]');e&&(a=e.value)}a&&(e=`<div class="order-details-summary ${r}__box ${r}__box--text-center"><p><strong>${a}</strong></p></div>`);const i=(e=>new Promise(((t,n)=>{const o=new URLSearchParams(e);o.append("action","modal_checkout_request"),fetch(newspackBlocksModal.ajax_url+"?"+o.toString()).then((e=>{e.ok||n(e),e.json().then((e=>{t(e.url)})).catch(n)})).catch(n)})))(d);i.then((e=>{window.newspackReaderActivation?.setPendingCheckout?.(e)})),window.newspackReaderActivation.openAuthModal({title:newspackBlocksModal.labels.auth_modal_title,onSuccess:(e,t)=>{i.then((e=>{t?.registered&&(e+=`&${newspackBlocksModal.checkout_registration_flag}=1`);const n=v(e);L(n)})).catch((e=>{console.warn("Unable to generate cart:",e),b()}))},onError:()=>{b()},onDismiss:()=>{c(u),p=!1,document.getElementById("newspack_modal_checkout").removeAttribute("data-order-details")},skipSuccess:!0,skipNewslettersSignup:!0,labels:{signin:{title:newspackBlocksModal.labels.signin_modal_title},register:{title:newspackBlocksModal.labels.register_modal_title}},content:e,trigger:t.submitter})}else S(),document.getElementById("newspack_modal_checkout").setAttribute("data-order-details",JSON.stringify(u))},v=e=>{const t=document.createElement("form");t.method="POST",t.action=e,t.target=i,t.style.display="none";const n=document.createElement("button");return n.setAttribute("type","submit"),t.appendChild(n),document.body.appendChild(t),t.addEventListener("submit",w),t},g=new ResizeObserver((e=>{if(!e||!e.length)return;const t=e[0].contentRect;if(t){const e=t.top+t.bottom;if(0===e)return void(h.style.visibility="hidden");n.style.height=e+"px",h.style.height=e+"px"}})),b=()=>{const e=h?.contentDocument?.querySelector(`#${s}`),t=e?.querySelector('input[name="after_success_url"]'),o=e?.querySelector('input[name="after_success_behavior"]'),a=document?.querySelector(".newspack-newsletters-signup-modal");!e?.checkoutComplete&&h?.contentWindow?.newspackBlocksModalCheckout&&(()=>{const e=new FormData;e.append("modal_checkout","1"),e.append("action","abandon_modal_checkout"),e.append("_wpnonce",h?.contentWindow?.newspackBlocksModalCheckout?.checkout_nonce),fetch(newspackBlocksModal.ajax_url,{method:"POST",body:e})})();const r=!t||!o||!e?.checkoutComplete;if((r||a)&&(m.style.display="flex",h&&n.contains(h)&&(h._ready=!1,h.src="about:blank",h.style.height=f,h.style.visibility="hidden",n.style.height=f,n.removeChild(h)),g&&g.disconnect(),document.querySelectorAll(`.${d}-container`).forEach((e=>E(e))),y&&y.focus()),e?.checkoutComplete){const e=()=>{if(t&&o){const e=t.getAttribute("value"),n=o.getAttribute("value");"custom"===n?window.location.href=e:"referrer"===n&&window.history.back()}window?.newspackReaderActivation?.setPendingCheckout?.(),p=!1};window?.newspackReaderActivation?.openNewslettersSignupModal?window.newspackReaderActivation.openNewslettersSignupModal({onSuccess:e,onError:e,closeOnSuccess:r}):e(),r&&($(),A(newspackBlocksModal.labels.checkout_modal_title))}else window?.newspackReaderActivation?.setPendingCheckout?.(),c(),p=!1,document.getElementById("newspack_modal_checkout").removeAttribute("data-order-details")},S=()=>{m.style.display="flex",q(t),n.appendChild(h),t.addEventListener("click",(e=>{e.target===t&&b()})),e(t,h),function(e){h._readyTimer&&clearTimeout(h._readyTimer);let t=!1;function n(){t||(t=!0,clearTimeout(h._readyTimer),e.call(this))}function o(){"complete"===this.readyState&&n.call(this)}!function e(){if(h._ready)return void clearTimeout(h._readyTimer);const t=h.contentDocument||h.contentWindow?.document;t&&0!==t.URL.indexOf("about:")?"complete"===t?.readyState?n.call(t):(t.addEventListener("DOMContentLoaded",n),t.addEventListener("readystatechange",o)):h._readyTimer=setTimeout(e,10)}()}(k)},E=e=>{e.overlayId&&window.newspackReaderActivation?.overlays&&window.newspackReaderActivation?.overlays.remove(e.overlayId),e.setAttribute("data-state","closed"),document.body.style.overflow="auto"},q=e=>{window.newspackReaderActivation?.overlays&&(t.overlayId=window.newspackReaderActivation?.overlays.add()),e.setAttribute("data-state","open"),document.body.style.overflow="hidden"},A=e=>{const n=t.querySelector(`.${d}__header h2`);n&&(n.innerText=e)},$=(e="default")=>{const n=t.querySelector(`.${d}`);n&&("small"===e?n.classList.add(`${d}--small`):n.classList.remove(`${d}--small`))};window.newspackCloseModalCheckout=b,t.querySelectorAll(`.${d}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),b()}))})),document.querySelectorAll(".newspack-blocks__modal-variation").forEach((e=>{e.addEventListener("click",(t=>{t.target===e&&b()})),e.querySelectorAll(`.${d}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),b()}))}))})),document.addEventListener("keydown",(function(e){"Escape"===e.key&&b()})),document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc, .wp-block-newspack-blocks-checkout-button, .newspack-blocks__modal-variation").forEach((e=>{e.querySelectorAll("form").forEach((e=>{e.appendChild(_.cloneNode()),e.target=i,e.addEventListener("submit",w)}))}));const L=e=>{e.requestSubmit(e.querySelector('button[type="submit"]'))};(()=>{const e=new URLSearchParams(window.location.search);if(!e.has("checkout"))return;const t=e.get("type");if("donate"===t){const t=e.get("layout"),n=e.get("frequency"),o=e.get("amount"),c=e.get("other");t&&n&&o&&((e,t,n,o=null)=>{let c;document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc form").forEach((a=>{const r=a.querySelector(`input[name="donation_frequency"][value="${t}"]`);if(r)if("tiered"===e){const e=document.querySelector(`button[data-frequency-slug="${t}"]`);if(!e)return;e.click();const o=a.querySelector(`button[type="submit"][name="donation_value_${t}"][value="${n}"]`);if(!o)return;o.click()}else{const i="untiered"===e?a.querySelector(`input[name="donation_value_${t}_untiered"]`):a.querySelector(`input[name="donation_value_${t}"][value="${n}"]`);if(r&&i){if(r.checked=!0,"untiered"===e)i.value=n;else if("other"===n){i.click();const e=a.querySelector(`input[name="donation_value_${t}_other"]`);e&&o&&(e.value=o)}else i.checked=!0;c=a}}})),c&&L(c)})(t,n,o,c)}else if("checkout_button"===t){const t=e.get("product_id"),n=e.get("variation_id");t&&((e,t=null)=>{let n;if(t&&t!==e){const o=[...document.querySelectorAll(`.${l}`)].find((t=>t.dataset.productId===e));o&&o.querySelectorAll(`form[target="${i}"]`).forEach((e=>{const o=JSON.parse(e.dataset.product);o?.variation_id===Number(t)&&(n=e)}))}else document.querySelectorAll(".wp-block-newspack-blocks-checkout-button").forEach((t=>{const o=t.querySelector("form");if(!o)return;const c=JSON.parse(o.dataset.product);c?.product_id===e&&(n=o)}));n&&L(n)})(t,n)}else{const e=window.newspackReaderActivation?.getPendingCheckout?.();if(e){const t=v(e);L(t)}}window.history.replaceState(null,null,window.location.pathname)})()},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",_):_())})();
|
|
1
|
+
(()=>{"use strict";function e(e,t=!1){const n=e.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])');if(0===n.length)return!1;const o=n?.[0];let c;o.focus(),t?(document.addEventListener("keydown",(function(e){if(("Tab"===e.key||9===e.keyCode)&&e.shiftKey&&document.activeElement===o){const n=t.contentWindow.document,o=n.getElementById("customer_details"),a=n.getElementById("after_customer_details"),r=n.getElementById("checkout-after-success");null!==r?c=r:null!==o.offsetParent?c=n.getElementById("checkout_continue"):null!==a.offsetParent&&(c=n.getElementById("checkout_back")),c.focus(),e.preventDefault()}})),document.getElementById("newspack-a11y-last-element").addEventListener("focus",(()=>{o.focus()}))):(c=n[n.length-1],document.addEventListener("keydown",(function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===o&&(c.focus(),e.preventDefault()):document.activeElement===c&&(o.focus(),e.preventDefault()))})))}const t=(e,t={})=>({...t,action:e}),n=(e,t="np_modal_checkout_interaction")=>{"function"==typeof window.gtag&&e&&window.gtag("event",t,e)},o=e=>{if("function"!=typeof window.gtag)return;let o="opened";const{action_type:c,amount:a="",currency:r,is_variable:i="",price:s="",product_id:l,product_type:d,recurrence:u,referrer:p,variation_id:_=""}=e,m={action_type:c,currency:r,product_id:l,product_type:d,referrer:p};(a||s)&&(m.amount=a||s),i&&(m.is_variable=i),_&&(m.variation_id=_),u&&(m.recurrence=u),i&&!_&&(o="opened_variations");const y=t(o,m);n(y)},c=e=>{if("function"!=typeof window.gtag)return;e=e||(e=>{const t=document.getElementById("newspack_modal_checkout"),n=!!t&&t.getAttribute("data-order-details");return!!n&&JSON.parse(n)||{}})();const{action_type:o,amount:c="",currency:a,price:r="",product_id:i,product_type:s,recurrence:l,referrer:d,variation_id:u=""}=e,p={action_type:o,currency:a,product_id:i,product_type:s,recurrence:l,referrer:d};(c||r)&&(p.amount=c||r),u&&(p.variation_id=u);const _=t("dismissed",p);n(_)};function a(e,t=null){const n=document.createElement("input");return n.type="hidden",n.name=e,t&&(n.value=t),n}const r=newspackBlocksModal.newspack_class_prefix,i="newspack_modal_checkout_iframe",s="newspack_modal_checkout_container",l=`${r}__modal`,d="newspack-blocks__modal-variation";let u={},p=!1;var _;_=()=>{const t=document.querySelector("#newspack_modal_checkout");if(!t)return;const n=t.querySelector(`.${l}__content`),_=a("modal_checkout","1"),m=n.querySelector(`.${r}__spinner`);let y=document.querySelector(".newspack-reader__account-link")?.[0];const f="600px",h=document.createElement("iframe");function k(){const n=h.contentWindow?.location;if(window.newspackReaderActivation&&n?.href?.includes("order-received")){const e=window.newspackReaderActivation,t=new Proxy(new URLSearchParams(n.search),{get:(e,t)=>e.get(t)});t.email&&(e.setReaderEmail(t.email),e.setAuthenticated(!0))}const o=h?.contentDocument?.querySelector(`#${s}`),c=()=>{g.observe(o),"none"!==m.style.display&&(m.style.display="none"),"visible"!==h.style.visibility&&(h.style.visibility="visible"),h._ready=!0};o&&(o.checkoutComplete?($("small"),A(newspackBlocksModal.labels.thankyou_modal_title),c(),e(t.querySelector(`.${l}`))):($(),A(newspackBlocksModal.labels.checkout_modal_title),h.contentWindow?.newspackBlocksModalCheckout?.checkout_nonce&&(t.checkout_nonce=h.contentWindow.newspackBlocksModalCheckout.checkout_nonce)),o.checkoutReady?c():o.addEventListener("checkout-ready",c))}h.name=i,h.style.height=f,h.style.visibility="hidden",h.addEventListener("load",k);const w=t=>{const n=t.target;n.classList.add("modal-processing");const s=n.dataset.product;if(s){const e=JSON.parse(s);Object.keys(e).forEach((t=>{0===n.querySelectorAll('input[name="'+t+'"]').length&&n.appendChild(a(t,e[t]))}))}const l=new FormData(n);l.get("variation_id")||(y=t.submitter);const _=document.querySelectorAll(`.${d}`);if(_.forEach((e=>{E(e)})),l.get("is_variable")&&!l.get("variation_id")){const c=[..._].find((e=>e.dataset.productId===l.get("product_id")));if(c){c.querySelectorAll(`form[target="${i}"]`).forEach((e=>{["after_success_behavior","after_success_url","after_success_button_label"].forEach((t=>{0===e.querySelectorAll('input[name="'+t+'"]').length&&e.appendChild(a(t,l.get(t)))}));const t=e.dataset.product;if(t){const n=JSON.parse(t);Object.keys(n).forEach((t=>{0===e.querySelectorAll('input[name="'+t+'"]').length&&e.appendChild(a(t,n[t]))}))}})),t.preventDefault(),n.classList.remove("modal-processing"),q(c),e(c,!1);const r=n.getAttribute("data-product");return u=r?JSON.parse(r):{},p||o(u),void document.getElementById("newspack_modal_checkout").setAttribute("data-order-details",JSON.stringify(u))}}n.classList.remove("modal-processing");const m=l.get("newspack_donate"),f=l.get("newspack_checkout");if(f){const e=n.getAttribute("data-product");u=e?JSON.parse(e):{}}else if(m){const e=l.get("donation_frequency");let t="",n="";for(const n of l.keys())n.indexOf("donation_value_"+e)>=0&&"other"!==l.get(n)&&""!==l.get(n)&&(t=l.get(n));const o=JSON.parse(l.get("frequency_ids"));for(const t in o)t===e&&(n=o[t].toString());u={amount:t,action_type:"donation",currency:l.get("donation_currency"),product_id:n,product_type:"donation",recurrence:e,referrer:l.get("_wp_http_referer")}}if(p||o(u),p=!0,"undefined"!=typeof newspack_ras_config&&!newspack_ras_config?.is_logged_in&&!window?.newspackReaderActivation?.getReader?.()?.authenticated&&newspackBlocksModal?.is_registration_required&&window?.newspackReaderActivation?.openAuthModal){t.preventDefault();let e="",o="0",a="";if(m){const e=l.get("donation_frequency"),t=n.querySelectorAll(`.donation-tier__${e}, .donation-frequency__${e}`);if(t?.length){const c=l.get("donation_tier_index");if(c){const n=JSON.parse(t?.[c].dataset.product);n.hasOwnProperty(`donation_price_summary_${e}`)&&(a=n[`donation_price_summary_${e}`])}else{const c=n.querySelectorAll(`input[name="donation_value_${e}"], input[name="donation_value_${e}_untiered"]`);c?.length&&(c.forEach((e=>{e.checked&&"other"!==e.value&&(o=e.value)})),t.forEach((t=>{const n=JSON.parse(t.dataset.product);if(n.hasOwnProperty(`donation_price_summary_${e}`)){const t=n[`donation_price_summary_${e}`];new RegExp(`(?<=\\D)${o}(?=\\D)`).test(t)&&(a=t)}if("0"===o&&a){let t=l.get(`donation_value_${e}_other`);t||(t=l.get(`donation_value_${e}_untiered`)),t&&(a=a.replace("0",t))}})))}}}else if(f){const e=n.querySelector('input[name="product_price_summary"]');e&&(a=e.value)}a&&(e=`<div class="order-details-summary ${r}__box ${r}__box--text-center"><p><strong>${a}</strong></p></div>`);const i=(e=>new Promise(((t,n)=>{const o=new URLSearchParams(e);o.append("action","modal_checkout_request"),fetch(newspackBlocksModal.ajax_url+"?"+o.toString()).then((e=>{e.ok||n(e),e.json().then((e=>{t(e.url)})).catch(n)})).catch(n)})))(l);i.then((e=>{window.newspackReaderActivation?.setPendingCheckout?.(e)})),window.newspackReaderActivation.openAuthModal({title:newspackBlocksModal.labels.auth_modal_title,onSuccess:(e,t)=>{i.then((e=>{t?.registered&&(e+=`&${newspackBlocksModal.checkout_registration_flag}=1`);const n=v(e);L(n)})).catch((e=>{console.warn("Unable to generate cart:",e),b()}))},onError:()=>{b()},onDismiss:()=>{c(u),p=!1,document.getElementById("newspack_modal_checkout").removeAttribute("data-order-details")},skipSuccess:!0,skipNewslettersSignup:!0,labels:{signin:{title:newspackBlocksModal.labels.signin_modal_title},register:{title:newspackBlocksModal.labels.register_modal_title}},content:e,trigger:t.submitter})}else S(),document.getElementById("newspack_modal_checkout").setAttribute("data-order-details",JSON.stringify(u))},v=e=>{const t=document.createElement("form");t.method="POST",t.action=e,t.target=i,t.style.display="none";const n=document.createElement("button");return n.setAttribute("type","submit"),t.appendChild(n),document.body.appendChild(t),t.addEventListener("submit",w),t},g=new ResizeObserver((e=>{if(!e||!e.length)return;if(h.scrollIntoView({behavior:"smooth",block:"start"}),!h.contentDocument)return;const t=e[0].contentRect;if(t){const e=t.top+t.bottom;if(0===e)return void(h.style.visibility="hidden");n.style.height=e+"px",h.style.height=e+"px"}})),b=()=>{const e=h?.contentDocument?.querySelector(`#${s}`),o=e?.querySelector('input[name="after_success_url"]'),a=e?.querySelector('input[name="after_success_behavior"]'),r=document?.querySelector(".newspack-newsletters-signup-modal");e?.checkoutComplete||(()=>{const e=new FormData;e.append("modal_checkout","1"),e.append("action","abandon_modal_checkout"),e.append("_wpnonce",t.checkout_nonce),t.checkout_nonce=null,fetch(newspackBlocksModal.ajax_url,{method:"POST",body:e})})();const i=!(h.contentDocument&&o&&a&&e?.checkoutComplete);if((i||r)&&(m.style.display="flex",h&&n.contains(h)&&(h._ready=!1,h.src="about:blank",h.style.height=f,h.style.visibility="hidden",n.style.height=f,n.removeChild(h)),g&&g.disconnect(),document.querySelectorAll(`.${l}-container`).forEach((e=>E(e))),y&&y.focus()),e?.checkoutComplete){const e=()=>{if(o&&a){const e=o.getAttribute("value"),t=a.getAttribute("value");"custom"===t?window.location.href=e:"referrer"===t&&window.history.back()}window?.newspackReaderActivation?.setPendingCheckout?.(),p=!1};window?.newspackReaderActivation?.openNewslettersSignupModal?window.newspackReaderActivation.openNewslettersSignupModal({onSuccess:e,onError:e,closeOnSuccess:i}):e(),i&&($(),A(newspackBlocksModal.labels.checkout_modal_title))}else window?.newspackReaderActivation?.setPendingCheckout?.(),c(),p=!1,document.getElementById("newspack_modal_checkout").removeAttribute("data-order-details")},S=()=>{m.style.display="flex",q(t),n.appendChild(h),t.addEventListener("click",(e=>{e.target===t&&b()})),e(t,h),function(e){h._readyTimer&&clearTimeout(h._readyTimer);let t=!1;function n(){t||(t=!0,clearTimeout(h._readyTimer),e.call(this))}function o(){"complete"===this.readyState&&n.call(this)}!function e(){if(h._ready)return void clearTimeout(h._readyTimer);const t=h.contentDocument||h.contentWindow?.document;t&&0!==t.URL.indexOf("about:")?"complete"===t?.readyState?n.call(t):(t.addEventListener("DOMContentLoaded",n),t.addEventListener("readystatechange",o)):h._readyTimer=setTimeout(e,10)}()}(k)},E=e=>{e.overlayId&&window.newspackReaderActivation?.overlays&&window.newspackReaderActivation?.overlays.remove(e.overlayId),e.setAttribute("data-state","closed"),document.body.style.overflow="auto"},q=e=>{window.newspackReaderActivation?.overlays&&(t.overlayId=window.newspackReaderActivation?.overlays.add()),e.setAttribute("data-state","open"),document.body.style.overflow="hidden"},A=e=>{const n=t.querySelector(`.${l}__header h2`);n&&(n.innerText=e)},$=(e="default")=>{const n=t.querySelector(`.${l}`);n&&("small"===e?n.classList.add(`${l}--small`):n.classList.remove(`${l}--small`))};window.newspackCloseModalCheckout=b,t.querySelectorAll(`.${l}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),b()}))})),document.querySelectorAll(".newspack-blocks__modal-variation").forEach((e=>{e.addEventListener("click",(t=>{t.target===e&&b()})),e.querySelectorAll(`.${l}__close`).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),b()}))}))})),document.addEventListener("keydown",(function(e){"Escape"===e.key&&b()})),document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc, .wp-block-newspack-blocks-checkout-button, .newspack-blocks__modal-variation").forEach((e=>{e.querySelectorAll("form").forEach((e=>{e.appendChild(_.cloneNode()),e.target=i,e.addEventListener("submit",w)}))}));const L=e=>{e.requestSubmit(e.querySelector('button[type="submit"]'))};(()=>{const e=new URLSearchParams(window.location.search);if(!e.has("checkout"))return;const t=e.get("type");if("donate"===t){const t=e.get("layout"),n=e.get("frequency"),o=e.get("amount"),c=e.get("other");t&&n&&o&&((e,t,n,o=null)=>{let c;document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc form").forEach((a=>{const r=a.querySelector(`input[name="donation_frequency"][value="${t}"]`);if(r)if("tiered"===e){const e=document.querySelector(`button[data-frequency-slug="${t}"]`);if(!e)return;e.click();const o=a.querySelector(`button[type="submit"][name="donation_value_${t}"][value="${n}"]`);if(!o)return;o.click()}else{const i="untiered"===e?a.querySelector(`input[name="donation_value_${t}_untiered"]`):a.querySelector(`input[name="donation_value_${t}"][value="${n}"]`);if(r&&i){if(r.checked=!0,"untiered"===e)i.value=n;else if("other"===n){i.click();const e=a.querySelector(`input[name="donation_value_${t}_other"]`);e&&o&&(e.value=o)}else i.checked=!0;c=a}}})),c&&L(c)})(t,n,o,c)}else if("checkout_button"===t){const t=e.get("product_id"),n=e.get("variation_id");t&&((e,t=null)=>{let n;if(t&&t!==e){const o=[...document.querySelectorAll(`.${d}`)].find((t=>t.dataset.productId===e));o&&o.querySelectorAll(`form[target="${i}"]`).forEach((e=>{const o=JSON.parse(e.dataset.product);o?.variation_id===Number(t)&&(n=e)}))}else document.querySelectorAll(".wp-block-newspack-blocks-checkout-button").forEach((t=>{const o=t.querySelector("form");if(!o)return;const c=JSON.parse(o.dataset.product);c?.product_id===e&&(n=o)}));n&&L(n)})(t,n)}else{const e=window.newspackReaderActivation?.getPendingCheckout?.();if(e){const t=v(e);L(t)}}window.history.replaceState(null,null,window.location.pathname)})()},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",_):_())})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
#newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-left:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-left:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{right:0;padding-right:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-right:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .woocommerce .order-details-summary h2{margin-top:0}#newspack_modal_checkout_container .wc_payment_methods{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .wc_payment_methods label[for=payment_method_stripe].newspack-ui__input-card{padding:var(--newspack-ui-spacer-3,16px)!important}#newspack_modal_checkout_container .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method span{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type{margin:unset}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type img{float:left}#newspack_modal_checkout_container .wc_payment_method .payment_box{background:transparent;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-xs,14px);font-weight:400;line-height:inherit;margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-left:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_method input.input-radio[name=payment_method]{display:inherit}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card{gap:0;grid-template-columns:0}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card input.input-radio[name=payment_method]{display:none}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-right:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:transparent;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:transparent}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label input{margin:0 0 0 var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label .woocommerce-terms-and-conditions-checkbox-text{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_back{margin-top:0}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0}#newspack_modal_checkout_container .modal-processing{opacity:.5}
|
|
1
|
+
#newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-left:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-applepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-googlepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-left:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{right:0;padding-right:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-right:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .woocommerce .order-details-summary h2{margin-top:0}#newspack_modal_checkout_container .wc_payment_methods{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .wc_payment_methods label[for=payment_method_stripe].newspack-ui__input-card{padding:var(--newspack-ui-spacer-3,16px)!important}#newspack_modal_checkout_container .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method span{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type{margin:unset}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type img{float:left}#newspack_modal_checkout_container .wc_payment_method .payment_box{background:transparent;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-xs,14px);font-weight:400;line-height:inherit;margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-left:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_method input.input-radio[name=payment_method]{display:inherit}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card{gap:0;grid-template-columns:0}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card input.input-radio[name=payment_method]{display:none}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-right:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:transparent;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:transparent}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label input{margin:0 0 0 var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label .woocommerce-terms-and-conditions-checkbox-text{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_back{margin-top:0}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0}#newspack_modal_checkout_container .modal-processing{opacity:.5}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '09640178ef1904be5fc1');
|
package/dist/modalCheckout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-right:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-right:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{left:0;padding-left:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-left:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .woocommerce .order-details-summary h2{margin-top:0}#newspack_modal_checkout_container .wc_payment_methods{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .wc_payment_methods label[for=payment_method_stripe].newspack-ui__input-card{padding:var(--newspack-ui-spacer-3,16px)!important}#newspack_modal_checkout_container .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method span{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type{margin:unset}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type img{float:right}#newspack_modal_checkout_container .wc_payment_method .payment_box{background:transparent;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-xs,14px);font-weight:400;line-height:inherit;margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-right:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_method input.input-radio[name=payment_method]{display:inherit}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card{gap:0;grid-template-columns:0}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card input.input-radio[name=payment_method]{display:none}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-left:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:transparent;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:transparent}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label input{margin:0 var(--newspack-ui-spacer-2,12px) 0 0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label .woocommerce-terms-and-conditions-checkbox-text{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_back{margin-top:0}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0}#newspack_modal_checkout_container .modal-processing{opacity:.5}
|
|
1
|
+
#newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-right:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-applepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-googlepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-right:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{left:0;padding-left:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-left:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .woocommerce .order-details-summary h2{margin-top:0}#newspack_modal_checkout_container .wc_payment_methods{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .wc_payment_methods label[for=payment_method_stripe].newspack-ui__input-card{padding:var(--newspack-ui-spacer-3,16px)!important}#newspack_modal_checkout_container .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method span{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type{margin:unset}#newspack_modal_checkout_container .wc_payment_method>label:first-of-type img{float:right}#newspack_modal_checkout_container .wc_payment_method .payment_box{background:transparent;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-xs,14px);font-weight:400;line-height:inherit;margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-right:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_method input.input-radio[name=payment_method]{display:inherit}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card{gap:0;grid-template-columns:0}#newspack_modal_checkout_container .wc_payment_method:first-child:last-child .newspack-ui__input-card input.input-radio[name=payment_method]{display:none}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-left:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:transparent;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:transparent}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label input{margin:0 var(--newspack-ui-spacer-2,12px) 0 0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper p.form-row label .woocommerce-terms-and-conditions-checkbox-text{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_back{margin-top:0}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0}#newspack_modal_checkout_container .modal-processing{opacity:.5}
|
|
@@ -48,6 +48,66 @@ final class Modal_Checkout {
|
|
|
48
48
|
*/
|
|
49
49
|
private static $modal_checkout_labels = [];
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Allowed assets for modal checkout.
|
|
53
|
+
*
|
|
54
|
+
* @var string[]
|
|
55
|
+
*/
|
|
56
|
+
private static $allowed_scripts = [
|
|
57
|
+
'jquery',
|
|
58
|
+
'google_gtagjs',
|
|
59
|
+
// Newspack.
|
|
60
|
+
'newspack-newsletters-',
|
|
61
|
+
'newspack-blocks-modal',
|
|
62
|
+
'newspack-blocks-modal-checkout',
|
|
63
|
+
'newspack-wc',
|
|
64
|
+
'newspack-ui',
|
|
65
|
+
'newspack-style',
|
|
66
|
+
'newspack-recaptcha',
|
|
67
|
+
'newspack-woocommerce-style',
|
|
68
|
+
// Woo.
|
|
69
|
+
'woocommerce',
|
|
70
|
+
'WCPAY',
|
|
71
|
+
'Woo',
|
|
72
|
+
'wc-',
|
|
73
|
+
'wc_',
|
|
74
|
+
'wcs-',
|
|
75
|
+
'stripe',
|
|
76
|
+
'select2',
|
|
77
|
+
'selectWoo',
|
|
78
|
+
// Metorik.
|
|
79
|
+
'metorik',
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Allowed styles for modal checkout.
|
|
84
|
+
*
|
|
85
|
+
* @var string[]
|
|
86
|
+
*/
|
|
87
|
+
private static $allowed_styles = [
|
|
88
|
+
// Newspack.
|
|
89
|
+
'newspack-newsletters-',
|
|
90
|
+
'newspack-blocks-modal',
|
|
91
|
+
'newspack-blocks-modal-checkout',
|
|
92
|
+
'newspack-wc',
|
|
93
|
+
'newspack-ui',
|
|
94
|
+
'newspack-style',
|
|
95
|
+
'newspack-recaptcha',
|
|
96
|
+
'newspack-woocommerce-style',
|
|
97
|
+
// Woo.
|
|
98
|
+
'woocommerce',
|
|
99
|
+
'WCPAY',
|
|
100
|
+
'Woo',
|
|
101
|
+
'wc-',
|
|
102
|
+
'wc_',
|
|
103
|
+
'wcs-',
|
|
104
|
+
'stripe',
|
|
105
|
+
'select2',
|
|
106
|
+
'selectWoo',
|
|
107
|
+
// Metorik.
|
|
108
|
+
'metorik',
|
|
109
|
+
];
|
|
110
|
+
|
|
51
111
|
/**
|
|
52
112
|
* Initialize hooks.
|
|
53
113
|
*/
|
|
@@ -641,7 +701,7 @@ final class Modal_Checkout {
|
|
|
641
701
|
<div class="variation"><?php echo esc_html( $variation_name ); ?></div>
|
|
642
702
|
<form data-product="<?php echo esc_attr( wp_json_encode( $product_data ) ); ?>">
|
|
643
703
|
<input type="hidden" name="newspack_checkout" value="1" />
|
|
644
|
-
<button type="submit" class="<?php echo esc_attr( "{$class_prefix}__button {$class_prefix}__button--primary" ); ?>"><?php echo esc_html( self::get_modal_checkout_labels( 'checkout_confirm_variation' ) ); ?></button>
|
|
704
|
+
<button type="submit" class="<?php echo esc_attr( "{$class_prefix}__button {$class_prefix}__button--primary" ); ?> newspack-modal-checkout-variation-selection"><?php echo esc_html( self::get_modal_checkout_labels( 'checkout_confirm_variation' ) ); ?></button>
|
|
645
705
|
</form>
|
|
646
706
|
</li>
|
|
647
707
|
<?php endforeach; ?>
|
|
@@ -723,63 +783,69 @@ final class Modal_Checkout {
|
|
|
723
783
|
return;
|
|
724
784
|
}
|
|
725
785
|
|
|
726
|
-
$
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
'woocommerce',
|
|
740
|
-
'WCPAY',
|
|
741
|
-
'Woo',
|
|
742
|
-
'wc-',
|
|
743
|
-
'wc_',
|
|
744
|
-
'wcs-',
|
|
745
|
-
'stripe',
|
|
746
|
-
'select2',
|
|
747
|
-
'selectWoo',
|
|
748
|
-
// Metorik.
|
|
749
|
-
'metorik',
|
|
750
|
-
];
|
|
786
|
+
global $wp_scripts, $wp_styles;
|
|
787
|
+
|
|
788
|
+
$payment_gateways = \WC()->payment_gateways->get_available_payment_gateways();
|
|
789
|
+
$allowed_gateway_assets = [];
|
|
790
|
+
if ( ! empty( $payment_gateways ) ) {
|
|
791
|
+
foreach ( array_keys( $payment_gateways ) as $gateway ) {
|
|
792
|
+
$class = get_class( $payment_gateways[ $gateway ] );
|
|
793
|
+
$plugin_file = ( new \ReflectionClass( $class ) )->getFileName();
|
|
794
|
+
$plugin_base = \plugin_basename( $plugin_file );
|
|
795
|
+
$plugin_slug = explode( '/', $plugin_base )[0];
|
|
796
|
+
$allowed_gateway_assets[] = $plugin_slug;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
751
799
|
|
|
752
800
|
/**
|
|
753
|
-
* Filters the allowed
|
|
801
|
+
* Filters the allowed styles to render in the modal checkout
|
|
754
802
|
*
|
|
755
|
-
* @param string[] $
|
|
803
|
+
* @param string[] $allowed_styles Array of allowed assets handles.
|
|
756
804
|
*/
|
|
757
|
-
$
|
|
758
|
-
|
|
759
|
-
global $wp_scripts, $wp_styles;
|
|
760
|
-
|
|
761
|
-
foreach ( $wp_scripts->queue as $handle ) {
|
|
805
|
+
$allowed_styles = apply_filters( 'newspack_blocks_modal_checkout_allowed_styles', self::$allowed_styles );
|
|
806
|
+
foreach ( $wp_styles->registered as $handle => $wp_style ) {
|
|
762
807
|
$allowed = false;
|
|
763
|
-
foreach ( $
|
|
764
|
-
if ( 0 === strpos( $handle, $
|
|
808
|
+
foreach ( $allowed_styles as $allowed_style ) {
|
|
809
|
+
if ( 0 === strpos( $handle, $allowed_style ) ) {
|
|
765
810
|
$allowed = true;
|
|
766
811
|
break;
|
|
767
812
|
}
|
|
768
813
|
}
|
|
814
|
+
if ( ! empty( $payment_gateways ) ) {
|
|
815
|
+
foreach ( $allowed_gateway_assets as $gateway ) {
|
|
816
|
+
if ( false !== strpos( $wp_style->src, $gateway ) ) {
|
|
817
|
+
$allowed = true;
|
|
818
|
+
break;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|
|
769
822
|
if ( ! $allowed ) {
|
|
770
|
-
|
|
823
|
+
wp_dequeue_style( $handle );
|
|
771
824
|
}
|
|
772
825
|
}
|
|
773
|
-
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Filters the allowed scripts to render in the modal checkout
|
|
829
|
+
*
|
|
830
|
+
* @param string[] $allowed_scripts Array of allowed assets handles.
|
|
831
|
+
*/
|
|
832
|
+
$allowed_scripts = apply_filters( 'newspack_blocks_modal_checkout_allowed_scripts', self::$allowed_scripts );
|
|
833
|
+
foreach ( $wp_scripts->registered as $handle => $wp_script ) {
|
|
774
834
|
$allowed = false;
|
|
775
|
-
foreach ( $
|
|
776
|
-
if ( 0 === strpos( $handle, $
|
|
835
|
+
foreach ( $allowed_scripts as $allowed_script ) {
|
|
836
|
+
if ( 0 === strpos( $handle, $allowed_script ) ) {
|
|
837
|
+
$allowed = true;
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
foreach ( $allowed_gateway_assets as $gateway ) {
|
|
842
|
+
if ( false !== strpos( $wp_script->src, $gateway ) ) {
|
|
777
843
|
$allowed = true;
|
|
778
844
|
break;
|
|
779
845
|
}
|
|
780
846
|
}
|
|
781
847
|
if ( ! $allowed ) {
|
|
782
|
-
|
|
848
|
+
wp_dequeue_script( $handle );
|
|
783
849
|
}
|
|
784
850
|
}
|
|
785
851
|
}
|
package/newspack-blocks.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Author URI: https://newspack.com/
|
|
8
8
|
* Text Domain: newspack-blocks
|
|
9
9
|
* Domain Path: /languages
|
|
10
|
-
* Version: 4.5.0-alpha.
|
|
10
|
+
* Version: 4.5.0-alpha.3
|
|
11
11
|
*
|
|
12
12
|
* @package Newspack_Blocks
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
|
|
16
16
|
define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
|
|
17
17
|
define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
|
|
18
|
-
define( 'NEWSPACK_BLOCKS__VERSION', '4.5.0-alpha.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '4.5.0-alpha.3' );
|
|
19
19
|
|
|
20
20
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
|
|
21
21
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
|
package/package.json
CHANGED
|
@@ -72,6 +72,16 @@
|
|
|
72
72
|
h3 {
|
|
73
73
|
margin-bottom: var(--newspack-ui-spacer-2, 12px);
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
// PayPal Payments buttons.
|
|
77
|
+
#ppc-button-ppcp-gateway {
|
|
78
|
+
margin-top: var(--newspack-ui-spacer-5, 24px);
|
|
79
|
+
}
|
|
80
|
+
#ppc-button-ppcp-gateway,
|
|
81
|
+
#ppc-button-applepay-container,
|
|
82
|
+
#ppc-button-googlepay-container {
|
|
83
|
+
margin-bottom: var(--newspack-ui-spacer-2, 12px);
|
|
84
|
+
}
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
// Override label styles from theme
|
|
@@ -84,9 +84,9 @@ domReady( () => {
|
|
|
84
84
|
* Handle iframe load state.
|
|
85
85
|
*/
|
|
86
86
|
function handleIframeReady() {
|
|
87
|
-
const location = iframe.contentWindow
|
|
87
|
+
const location = iframe.contentWindow?.location;
|
|
88
88
|
// If RAS is available, set the front-end authentication.
|
|
89
|
-
if ( window.newspackReaderActivation && location
|
|
89
|
+
if ( window.newspackReaderActivation && location?.href?.includes( 'order-received' ) ) {
|
|
90
90
|
const ras = window.newspackReaderActivation;
|
|
91
91
|
const params = new Proxy( new URLSearchParams( location.search ), {
|
|
92
92
|
get: ( searchParams, prop ) => searchParams.get( prop ),
|
|
@@ -118,6 +118,11 @@ domReady( () => {
|
|
|
118
118
|
// Revert modal title and width default value.
|
|
119
119
|
setModalSize();
|
|
120
120
|
setModalTitle( newspackBlocksModal.labels.checkout_modal_title );
|
|
121
|
+
if ( iframe.contentWindow?.newspackBlocksModalCheckout?.checkout_nonce ) {
|
|
122
|
+
// Store the checkout nonce for later use.
|
|
123
|
+
// We store the nonce from the iframe content window to ensure the nonce was generated for a logged in session
|
|
124
|
+
modalCheckout.checkout_nonce = iframe.contentWindow.newspackBlocksModalCheckout.checkout_nonce;
|
|
125
|
+
}
|
|
121
126
|
}
|
|
122
127
|
if ( container.checkoutReady ) {
|
|
123
128
|
setModalReady();
|
|
@@ -164,7 +169,8 @@ domReady( () => {
|
|
|
164
169
|
const body = new FormData();
|
|
165
170
|
body.append( 'modal_checkout', '1' );
|
|
166
171
|
body.append( 'action', 'abandon_modal_checkout' );
|
|
167
|
-
body.append( '_wpnonce',
|
|
172
|
+
body.append( '_wpnonce', modalCheckout.checkout_nonce );
|
|
173
|
+
modalCheckout.checkout_nonce = null;
|
|
168
174
|
fetch(
|
|
169
175
|
newspackBlocksModal.ajax_url,
|
|
170
176
|
{
|
|
@@ -488,6 +494,10 @@ domReady( () => {
|
|
|
488
494
|
if ( ! entries || ! entries.length ) {
|
|
489
495
|
return;
|
|
490
496
|
}
|
|
497
|
+
iframe.scrollIntoView( { behavior: 'smooth', block: 'start' } );
|
|
498
|
+
if ( ! iframe.contentDocument ) {
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
491
501
|
const contentRect = entries[ 0 ].contentRect;
|
|
492
502
|
if ( contentRect ) {
|
|
493
503
|
const iframeHeight = contentRect.top + contentRect.bottom;
|
|
@@ -510,14 +520,12 @@ domReady( () => {
|
|
|
510
520
|
const hasNewsletterPopup = document?.querySelector( '.newspack-newsletters-signup-modal' );
|
|
511
521
|
|
|
512
522
|
// Empty cart if checkout is not complete.
|
|
513
|
-
|
|
514
|
-
// so we need to call this before closing and resetting the iframe.
|
|
515
|
-
if ( ! container?.checkoutComplete && iframe?.contentWindow?.newspackBlocksModalCheckout ) {
|
|
523
|
+
if ( ! container?.checkoutComplete ) {
|
|
516
524
|
emptyCart();
|
|
517
525
|
}
|
|
518
526
|
|
|
519
|
-
//
|
|
520
|
-
const shouldCloseModal = ! afterSuccessUrlInput || ! afterSuccessBehaviorInput || ! container?.checkoutComplete;
|
|
527
|
+
// Only close the modal if the iframe contentDocument is null, the checkout is not complete, or we are not redirecting.
|
|
528
|
+
const shouldCloseModal = ! iframe.contentDocument || ! afterSuccessUrlInput || ! afterSuccessBehaviorInput || ! container?.checkoutComplete;
|
|
521
529
|
if ( shouldCloseModal || hasNewsletterPopup ) {
|
|
522
530
|
spinner.style.display = 'flex';
|
|
523
531
|
if ( iframe && modalContent.contains( iframe ) ) {
|
package/vendor/autoload.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// autoload_real.php @generated by Composer
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class ComposerAutoloaderInit63cf3b45308a4cd76b0f6851f3ae22bc
|
|
6
6
|
{
|
|
7
7
|
private static $loader;
|
|
8
8
|
|
|
@@ -22,12 +22,12 @@ class ComposerAutoloaderInit9cf72cc5e9f4758dc4883197b4537854
|
|
|
22
22
|
return self::$loader;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
spl_autoload_register(array('
|
|
25
|
+
spl_autoload_register(array('ComposerAutoloaderInit63cf3b45308a4cd76b0f6851f3ae22bc', 'loadClassLoader'), true, true);
|
|
26
26
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
|
27
|
-
spl_autoload_unregister(array('
|
|
27
|
+
spl_autoload_unregister(array('ComposerAutoloaderInit63cf3b45308a4cd76b0f6851f3ae22bc', 'loadClassLoader'));
|
|
28
28
|
|
|
29
29
|
require __DIR__ . '/autoload_static.php';
|
|
30
|
-
call_user_func(\Composer\Autoload\
|
|
30
|
+
call_user_func(\Composer\Autoload\ComposerStaticInit63cf3b45308a4cd76b0f6851f3ae22bc::getInitializer($loader));
|
|
31
31
|
|
|
32
32
|
$loader->register(true);
|
|
33
33
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
namespace Composer\Autoload;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class ComposerStaticInit63cf3b45308a4cd76b0f6851f3ae22bc
|
|
8
8
|
{
|
|
9
9
|
public static $classMap = array (
|
|
10
10
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -13,7 +13,7 @@ class ComposerStaticInit9cf72cc5e9f4758dc4883197b4537854
|
|
|
13
13
|
public static function getInitializer(ClassLoader $loader)
|
|
14
14
|
{
|
|
15
15
|
return \Closure::bind(function () use ($loader) {
|
|
16
|
-
$loader->classMap =
|
|
16
|
+
$loader->classMap = ComposerStaticInit63cf3b45308a4cd76b0f6851f3ae22bc::$classMap;
|
|
17
17
|
|
|
18
18
|
}, null, ClassLoader::class);
|
|
19
19
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => 'automattic/newspack-blocks',
|
|
4
4
|
'pretty_version' => 'dev-trunk',
|
|
5
5
|
'version' => 'dev-trunk',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '86a5ec5c8d5c14950a37aaa43186ebddd6a2b852',
|
|
7
7
|
'type' => 'wordpress-plugin',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
'automattic/newspack-blocks' => array(
|
|
14
14
|
'pretty_version' => 'dev-trunk',
|
|
15
15
|
'version' => 'dev-trunk',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '86a5ec5c8d5c14950a37aaa43186ebddd6a2b852',
|
|
17
17
|
'type' => 'wordpress-plugin',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|