WC_API_Orders::array_contains()protectedWC 1.0

Utility function to see if the meta array contains data from variations

Method of the class: WC_API_Orders{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->array_contains( $needles, $haystack );
$needles(array) (required)
-
$haystack(array) (required)
-

WC_API_Orders::array_contains() code WC 8.7.0

protected function array_contains( $needles, $haystack ) {
	foreach ( $needles as $key => $value ) {
		if ( $haystack[ $key ] !== $value ) {
			return false;
		}
	}
	return true;
}