fix: some adjustments

This commit is contained in:
vnmedeiros 2024-02-01 09:16:30 -03:00
parent a5319d8c91
commit 48564675dd
2 changed files with 7 additions and 1 deletions

View File

@ -81,6 +81,12 @@ class Test_Importer extends Importer {
'extra val 1', 'extra val 2', 'extra val 3', 'extra val 4', 'extra val 5'
];
protected $tax_repo;
protected $col_repo;
protected $items_repo;
protected $metadata_repo;
protected $item_metadata_repo;
public function __construct($attributes = array()) {
parent::__construct($attributes);

View File

@ -1266,7 +1266,7 @@ class Metadata extends Repository {
}
$search_q = '';
$search = trim($args['search']);
$search = trim($args['search'] ?? '');
if (!empty($search)) {
if( $metadatum_type === 'Tainacan\Metadata_Types\Relationship' ) {
$search_q = $wpdb->prepare("AND meta_value IN ( SELECT ID FROM $wpdb->posts WHERE post_title LIKE %s )", '%' . $search . '%');