WC_Discounts::validate_coupon_eligible_items( WC_Coupon $coupon )

Cart discounts cannot be added if non-eligible product is found.


Description Description


Parameters Parameters

$coupon

(Required) Coupon data.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/class-wc-discounts.php

	protected function validate_coupon_eligible_items( $coupon ) {
		if ( ! $coupon->is_type( wc_get_product_coupon_types() ) ) {
			$this->validate_coupon_sale_items( $coupon );
			$this->validate_coupon_excluded_product_ids( $coupon );
			$this->validate_coupon_excluded_product_categories( $coupon );
		}

		return true;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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