POS UI Extensions 2025-10引入了API更新,以支持Shopify POS内的订阅销售计划。
购物车 API 新方法
添加销售计划
要将销售计划添加到购物车中的行项目,请使用以下方法:
shopify.cart.addLineItemSellingPlan({ lineItemUuid: 'line-item-uuid', sellingPlanId: 123456, sellingPlanName: 'Monthly Subscription - 10% off' });移除销售计划
要从行项目中移除销售计划,请使用此方法:
shopify.cart.removeLineItemSellingPlan('line-item-uuid');API 参考
有关这些方法的详细信息,请参阅以下文档:
- addLineItemSellingPlan
- removeLineItemSellingPlan
增强的行项目接口
LineItem界面已增强,以支持销售计划:
interface LineItem { uuid: string; productId: number; requiresSellingPlan?: boolean; // Indicates if a product must have a selling plan hasSellingPlanGroups?: boolean; // Indicates if a product has available selling plans sellingPlan?: SellingPlan; // The currently applied selling plan }版本要求
⚠️ 关键兼容性说明
要使用这些功能,请确保您正在使用:
- POS UI Extension 2025-10或更高版本
- Shopify POS 10.13+
在较旧版本中尝试使用销售计划 API 或字段将导致结账被阻止。请确保您的系统已更新,以避免中断。

