DataStore::get_coupon_id( WC_Order_Item_Coupon $coupon_item )

Get coupon ID for an order.


Description Description

Tries to get the ID from order item meta, then falls back to a query of published coupons.


Parameters Parameters

$coupon_item

(Required) The coupon order item object.


Top ↑

Return Return

(int) Coupon ID on success, 0 on failure.


Top ↑

Source Source

File: packages/woocommerce-admin/src/API/Reports/Coupons/DataStore.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.