From 049407c8bd50400a39b94c39ad473bb369e0f01f Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Thu, 12 Dec 2024 13:02:56 +0100 Subject: [PATCH] Reset localStorage onload in case gateway list changes --- resources/js/mollieBlockIndex.js | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/js/mollieBlockIndex.js b/resources/js/mollieBlockIndex.js index 4e07d875..280cf489 100644 --- a/resources/js/mollieBlockIndex.js +++ b/resources/js/mollieBlockIndex.js @@ -20,6 +20,7 @@ import ApplePayButtonEditorComponent from './blocks/ApplePayButtonEditorComponen const {useEffect} = wp.element; const isAppleSession = typeof window.ApplePaySession === "function" const isBlockEditor = !!wp?.blockEditor; + localStorage.removeItem('cachedAvailableGateways'); function getCompanyField() { let shippingCompany = shipping_address.company ?? false;