Browse Source

docs(core): Fix example for PromotionItemAction

Michael Bromley 1 year ago
parent
commit
07c5adbad6

+ 1 - 1
docs/docs/reference/typescript-api/promotions/promotion-action.md

@@ -58,7 +58,7 @@ Represents a PromotionAction which applies to individual <a href='/reference/typ
 const itemPercentageDiscount = new PromotionItemAction({
     code: 'item_percentage_discount',
     args: { discount: 'percentage' },
-    execute(ctx, orderItem, orderLine, args) {
+    execute(ctx, orderLine, args) {
         return -orderLine.unitPrice * (args.discount / 100);
     },
     description: 'Discount every item by { discount }%',

+ 1 - 1
packages/core/src/config/promotion/promotion-action.ts

@@ -306,7 +306,7 @@ export abstract class PromotionAction<
  * const itemPercentageDiscount = new PromotionItemAction({
  *     code: 'item_percentage_discount',
  *     args: { discount: 'percentage' },
- *     execute(ctx, orderItem, orderLine, args) {
+ *     execute(ctx, orderLine, args) {
  *         return -orderLine.unitPrice * (args.discount / 100);
  *     },
  *     description: 'Discount every item by { discount }%',