JetEngine Compatible Conditions

Ok, so, the post which Panag sugested helped me a little.

I’m using JetEngine and CCTs. That post helped me understand some things which led me to the below function. You just need to change the variables and white list it.

//
function get_refei_dieta_array($option) {
global $post, $wpdb;

$current_post_id = $post->ID;

$refei_dieta_data = $wpdb->get_var(
    $wpdb->prepare(
        "SELECT refei_dieta FROM wp_jet_cct_dietas WHERE cct_single_post_id = %d",
        $current_post_id
    )
);

if ($refei_dieta_data) {
    // Deserializa o array de 'refei_dieta' para verificar os valores
    $refei_dieta_array = maybe_unserialize($refei_dieta_data);

    return in_array($option, $refei_dieta_array, true);
}

return false;

}
//

For those who use JetEngine, upvote and like the below post: