Skip to content

Commit

Permalink
fix: if state is not found in store settings, remove the state field (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored and sabbir1991 committed Sep 19, 2019
1 parent 1869267 commit ff3ba13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/settings/store-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@
var dokan_address_wrapper = $( '.dokan-address-fields' );
var dokan_address_select = {
init: function () {
var savedState = '<?php echo esc_html( $address_state ); ?>';

if ( ! savedState || 'N/A' === savedState ) {
$('#dokan-states-box').hide();
}

dokan_address_wrapper.on( 'change', 'select.country_to_state', this.state_select );
},
Expand Down

0 comments on commit ff3ba13

Please sign in to comment.