Automattic\WooCommerce\Admin\RemoteSpecs
DataSourcePoller::merge_specs
Merge the specs.
Method of the class: DataSourcePoller{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->merge_specs( $specs_to_merge_in, $specs, $url );
- $specs_to_merge_in(Array) (required)
- The specs to merge in to
$specs. - $specs(Array) (required) (passed by reference — &)
- The list of specs being merged into.
- $url(string) (required)
- The url of the feed being merged in (for error reporting).
DataSourcePoller::merge_specs() DataSourcePoller::merge specs code WC 10.6.2
protected function merge_specs( $specs_to_merge_in, &$specs, $url ) {
foreach ( $specs_to_merge_in as $spec ) {
if ( ! $this->validate_spec( $spec, $url ) ) {
continue;
}
$id = $this->get_spec_key( $spec );
$specs[ $id ] = $spec;
}
}