trigger(‘change’) not working

To use a custom control, you need a field with special attributes to be linked to the “publish” button.

if you don’t want to display this field, you can generate a hidden field like that :

class WP_Test_2_Customize_Control extends WP_Customize_Control
{

    public function render_content()
    {

        ?>

            <input
                id="<?php echo htmlspecialchars("_customize-input-{$this->id}");?>"
                type="hidden"

                <?php $this->input_attrs();?>

                <?php if (!isset($this->input_attrs["value"])) {?>
                    value="<?php echo htmlspecialchars($this->value());?>"
                <?php }?>

                <?php $this->link();?>
            />

        <?php

    }


}

then, when you modify values in the other fields, you put values in this field with JavaScript and then trigger the change event on this hidden field.