Skip to content

Commit

Permalink
fix: Prevent store URL generation for staff managers on admin dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
devAsadNur committed Jan 8, 2025
1 parent 4a5d435 commit 3f81de1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions includes/Admin/UserProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ public function add_meta_fields( $user ) {
</td>
</tr>

<tr>
<th><?php esc_html_e( 'Store URL', 'dokan-lite' ); ?></th>
<td>
<input type="text" name="dokan_store_url" data-vendor="<?php echo esc_attr( $user->ID ); ?>" class="regular-text" id="seller-url" value="<?php echo esc_attr( $user->data->user_nicename ); ?>"><strong id="url-alart-mgs"></strong>
<p><small><?php echo esc_url( home_url() . '/' . dokan_get_option( 'custom_store_url', 'dokan_general', 'store' ) ); ?>/<strong id="url-alart"><?php echo esc_attr( $user->data->user_nicename ); ?></strong></small></p>
</td>
</tr>
<?php if ( ! user_can( $user, 'vendor_staff' ) ) : ?>
<tr>
<th><?php esc_html_e( 'Store URL', 'dokan-lite' ); ?></th>
<td>
<input type="text" name="dokan_store_url" data-vendor="<?php echo esc_attr( $user->ID ); ?>" class="regular-text" id="seller-url" value="<?php echo esc_attr( $user->data->user_nicename ); ?>"><strong id="url-alart-mgs"></strong>
<p><small><?php echo esc_url( home_url() . '/' . dokan_get_option( 'custom_store_url', 'dokan_general', 'store' ) ); ?>/<strong id="url-alart"><?php echo esc_attr( $user->data->user_nicename ); ?></strong></small></p>
</td>
</tr>
<?php endif; ?>

<tr>
<th><?php esc_html_e( 'Address 1', 'dokan-lite' ); ?></th>
Expand Down

0 comments on commit 3f81de1

Please sign in to comment.