Introduce trigger wc_backbone_modal_before_update

To update the form data upon trigger of response event
This commit is contained in:
shivapoudel 2015-04-14 00:15:08 +05:45
parent f774450f98
commit 3da3de766d
1 changed files with 2 additions and 0 deletions

View File

@ -110,6 +110,8 @@
getFormData: function() {
var data = {};
$( document.body ).trigger( 'wc_backbone_modal_before_update', this._target );
$.each( $( 'form', this.$el ).serializeArray(), function( index, item ) {
if ( data.hasOwnProperty( item.name ) ) {
data[ item.name ] = $.makeArray( data[ item.name ] );