WC_Abstract_Order::get_coupon_codes()
Get used coupon codes only.
Description Description
Return Return
(array)
Source Source
File: includes/abstracts/abstract-wc-order.php
public function get_coupon_codes() { $coupon_codes = array(); $coupons = $this->get_items( 'coupon' ); if ( $coupons ) { foreach ( $coupons as $coupon ) { $coupon_codes[] = $coupon->get_code(); } } return $coupon_codes; }
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |