WC_API_Orders::array_contains()
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() WC API Orders::array contains code WC 7.7.0
protected function array_contains( $needles, $haystack ) { foreach ( $needles as $key => $value ) { if ( $haystack[ $key ] !== $value ) { return false; } } return true; }