You have in your query WHERE p.post_type IN ('post', 'page')
, that is why it shows only the posts and pages. Add post type product to query:
WHERE p.post_type IN ('post', 'page', 'product')
Related Posts:
- How to search Woo Commerce products with punctuation in title?
- Woocommerce wp-admin search products through custom meta value too
- if statement for search results
- Separeting product from post in search result
- Woocommerce custom search
- Change the Title Tag of Search Products Page
- WooCommerce orderby template disappears and not longer works on search page
- search customers in front end by billing data
- Create a shortcode for native WooCommerce search form [closed]
- Can’t find a product by SKU
- Absolute search against wordpress api
- override the default WooCommerce products search form
- Create a Search Form that only Searches with WooCommerce Sale Products
- Call product search from custom hook
- Search doesn’t return anything
- edit URL of search result
- No Results in WooCommerce Product Search
- Woocommerce Multisite global search how to mod ajax function?
- I wan redirect link post search to search product woocommerce?
- How to filter result set in custom metaboxes?
- Woocommerce: Search by custom attribute
- Notice: Trying to get property of non-object in
- How can I change my search form to bring up product results, not blog results
- Is it possible to hide certain products from displaying in the search results
- Woocommerce ajax search can’t work on mobile
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- New endpoint in my account gives 404 Error Woocommerce 3.6.5 and WP 5.2.2
- Username field is not shown in Woocommerce’s registration contact form
- Woocommerce Membership Expiry Date
- How to echo billing phone number under My Account in Woocommerce? [closed]
- Unknow php file in wordpress core [closed]
- Woocommerce SKU on ALL products page [closed]
- Stop WooCommerce from updating user/user meta after checkout
- Redirect user to cart page when add to cart button is clicked
- Woo API REST : product variation price is read-only?
- Get rid of product images mobile swipe functionality from WooCommerce single product [closed]
- Problems with varibel price [closed]
- Custom Admin Email Subject for Woocommerce (3.8.0) Orders
- Woocommerce custom endpoints
- How to override Woocommerce functionality in Reports section?
- how can use woocommerce add to cart popup?
- Do I need a different product type for WooCommerce [closed]
- How to change product thumbnail size in storefront theme
- Override static method in WC_Shortcodes class (shortcode) [closed]
- Show add to cart button and quantity field when no price is entered [closed]
- Results not being printed
- Remove ‘product’ & ‘product-cateogory’ from url – woocommerce [closed]
- Why is my WordPress login credentials missing, but work with WooCommerce?
- Update Customer JWT Woocommerce
- Is there a hook in woocommerce for when a payment fails to display a custom error message?
- How to show notice alert only on product dashboard page?
- Retrieving Tag Name in Template Part from Filtered URL
- ajax request in wordpress
- separate functions for home VS other pages
- WooCommerce apply shipping rates based on price
- Extra items added to cart on refresh, woocommerce
- How disable some product features on woocomerce?
- Woocommerce purchase date [closed]
- How to add a special Woocommerce “buy now” button?
- Woocommerce: Any way to list all products *without* a specific attribute?
- Filter by Price filter button not working
- porto theme pagination on woocommerce not working
- How can I show “sold out” instead of “out of stock” for some products with particular tags and categories [closed]
- Assign user role by text field in WordPress (Woocommerce) [closed]
- Urgent Validate Save-Post Hooks on Woo-commerce product entry form!
- Is doing a database query in Woocommerce efficient to only display posts from a certain category?
- How to get cookie value?
- My products are showing “not in stock” and I don’t know why
- Woocommerce change the price of products in the database
- Woocommerce modifying the html on the checkout page?
- Pseudo class :before don’t working in a specific button
- How to speed up “My Account > Orders Page” on Site with More than 200,000 orders?
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- WooCommerce product details page category display
- Woocommerce – Default product image by user role
- WooCommerce product id as permalink
- WooCommerce does not translate every string
- Woocommerce add a text field if specific option is selected
- Add suffix to price html does not work
- Get user active posts randomly
- SyntaxError: unterminated string literal – if WordPress Debug in wp-config is set to true
- How Fragile Is DB if I Upload Completely Updated Files
- Broken 302 redirection for product subcategory (Woocommerce, Apache)
- Website Tablet Check Out Field Issue
- WooCommerce order created via REST – sending the date_created along
- How to allow registration only from a certain location?
- Add confirmation popup on place order button
- Get Third Level Categories WooCommerce
- Change WooCommerce Checkout Button – Reverts to normal
- Show pop up message for specific categoryies
- How to search for categories instead of products in Woocommerce?
- How to remove content from hacked pages? [closed]
- Disable WooCommerce Address State Dropdown
- How to show detailed order history on woocommerce product page [closed]
- How to dublicate WC Product title to shortdescription field? [closed]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- Woocommerce product and category in url [closed]
- Display product categories + child-categories on a single product page