diff --git a/modules/@shopify/checkout-sheet-kit/android/gradle.properties b/modules/@shopify/checkout-sheet-kit/android/gradle.properties index c4f65c7..9191da2 100644 --- a/modules/@shopify/checkout-sheet-kit/android/gradle.properties +++ b/modules/@shopify/checkout-sheet-kit/android/gradle.properties @@ -5,4 +5,4 @@ ndkVersion=23.1.7779620 buildToolsVersion = "33.0.0" # Version of Shopify Checkout SDK to use with React Native -SHOPIFY_CHECKOUT_SDK_VERSION=3.0.4 +SHOPIFY_CHECKOUT_SDK_VERSION=3.2.0 diff --git a/modules/@shopify/checkout-sheet-kit/android/src/main/java/com/shopify/reactnative/checkoutsheetkit/ShopifyCheckoutSheetKitModule.java b/modules/@shopify/checkout-sheet-kit/android/src/main/java/com/shopify/reactnative/checkoutsheetkit/ShopifyCheckoutSheetKitModule.java index 1304492..ef594da 100644 --- a/modules/@shopify/checkout-sheet-kit/android/src/main/java/com/shopify/reactnative/checkoutsheetkit/ShopifyCheckoutSheetKitModule.java +++ b/modules/@shopify/checkout-sheet-kit/android/src/main/java/com/shopify/reactnative/checkoutsheetkit/ShopifyCheckoutSheetKitModule.java @@ -112,6 +112,11 @@ public void preload(String checkoutURL) { } } + @ReactMethod + public void invalidateCache() { + ShopifyCheckoutSheetKit.invalidate(); + } + private ColorScheme getColorScheme(String colorScheme) { switch (colorScheme) { case "web_default": diff --git a/sample/src/screens/CartScreen.tsx b/sample/src/screens/CartScreen.tsx index 25e55a6..7b2bf01 100644 --- a/sample/src/screens/CartScreen.tsx +++ b/sample/src/screens/CartScreen.tsx @@ -78,6 +78,7 @@ function CartScreen(): React.JSX.Element { const presentCheckout = async () => { if (checkoutURL) { + ShopifyCheckout.invalidate(); ShopifyCheckout.present(checkoutURL); } };