Thanks for using Woffice! If you have any issue or question, feel free to open a ticket at https://woffice.io/support/

Members search doesn't work

Version 2.6.0 comes with a bug: if the prefix of your database is different than "wp_", then the members search will always return an empty result. This will be fixed in the version 2.6.1, but if you need a quick solution, then you can do in this way:


  1. Open the file woffice/inc/buddypress.php
  2. Search for (line 2122): 

    $sql['where']['search'] .= "OR u.ID IN ( SELECT user_id FROM wp_usermeta WHERE ( meta_key = 'first_name' AND meta_value LIKE '%s' OR meta_key = 'last_name' AND meta_value LIKE '%s' ) )";
  3. Replace with:

    $sql['where']['search'] .= "OR u.ID IN ( SELECT user_id FROM " . $wpdb->prefix. "usermeta WHERE ( meta_key = 'first_name' AND meta_value LIKE '%s' OR meta_key = 'last_name' AND meta_value LIKE '%s' ) )";
  4. That's done.


If you have any issue or question, feel free to open a ticket at https://woffice.io/support/