API Request: Add new field for usage amount in retrieve coupon API [woocommerce] - TagMerge

API Request: Add new field for usage amount in retrieve coupon API [woocommerce]

itsmeichigoAsked 4 months ago

Prerequisites (mark completed items with an [x]):

  • [x] I have checked that my issue type is not listed here https://github.com/woocommerce/woocommerce/issues/new/choose
  • [x] My issue is not a security issue, support request, bug report, enhancement or feature request (Please use the link above if it is).

Issue Description: As part of the Coupon Management project, the Woo Mobile team is working on displaying performance details for each coupon. To be more specific, we would like to present not only the number of times a coupon has been used (already available in the field usage_count) - but also the amount deducted by using that coupon:

Screen Shot 2022-01-11 at 09 46 16

Source: link

itsmeichigoAnswered 4 months ago

Assigned this to myself - I would like to try working on this.

itsmeichigoAnswered 4 months ago

It turns out we can already get details about a coupon's total deducted amount in WooCommerce Admin Analytics API. To be more specific, this information can be obtained from endpoint /wp-json/wc-analytics/reports/coupons/stats, so I'm closing this issue.

Internal reference: p1641912958128800/1641876909.095300-slack-C0E1AV8T0

Recent Issues

    Programming Languages