| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $wpscfunction; |
| 7 |
|
| 8 |
$field_types = $wpscfunction->get_custom_field_types(); |
| 9 |
|
| 10 |
$conditional_types = array(); |
| 11 |
foreach ($field_types as $key => $field) { |
| 12 |
if ($field['has_options']) { |
| 13 |
$conditional_types[]=$key; |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
$fields = get_terms([ |
| 18 |
'taxonomy' => 'wpsc_ticket_custom_fields', |
| 19 |
'hide_empty' => false, |
| 20 |
'meta_query' => array( |
| 21 |
'relation' => 'OR', |
| 22 |
array( |
| 23 |
'key' => 'wpsc_tf_type', |
| 24 |
'value' => $conditional_types, |
| 25 |
'compare' => 'IN' |
| 26 |
), |
| 27 |
array( |
| 28 |
'key' => 'wpsc_conditional', |
| 29 |
'value' => '1', |
| 30 |
'compare' => '=' |
| 31 |
) |
| 32 |
), |
| 33 |
]); |
| 34 |
|