WC_Coupon::set_product_categories( array $product_categories )

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


Description Description


Parameters Parameters

$product_categories

(Required) List of product categories.


Top ↑

Source Source

File: includes/class-wc-coupon.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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