fix: test condition to defined const

This commit is contained in:
vnmedeiros 2021-10-29 11:15:16 -03:00
parent 776fa3b32d
commit 01c105e308
2 changed files with 2 additions and 2 deletions

View File

@ -347,7 +347,7 @@ class Items extends Repository {
$args['orderby'] = $new_order;
}
if ( defined('TAINACAN_ENABLE_RELATIONSHIP_METAQUERY') || true === TAINACAN_ENABLE_RELATIONSHIP_METAQUERY ) {
if ( defined('TAINACAN_ENABLE_RELATIONSHIP_METAQUERY') && true === TAINACAN_ENABLE_RELATIONSHIP_METAQUERY ) {
$args = $this->parse_relationship_metaquery($args);
}

View File

@ -308,7 +308,7 @@ class Admin {
'api_max_items_per_page' => $TAINACAN_API_MAX_ITEMS_PER_PAGE,
'wp_elasticpress' => \Tainacan\Elastic_Press::get_instance()->is_active(),
'item_submission_captcha_site_key' => get_option("tnc_option_recaptch_site_key"),
'tainacan_enable_relationship_metaquery' => ( defined('TAINACAN_ENABLE_RELATIONSHIP_METAQUERY') || true === TAINACAN_ENABLE_RELATIONSHIP_METAQUERY )
'tainacan_enable_relationship_metaquery' => ( defined('TAINACAN_ENABLE_RELATIONSHIP_METAQUERY') && true === TAINACAN_ENABLE_RELATIONSHIP_METAQUERY )
];
$maps = [