WC_Coupon::set_used_by()publicWC 3.0.0

Set which users have used this coupon.

Method of the class: WC_Coupon{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->set_used_by( $used_by );
$used_by(array) (required)
List of user IDs.

Changelog

Since 3.0.0 Introduced.

WC_Coupon::set_used_by() code WC 8.6.1

public function set_used_by( $used_by ) {
	$this->set_prop( 'used_by', array_filter( $used_by ) );
}