Skip to main content
Force reload offer, check for ajax calls
Support avatar
Written by Support
Updated over a week ago

Add this code to your liquid file (theme.liquid is recommended)

function openReplacement() {

this.addEventListener("load", function () {

if (

[

"/cart/add.js",

"/cart/update.js",

"/cart/change.js",

"/cart/clear.js",

].includes(this._url)

) {

$('.nudge-offer').remove();

InCartUpsell.prototype.findOfferWhenReady();

}

});

return open.apply(this, arguments);

} const open = window.XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = openReplacement;

Did this answer your question?