WC_API_Orders::array_contains( array $needles, array $haystack )

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


Description Description


Parameters Parameters

$needles

(Required)

$haystack

(Required)


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/legacy/api/v2/class-wc-api-orders.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.