'default', 'title' => __( "Multiple Regions", 'complianz-gdpr' ), 'text' => __('To be able to select multiple regions, you should enable GEO IP in the general settings','complianz-gdpr'), 'url' => admin_url('admin.php?page=complianz#settings'), ]; } //check if we have at least one TCF region selected. Otherwise, disable it if ($field_id==='uses_ad_cookies_personalized') { $selected_tcf_regions = array_intersect(cmplz_get_regions(), cmplz_tcf_regions()); if ( count($selected_tcf_regions)===0 ) { $field['disabled'] = array('tcf', 'yes'); unset($field['premium']); //this could override the disabled state $field['comment'] = __("You have not selected a TCF region at the moment", 'complianz-gdpr'); } else { #enable TCF option, but only when the complianz cookie policy is used. if ( cmplz_get_option( 'cookie-statement' ) === 'generated' ) { $field['disabled'] = false; } } } if ( ( $field_id === 'telephone_company' ) && cmplz_get_option( 'impressum' ) === 'generated' ) { $field['required'] = true; } if ( ( $field_id === 'a_b_testing_buttons' ) && cmplz_tcf_active() ) { $field['comment'] = __('With TCF enabled, A/B testing is not possible.', 'complianz-gdpr'); } return $field; } add_filter('cmplz_field', 'cmplz_premium_fields', 10, 2);