@atomic-solutions/woocommerce-react 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.cjs +2 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-BPa3-Cyt.d.ts → index-BWIYt7TO.d.ts} +1 -1
- package/dist/{index-BP5iXDIj.d.cts → index-CaNfLsEj.d.cts} +1 -1
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/provider/index.d.cts +2 -2
- package/dist/provider/index.d.ts +2 -2
- package/dist/{types-D7dDI9Lr.d.cts → types-_8YqnkO-.d.cts} +1 -0
- package/dist/{types-D7dDI9Lr.d.ts → types-_8YqnkO-.d.ts} +1 -0
- package/package.json +2 -2
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AppliedCoupon, C as CartTotals, Y as InfiniteQueryOptions, Z as MutationOptions, a as PaymentMethod, b as ProcessedCartItem, c as ProcessedCategory, d as ProcessedProduct, e as ProcessedProductDetails, f as ProductCartState, g as ProductCategoryTreeNode, _ as QueryOptions, S as ShippingRate, U as UseCartViewOptions, h as UseCartViewReturn, i as UseProductViewOptions, j as UseProductViewReturn, k as UseProductsFeedOptions, l as UseProductsFeedReturn, u as useAddToCart, t as useApplyCoupon, v as useCart, w as useCartView, x as useCheckout, y as useInfiniteProducts, z as useOrder, B as useProcessCheckout, D as useProduct, E as useProductCategories, F as useProductCategoryTree, G as useProductView, H as useProducts, J as useProductsFeed, K as useRemoveCoupon, L as useRemoveFromCart, M as useSelectShippingRate, N as useStore, O as useStoreFeatures, Q as useStoreLocale, R as useStoreTheme, T as useUpdateCartItem, V as useUpdateCustomer, W as useWooCommerceClient, X as useWooCommerceQueryKeys } from '../index-
|
|
2
|
-
export { Q as QueryKeys, p as createQueryKeys } from '../types-
|
|
1
|
+
export { A as AppliedCoupon, C as CartTotals, Y as InfiniteQueryOptions, Z as MutationOptions, a as PaymentMethod, b as ProcessedCartItem, c as ProcessedCategory, d as ProcessedProduct, e as ProcessedProductDetails, f as ProductCartState, g as ProductCategoryTreeNode, _ as QueryOptions, S as ShippingRate, U as UseCartViewOptions, h as UseCartViewReturn, i as UseProductViewOptions, j as UseProductViewReturn, k as UseProductsFeedOptions, l as UseProductsFeedReturn, u as useAddToCart, t as useApplyCoupon, v as useCart, w as useCartView, x as useCheckout, y as useInfiniteProducts, z as useOrder, B as useProcessCheckout, D as useProduct, E as useProductCategories, F as useProductCategoryTree, G as useProductView, H as useProducts, J as useProductsFeed, K as useRemoveCoupon, L as useRemoveFromCart, M as useSelectShippingRate, N as useStore, O as useStoreFeatures, Q as useStoreLocale, R as useStoreTheme, T as useUpdateCartItem, V as useUpdateCustomer, W as useWooCommerceClient, X as useWooCommerceQueryKeys } from '../index-CaNfLsEj.cjs';
|
|
2
|
+
export { Q as QueryKeys, p as createQueryKeys } from '../types-_8YqnkO-.cjs';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import '@atomic-solutions/woocommerce-api-client';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AppliedCoupon, C as CartTotals, Y as InfiniteQueryOptions, Z as MutationOptions, a as PaymentMethod, b as ProcessedCartItem, c as ProcessedCategory, d as ProcessedProduct, e as ProcessedProductDetails, f as ProductCartState, g as ProductCategoryTreeNode, _ as QueryOptions, S as ShippingRate, U as UseCartViewOptions, h as UseCartViewReturn, i as UseProductViewOptions, j as UseProductViewReturn, k as UseProductsFeedOptions, l as UseProductsFeedReturn, u as useAddToCart, t as useApplyCoupon, v as useCart, w as useCartView, x as useCheckout, y as useInfiniteProducts, z as useOrder, B as useProcessCheckout, D as useProduct, E as useProductCategories, F as useProductCategoryTree, G as useProductView, H as useProducts, J as useProductsFeed, K as useRemoveCoupon, L as useRemoveFromCart, M as useSelectShippingRate, N as useStore, O as useStoreFeatures, Q as useStoreLocale, R as useStoreTheme, T as useUpdateCartItem, V as useUpdateCustomer, W as useWooCommerceClient, X as useWooCommerceQueryKeys } from '../index-
|
|
2
|
-
export { Q as QueryKeys, p as createQueryKeys } from '../types-
|
|
1
|
+
export { A as AppliedCoupon, C as CartTotals, Y as InfiniteQueryOptions, Z as MutationOptions, a as PaymentMethod, b as ProcessedCartItem, c as ProcessedCategory, d as ProcessedProduct, e as ProcessedProductDetails, f as ProductCartState, g as ProductCategoryTreeNode, _ as QueryOptions, S as ShippingRate, U as UseCartViewOptions, h as UseCartViewReturn, i as UseProductViewOptions, j as UseProductViewReturn, k as UseProductsFeedOptions, l as UseProductsFeedReturn, u as useAddToCart, t as useApplyCoupon, v as useCart, w as useCartView, x as useCheckout, y as useInfiniteProducts, z as useOrder, B as useProcessCheckout, D as useProduct, E as useProductCategories, F as useProductCategoryTree, G as useProductView, H as useProducts, J as useProductsFeed, K as useRemoveCoupon, L as useRemoveFromCart, M as useSelectShippingRate, N as useStore, O as useStoreFeatures, Q as useStoreLocale, R as useStoreTheme, T as useUpdateCartItem, V as useUpdateCustomer, W as useWooCommerceClient, X as useWooCommerceQueryKeys } from '../index-BWIYt7TO.js';
|
|
2
|
+
export { Q as QueryKeys, p as createQueryKeys } from '../types-_8YqnkO-.js';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import '@atomic-solutions/woocommerce-api-client';
|
package/dist/hooks/index.js
CHANGED
|
@@ -424,10 +424,11 @@ var useProcessCheckout = () => {
|
|
|
424
424
|
mutationKey: queryKeys.checkout.mutations.process(),
|
|
425
425
|
mutationFn: (input) => client.checkout.process(input),
|
|
426
426
|
onSuccess: (checkout) => {
|
|
427
|
+
const cart = queryClient.getQueryData(queryKeys.cart.details()) ?? null;
|
|
427
428
|
queryClient.invalidateQueries({ queryKey: queryKeys.cart.all });
|
|
428
429
|
queryClient.invalidateQueries({ queryKey: queryKeys.checkout.all });
|
|
429
430
|
if (emitEvent) {
|
|
430
|
-
emitEvent(createSuccessEvent("checkout:processed", { checkout }));
|
|
431
|
+
emitEvent(createSuccessEvent("checkout:processed", { checkout, cart }));
|
|
431
432
|
}
|
|
432
433
|
},
|
|
433
434
|
onError: (error) => {
|