Using this code in the console hides the setting as expected:
wp.customize.control('sub-footer-content-left').deactivate();
However using this in customizer-controls.js doesn't do anything:
/**
* Scripts to alter the behavior of Customizer controls.
*/
( function ( $ ) {
/**
* Run function when customizer is ready.
*/
wp.customize.bind('ready', function () {
wp.customize.control('sub-footer-content-left').deactivate();
});
} ) (jQuery);
Enqueued to customize_controls_enqueue_scripts
Can anyone see where I'm going wrong?
Thanks
wp.customize.control('sub-footer-content-left').container.toggle();
However I'm not confident it's the WordPress way. – Danny Cooper May 11 '18 at 18:44