breaking: remove deprecated cart API#1240
breaking: remove deprecated cart API#1240rmi22186 wants to merge 2 commits intobreaking/remove-deprecated-logcommerce-methodsfrom
Conversation
The cart API has been deprecated for a long time and only logged deprecation warnings. This removes it entirely. Removed public APIs: - mParticle.eCommerce.Cart.add/remove/clear - mParticle.Identity.getCurrentUser().getCart() - mParticle.Identity.getCurrentUser().getCart().add/remove/clear/getCartProducts Also removed: - SDKCart, ICart, SDKShoppingCart, mParticleUserCart interfaces - ShoppingCart from SDK event model and server DTO conversion - convertShoppingCart from events API converter - NativeSdkPaths for AddToCart/RemoveFromCart/ClearCart - maxProducts config option - Cart product storage name constants Users should use mParticle.eCommerce.logProductAction() with ProductActionType.AddToCart or ProductActionType.RemoveFromCart instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t code - Remove buildProductList from ecommerce.js and its interface (no remaining callers after logPurchaseEvent/logRefundEvent removal) - Remove empty "should return an empty array when no cart products exist" test that had no assertions - Remove orphaned product1/checkProduct code in stub tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| } | ||
| }; | ||
|
|
||
| this.buildProductList = function(event, product) { |
There was a problem hiding this comment.
deadcode from logpurchase/logrefund which were removed
|
PR SummaryMedium Risk Overview Eliminates Written by Cursor Bugbot for commit 618f07c. This will update automatically on new commits. Configure here. |



Summary
mParticle.eCommerce.Cart.add/remove/clear,Identity.getCurrentUser().getCart(), and all associated methods)ShoppingCartfrom the SDK event model, server DTO conversion, and Events API convertermaxProductsconfig option and cart-related storage name constantsSDKCart,ICart,SDKShoppingCart,mParticleUserCart)Breaking Changes
The following public APIs are removed:
mParticle.eCommerce.Cart.add(product, logEvent)mParticle.eCommerce.Cart.remove(product, logEvent)mParticle.eCommerce.Cart.clear()mParticle.Identity.getCurrentUser().getCart()mParticle.Identity.getCurrentUser().getCart().add()mParticle.Identity.getCurrentUser().getCart().remove()mParticle.Identity.getCurrentUser().getCart().clear()mParticle.Identity.getCurrentUser().getCart().getCartProducts()maxProductsinit config optionMigration: Use
mParticle.eCommerce.logProductAction()withmParticle.ProductActionType.AddToCartormParticle.ProductActionType.RemoveFromCartinstead.Test plan
npm run build)npm test)🤖 Generated with Claude Code