They are the elementor toggle widgets
The first tab gets the description via shortcode,
The second one gets the short description via shortcode.
I want it so that if short description is empty, the tab gets deleted.
I used this code with jquery script but cant seem to get it to work
// Remove tehnicki karakteristiki
function remove_tehnicki_karakteristiki() {
if ( !is_singular(['product']) ){ // only on product page
global $post, $product;
$short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt ); // get short desc
if (empty($short_description) ) {
echo '<script>
jQuery(#elementor-tab-title-1562).hide();
</script>';
}
}
}
The page I need help with: [log in to see the link]