Introduce trigger wc_backbone_modal_before_update
To update the form data upon trigger of response event
This commit is contained in:
parent
f774450f98
commit
3da3de766d
|
@ -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 ] );
|
||||
|
|
Loading…
Reference in New Issue