Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($products->found_posts > 0) {
- $products_types = array();
- $products_titles = array();
- wp_cache_flush();
- foreach ($products->posts as $p) {
- //wp_cache_flush();
- $product_type = WC_Data_Store::load('product')->get_product_type($p->ID);
- $res['data'][] = $this->_pack_row($p, $product_type);
- $products_types[$p->ID] = $product_type;
- $products_titles[$p->ID] = str_replace('"', "", str_replace("'", "", $p->post_title));
Advertisement
Add Comment
Please, Sign In to add comment