# JetEngine Compatible Conditions

**URL:** <https://forum.bricksbuilder.io/t/jetengine-compatible-conditions/21854>\
**Category:** Uncategorized\
**Created:** [April 14, 2024, 3:57pm UTC](https://forum.bricksbuilder.io/t/jetengine-compatible-conditions/21854 "2024-04-14T15:57:43Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ribeirom4e](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@ribeirom4e](https://forum.bricksbuilder.io/u/ribeirom4e)\
**Post date:** [November 1, 2024, 11:28pm UTC](https://forum.bricksbuilder.io/t/jetengine-compatible-conditions/21854/6 "2024-11-01T23:28:14Z")

</div>

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:

> [@Bricks Conditions - More Options with JetEngine](https://forum.bricksbuilder.io/t/bricks-conditions-more-options-with-jetengine/27554):
>
> Currently, we can use the Dynamic Data option to access CPT / CCT meta fields in the Conditions tab. The problem is that is very limited. Would be great to be able to access the Queries built with Query Builder also (it would need to work the same as a CPT / CCT is shown. (Query Builder - List of Queries // Query Builder (SQL) - List of Queries and Variables). It would avoid us the rastle to use a work around as described in the below posts. Best regards,

---

_[View the full topic](https://forum.bricksbuilder.io/t/jetengine-compatible-conditions/21854)._
