From 74f8fc36504cd6a07a6d1ee21a53cd7c89c016a6 Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:45:59 +0600 Subject: [PATCH] Feature: Dokan pro feature lock done. --- src/admin/components/Fields.vue | 9 ++++++++- src/admin/components/Fields/WithdrawCharges.vue | 8 +++++++- src/admin/components/SocialFields.vue | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/admin/components/Fields.vue b/src/admin/components/Fields.vue index d64d7d1882..ee9ed3ea06 100644 --- a/src/admin/components/Fields.vue +++ b/src/admin/components/Fields.vue @@ -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 ); diff --git a/src/admin/components/Fields/WithdrawCharges.vue b/src/admin/components/Fields/WithdrawCharges.vue index 46bb1e589a..2b2793b524 100644 --- a/src/admin/components/Fields/WithdrawCharges.vue +++ b/src/admin/components/Fields/WithdrawCharges.vue @@ -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 ) { diff --git a/src/admin/components/SocialFields.vue b/src/admin/components/SocialFields.vue index 2b895c92d7..6b22bf715b 100644 --- a/src/admin/components/SocialFields.vue +++ b/src/admin/components/SocialFields.vue @@ -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 );