Search code examples
woocommercewpallimport

WooCommerce product not showing up in search after deletion and reupload using WP All Import


I deleted a few products manually, and then re-uploaded them using WP All Import (using a different CSV template than normal). Now the products that were reuploaded do not show up in a search on the front end. I am using a basic search query, i.e. https://example-site.com/?s=my-product&post_type=product, and nothing shows up. The actual URL for the product itself works just fine. I see it in wp-admin, and it shows up in searches there. The products are published and set to visible in the catalog and search results. I also tried regenerating product lookup tables, saving permalinks, clearing the cache...

Not sure what to try next. The search works for other products, just not the ones that were deleted and reuploaded. It's as if they are not being referenced in the database properly anymore.


Solution

  • I add some more controls:

    1. Have you checked in Wordpress Dashboard > All Import > Manage Imports that the import was successful or if the products were skipped due to an error or a badly mapped field?
    2. Does the problem only occur in the frontend? If you try to search for a product in the backend, among those you have imported again, do you find it?
    3. If you open the product edit page in the backend you will see the fields:
      • Status: Published
      • Visibility: Public
      • Catalog visibility: Shop and search results
    4. Did you modify the product query with one of these hooks: pre_get_posts or woocommerce_product_query?
    5. Have you already tried disabling all plugins except WooCommerce?
    6. Have you checked the server log file for any unexpected errors?
    7. Do you use third party services for the creation of the search results page (eg Clerk.io)? Because these services could scan the products of your site with a certain frequency (eg every 2 hours) and until the next scan occurs, new products created on WooCommerce may not be shown.
    8. The "Hide out of stock items from the catalog" option is enabled from Wordpress Dashboard > WooCommerce > Settings > Products > Inventory.
    9. The products you are looking for are product variations but the variable product (parent) does not have publish status.