Warning: This method has been deprecated.

WC_Abstract_Legacy_Product::has_all_attributes_set()

Check if all variation’s attributes are set.


Description Description


Return Return

(boolean)


Top ↑

Source Source

File: includes/legacy/abstract-wc-legacy-product.php

	public function has_all_attributes_set() {
		wc_deprecated_function( 'WC_Product::has_all_attributes_set', '3.0', 'an array filter on get_variation_attributes for a quick solution.' );
		$set = true;

		// undefined attributes have null strings as array values
		foreach ( $this->get_variation_attributes() as $att ) {
			if ( ! $att ) {
				$set = false;
				break;
			}
		}
		return $set;
	}

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.