Search stopped working after update to 9.7.2

This topic has 17 replies, 3 voices, and was last updated 2 minutes ago ago by Tony Rodriguez

  • Avatar: Kristjan_Rebane
    Kristjan
    Participant
    April 16, 2026 at 12:41

    Search gives no results after update and changes made to theme-functions.php
    Using WPML.
    If I replace
    // WooCommerce search query part with old one, it works again.

    16 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    April 16, 2026 at 16:47

    Hello, Kristjan,

    Could you please provide temporary wp-admin and FTP access? We will check what can be done to help you.
    To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.

    For FTP access, we require the following details: FTP host, FTP username, FTP password, FTP port, and FTP encryption type. If you need assistance in creating these credentials, please reach out to your hosting provider who will guide you through the process.

    Best Regards,
    8Theme’s Team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    April 16, 2026 at 20:02

    The problem was that when the old SKU search code was converted to use prepare(), the SQL structure changed slightly: a closing parenthesis was added too early inside the prepared fragment.

    Line 880 should be:
    “,
    not
    )”,

    I’d also use
    $s = trim( wp_unslash( $wp_the_query->query_vars[‘s’] ?? ” ) );
    on line 857

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    April 17, 2026 at 06:48

    Also your recent patch fixed the SQL grouping issue and improved the SKU search branch by using prepare() and esc_like().
    However, the search is still not fully hardened against SQL injection, because the variation search block still concatenates the raw search term into SQL LIKE ‘%$s%’ conditions.

    See more info I posted in this topic: https://www.8theme.com/topic/new-sql-injection-vulnerability-discovered/#post-434516

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    April 17, 2026 at 10:05

    Hello, Kristjan,

    The functions wp_unslash() and trim() are not required in this case. The value used here is not the raw data from $_GET, but rather query_vars[‘s’] from the WordPress query object. Therefore, adding an extra wp_unslash() would be redundant and provide no practical benefit.

    Similarly, trim() is also unnecessary: the current search logic already works correctly with this value, and forcibly trimming spaces would alter the query’s behavior. In other words, adding wp_unslash() and trim() in this line appears to be excessive data normalization rather than a necessary safeguard or correction.

    Best regards,
    8Theme’s Team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    April 17, 2026 at 14:24

    You still have to remove the )
    This breaks the product search with WPML.

    Files is visible for topic creator and
    support staff only.
    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    April 17, 2026 at 14:45

    The prepared SQL string should be left open since the remaining parentheses are closed later by the appended SQL
    $where .= “) )”;

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    April 20, 2026 at 08:16

    Hello, Kristjan,

    We have made the necessary changes to the file wp-content/themes/xstore/framework/theme-functions.php.

    These changes will also be included in the next theme update.

    Best regards,
    The 8Theme Team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    April 21, 2026 at 14:09

    Thank you!

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    April 21, 2026 at 15:58

    You’re most welcome! Wishing you a wonderful day ahead.

    We hope our theme is elevating your experience. If you could take a moment to leave us a glowing 5-star review on ThemeForest, it would mean the world to us. Your feedback is incredibly important and helps us continue to improve.

    You can rate us here: https://themeforest.net/downloads

    Should you have any other questions or require assistance, please don’t hesitate to contact us. Our dedicated support team is always here to help.

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    May 6, 2026 at 10:02

    Well, latest update still has the same issue.
    I just created a new blank site test.hilo.ee
    Search works fine without WPML, but with WPML it does not find any product.

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 6, 2026 at 10:28

    Hello, Kristjan,

    Could you please provide temporary wp-admin and FTP access? We will check what can be done to help you.
    To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.

    For FTP access, we require the following details: FTP host, FTP username, FTP password, FTP port, and FTP encryption type. If you need assistance in creating these credentials, please reach out to your hosting provider who will guide you through the process.

    Best Regards,
    8Theme’s Team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    May 6, 2026 at 10:52

    Here are the details:

    Content is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 7, 2026 at 09:28

    Hello, Kristjan,

    We have resolved this issue, and the changes have been added to the file:

    wp-content/themes/xstore/framework/theme-functions.php

    These changes will also be included in the next theme update.

    Best regards,
    8Theme Team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    May 7, 2026 at 10:05

    Thanks!

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    May 7, 2026 at 10:05

    Thanks for the support! My topic “Search stopped working after update to 9.7.2” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    May 7, 2026 at 10:05

    Dear Kristjan,

    We really appreciate your time and engagement within the WordPress & WooCommerce community

    Your feedback drives every improvement we make in XStore — helping us deliver a smoother and more flexible experience with each update.

    Your input makes a real difference.

    Topic closed.
    The 8Theme Team

  • Viewing 17 results - 1 through 17 (of 17 total)

The issue related to '‘Search stopped working after update to 9.7.2’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.