WC_Product::has_attributes PHP 메소드

has_attributes() 공개 메소드

Returns whether or not the product has any visible attributes.
public has_attributes ( ) : boolean
리턴 boolean
    public function has_attributes()
    {
        foreach ($this->get_attributes() as $attribute) {
            if ($attribute->get_visible()) {
                return true;
            }
        }
        return false;
    }
WC_Product