Skip to content

Instantly share code, notes, and snippets.

from collections import OrderedDict
input = [{
'name': 'Product1',
'locations': ['Paris', 'London', 'Ljubljana']
}, {
'name': 'Product2',
'locations': ['Berlin', 'London', 'New York']
}]
<?php
class WCML_REST_API_Support{
/** @var woocommerce_wpml */
private $woocommerce_wpml;
/** @var Sitepress */
private $sitepress;
/** @var WCML_REST_API_Query_Filters_Products */
private $query_filters_products;