PageSourceSearch

https://bootcampdigital.com/wp-content/plugins/advanced-coupons-fo…/dist/common/NoticesPlugin.cbb0e416.js

js bootcampdigital.com collected 2026-09-24 18:34:29 UTC 1,760 bytes, 1 lines download raw bytes

1function d(){const{registerCheckoutFilters:e}=wc.blocksCheckout,{select:c}=wp.data;e("advanced-coupons-extension",{coupons:t=>{const o=c("wc/store/cart").getCartData(),{acfwp_block:a}=o.extensions;return t.map(n=>{let l=a.coupons.find(r=>r.code===n.code);return{...n,label:l.label?l.label:n.label}})}})}function f(){const{subscribe:e,select:c}=wp.data;e(()=>{const t=c("wc/store/cart"),s=t.getCartData(),{acfwp_block:o}=s.extensions;if(t.isApplyingCoupon()){const n=t.getCouponBeingApplied();o.coupons.find(r=>r.code===n&&r.force_apply)&&jQuery(".wc-block-components-notices").hide()}})}const i={ACFWP_NOTICE_ONE_CLICK_APPLY:"ACFWP_NOTICE_ONE_CLICK_APPLY"},{dispatch:p,useSelect:u}=wp.data,C=(e,c,t)=>{var o;const s=(o=e.val())==null?void 0:o.toString().trim();e.off("click"),e.on("click",()=>{e.prop("disabled",!0),p("wc/store/cart").applyCoupon(s).then(()=>{p("core/notices").createNotice("success","".concat(c.replace("{coupon_code}","".concat(s))),{type:"snackbar",context:t}),p("core/notices").removeNotice(i.ACFWP_NOTICE_ONE_CLICK_APPLY,t)})})},_=e=>{const c="acfw/notices",{StoreNoticesContainer:t}=wc.blocksCheckout,s=u(a=>a("wc/store/cart").getCartData()),{acfwp_block:o}=s.extensions;return!o||!o.one_click_apply.notices?null:(o.one_click_apply.notices.forEach(a=>{p("core/notices").createNotice(a.type,a.message,{context:c,id:i.ACFWP_NOTICE_ONE_CLICK_APPLY}).then(()=>{const n=jQuery("button.acfw_apply_notification");n.length&&C(n,o.one_click_apply.on_apply_success,c)})}),React.createElement(t,{context:c}))};function k(){const{registerPlugin:e}=wp.plugins,{ExperimentalOrderMeta:c}=wc.blocksCheckout;e("acfw-notices",{render:()=>React.createElement(c,null,React.createElement(_,null)),scope:"woocommerce-checkout"})}export{d as C,f as a,k as r};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.