<commit_before>jQuery( document ).on( 'cfc.discount.apply', function ( event, data ) {

	var state = cfstate[data.form_id];

	for ( option_id in data.options ) {

		var option = data.options[option_id],
		field_id = option.field_id + '_' + data.instance;

		state.mutateState( field_id, option.value );

		state.rebind( field_id );

	}

} );
<commit_msg>unbind and rebind field after mutating discount options<commit_after>jQuery( document ).on( 'cfc.discount.apply', function ( event, data ) {

	var state = cfstate[data.form_id];

	for ( option_id in data.options ) {

		var option = data.options[option_id],
		field_id = option.field_id + '_' + data.instance;

		state.mutateState( field_id, option.value );

		// unbind and rebind field
		state.unbind( field_id );
		state.rebind( field_id );

	}

} );

{'fraction_non_alphanumeric': 0.13630731102850063, 'fraction_numerical': 0.0, 'mean_word_length': 3.896969696969697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6325210', 'n_tokens_mistral': 301, 'n_tokens_neox': 278, 'n_words': 63}