WC_Abstract_Order::get_coupon_codes()

Get used coupon codes only.


Description Description


Return Return

(array)


Top ↑

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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