Skip to content

Commit

Permalink
Feature: Dokan pro feature lock done.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon committed Jan 23, 2024
1 parent 2da9d65 commit 74f8fc3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/admin/components/Fields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,15 @@
return data;
},
validateInputData( name, newValue, oldValue, fieldData ) {
return dokan.hooks.applyFilters( 'dokanFieldComponentInputValue', name, newValue, oldValue, fieldData.is_lite ?? false );
return dokan.hooks.applyFilters(
'dokanFieldComponentInputValue',
newValue,
oldValue,
name,
fieldData.is_lite ?? false
);
},
inputValueHandler( name, newValue, oldValue ) {
this.fieldValue[ name ] = this.validateInputData( name, newValue, oldValue, this.fieldData );
Expand Down
8 changes: 7 additions & 1 deletion src/admin/components/Fields/WithdrawCharges.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ export default {
let positiveValue = this.unFormatValue(data);
let formatedData = this.formatPositiveValue( positiveValue );
this.fieldValue[ this.fieldData.name ][ field ] = dokan.hooks.applyFilters( 'dokanFieldComponentInputValue', this.fieldData.name, formatedData, this.fieldValue[ this.fieldData.name ][ field ], this.fieldData.is_lite ?? false );
this.fieldValue[ this.fieldData.name ][ field ] = dokan.hooks.applyFilters(
'dokanFieldComponentInputValue',
formatedData,
this.fieldValue[ this.fieldData.name ][ field ],
this.fieldData.name,
this.fieldData.is_lite ?? false
);
},
validateCombineInputData( data ) {
if ( 'object' !== typeof data ) {
Expand Down
2 changes: 1 addition & 1 deletion src/admin/components/SocialFields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
inputValueHandler( value ) {
let data = dokan.hooks.applyFilters(
'dokanFieldComponentInputValue',
this.fieldData.name,
value,
this.fieldValue[this.fieldData.name],
this.fieldData.name,
this.fieldData.is_lite ?? false
);
Expand Down

0 comments on commit 74f8fc3

Please sign in to comment.