WordPress at Your Fingertips
function is not described

WC_Coupon::set_excluded_product_categories() public WC 3.0.0

Set the product category IDs this coupon cannot be used with.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->set_excluded_product_categories( $excluded_product_categories );
$excluded_product_categories(array) (required)
List of excluded product categories.

Changelog

Since 3.0.0 Introduced.

Code of WC_Coupon::set_excluded_product_categories() WC 5.6.0

public function set_excluded_product_categories( $excluded_product_categories ) {
	$this->set_prop( 'excluded_product_categories', array_filter( wp_parse_id_list( (array) $excluded_product_categories ) ) );
}