/** * Get products based on search query with merchant filtering */ private function get_search_products($atts) { global $wpdb; $search_term = $atts['search']; $search_mode = isset($atts['search_mode']) ? $atts['search_mode'] : 'comprehensive'; $product_ids = array(); // Mode 1: Basic WordPress search (fastest but limited) if ($search_mode === 'basic') { $args = array( 'post_type' => 'product', 'post_status' => 'publish', 's' => $search_term, 'posts_per_page' => -1, 'fields' => 'ids' ); $query = new WP_Query($args); $product_ids = $query->posts; } // Mode 2: Title only search using LIKE elseif ($search_mode === 'title_only') { $product_ids = $wpdb->get_col($wpdb->prepare(" SELECT ID FROM {$wpdb->posts} WHERE post_type = 'product' AND post_status = 'publish' AND post_title LIKE %s ", '%' . $wpdb->esc_like($search_term) . '%')); } // Mode 3: Comprehensive search (default) else { // Direct SQL search for maximum compatibility $search_like = '%' . $wpdb->esc_like($search_term) . '%'; // Search in titles and content $title_content_ids = $wpdb->get_col($wpdb->prepare(" SELECT ID FROM {$wpdb->posts} WHERE post_type = 'product' AND post_status = 'publish' AND (post_title LIKE %s OR post_content LIKE %s OR post_excerpt LIKE %s) ", $search_like, $search_like, $search_like)); if (!empty($title_content_ids)) { $product_ids = array_merge($product_ids, $title_content_ids); } // Search by SKU $sku_ids = $wpdb->get_col($wpdb->prepare(" SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_sku' AND meta_value LIKE %s ", $search_like)); if (!empty($sku_ids)) { $product_ids = array_merge($product_ids, $sku_ids); } // Search in product categories $cat_ids = $wpdb->get_col($wpdb->prepare(" SELECT tr.object_id FROM {$wpdb->term_relationships} tr JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id = tt.term_taxonomy_id JOIN {$wpdb->terms} t ON tt.term_id = t.term_id WHERE tt.taxonomy = 'product_cat' AND t.name LIKE %s ", $search_like)); if (!empty($cat_ids)) { $product_ids = array_merge($product_ids, $cat_ids); } } // Remove duplicates $product_ids = array_unique($product_ids); if (empty($product_ids)) { return array(); } // Filter out hidden products $visible_product_ids = array(); foreach ($product_ids as $product_id) { $product = wc_get_product($product_id); if ($product && $product->is_visible()) { $visible_product Caps Archives - Page 29 of 38 - Claire's Picks
Claire Wears

Claire’s Picks

  • Beauty
  • Get The Look
  • Shopping
  • Style
  • Claire’s Picks

Caps

HomeClaire's Accessory PicksCapsPage 29
  • All Products
  • Hot Products
  • New Products
  • Sale Products
  • 447 products Showing 337–348 of 447 results

  • Prada Pink/Brown Satin and Croc Leather Cap Toe Pointed Toe Pumps Size 36.515%
    Buy product

    Prada Pink/Brown Satin and Croc Leather Cap Toe Pointed Toe Pumps Size 36.5

    $125.00 Original price was: $125.00.$106.00Current price is: $106.00.
  • PU Leather Magnetic Hat Clip for Travel, Hat Holder Organizer with Strong Magnet, Cap Clip Tool for Backpack, Hiking, Camping, Vacation, Hat Storage Accessory58%
    Buy product

    PU Leather Magnetic Hat Clip for Travel, Hat Holder Organizer with Strong Magnet, Cap Clip Tool for Backpack, Hiking, Camping, Vacation, Hat Storage Accessory

    $18.29 Original price was: $18.29.$7.69Current price is: $7.69.
  • Quadlock Adjustable Stem Cap Mount
    Buy product

    Quadlock Adjustable Stem Cap Mount

    $39.99
  • Quadlock Stem Cap Mount
    Buy product

    Quadlock Stem Cap Mount

    $29.99
  • Razzo Terrazzo Drop Cap Pendant, Black and White
    Buy product

    Razzo Terrazzo Drop Cap Pendant, Black and White

    $40.00
  • RE/DONE Dan Tana Classic Baseball Cap in Red - Red. Size all.
    Buy product

    RE/DONE Dan Tana Classic Baseball Cap in Red – Red. Size all.

    $84.00
  • Reception Simple Wedding Dresses Wedding Dresses A-Line Off Shoulder Cap Sleeve Tea Length Satin Bridal Gowns With Pleats Ruched dress to impress Fall Wedding40%
    Buy product

    Reception Simple Wedding Dresses Wedding Dresses A-Line Off Shoulder Cap Sleeve Tea Length Satin Bridal Gowns With Pleats Ruched dress to impress Fall Wedding

    $170.41 Original price was: $170.41.$102.25Current price is: $102.25.
  • Reception Simple Wedding Dresses Wedding Dresses A-Line Off Shoulder Cap Sleeve Tea Length Satin Bridal Gowns With Pleats Ruched dress to impress Fall Wedding 202540%
    Buy product

    Reception Simple Wedding Dresses Wedding Dresses A-Line Off Shoulder Cap Sleeve Tea Length Satin Bridal Gowns With Pleats Ruched dress to impress Fall Wedding 2025

    $168.23 Original price was: $168.23.$100.94Current price is: $100.94.
  • Red Anchor Satin Cap50%
    Buy product

    Red Anchor Satin Cap

    $50.00 Original price was: $50.00.$25.00Current price is: $25.00.
  • Red Anchor Satin Cap50%
    Buy product

    Red Anchor Satin Cap

    $50.00 Original price was: $50.00.$25.00Current price is: $25.00.
  • Red Bull Racing New Era 9FORTY Special Edition Miami GP Cap - Mint32%
    Buy product

    Red Bull Racing New Era 9FORTY Special Edition Miami GP Cap – Mint

    $41.00 Original price was: $41.00.$28.00Current price is: $28.00.
  • Red Gant Arch Washed Cap51%
    Buy product

    Red Gant Arch Washed Cap

    $45.00 Original price was: $45.00.$22.00Current price is: $22.00.
  • 1
  • 2
  • 3
  • …
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • …
  • 36
  • 37
  • 38
Copyright © 2025
Go to top
Close

Search

View more
Close

My Account

Login

Lost your password?

Close

Cart

Shopping Cart 0

No products in the basket.

Close

Product Quick View

  • Beauty
  • Get The Look
  • Shopping
  • Style
  • Claire’s Picks
  • Shopping Cart 0
  • Login