Skip to content
On this page

Override Fetch Plugin

If the store you are working on utilizes fetch requests to update the shopping cart, and you want to reinitialize the widget once the cart has been updated, you can use the overrideFetchPlugin. By doing so, you can ensure that the variant/price is accurate and up-to-date following the cart update.

Implementation Example

<script defer>
  const widget = OrderProtection.createOrderProtectionWidget();