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)
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;
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |