I found this in /includes/base/element-base.php starting at line 601, public function ‘print_element‘ appears to be the control mechanism of whether something renders.
Within this function is a filter:
$should_render = apply_filters( “elementor/frontend/{$element_type}/should_render”, $should_render, $this );
So you might be able to check $type = $this->get_name() to confirm the element type is a ‘section‘ and then $settings = $this->get_settings() and check to ensure $settings[‘_element_id’] matches a custom section CSS id and then pass $should_render as false to keep THAT section from rendering based upon your custom PHP condition(s).
I have not tested any of this. Best of luck an success to you.
Working on this problem myself – https://github.com/elementor/elementor/issues/4246
Only way I found to do my own conditional logic is to use Elementor Pro’s shortcode way of rendering sections and globals, then one can perform any back end logic choosing whether to return or echo out the do_shortcode(‘[elementor…]’) somewhere within the theme files.
Thank you pingram, I will follow the tread on GitHub.
Have a nice day.