Show/hide section in theme customizer based on selection from another section
In this example, estore_is_cart should return true only if ‘suspended’ === $wp_customize->get_setting( ‘twsa_show_schedule’ )->value(). Or in other words: $wp_customize->add_control( ‘twsa_show_suspend’, array( ‘description’ => ‘Reason for suspension’, ‘section’ => ‘twsa_show’, ‘type’ => ‘textarea’, ‘active_callback’ => function() use ( $wp_customize ) { return ‘suspended’ === $wp_customize->get_setting( ‘twsa_show_schedule’ )->value(); }, ));