Automattic\WooCommerce\Blocks\Domain\Services

CheckoutFields::contains_valid_rules │ protected │ WC 1.0

Returns true if the property is an array and not empty.

Method of the class: CheckoutFields{}

No Hooks.

Returns

bool.

Usage

// protected - for code of main (parent) or child class
$result = $this->contains_valid_rules( $property );
$property(mixed) (required)
The property to check.

CheckoutFields::contains_valid_rules() code WC 11.1.2

protected function contains_valid_rules( $property ) {
	return is_array( $property ) && ! empty( $property );
}