WordPress at Your Fingertips
function is not described

WC_Coupon::set_used_by() public WC 3.0.0

Set which users have used this coupon.

{} It's a method of the class: WC_Coupon{}

No Hooks.

Return

null. Nothing.

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.

Code of WC_Coupon::set_used_by() WC 5.6.0

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