Including seller VAT # on invoice
-
Hello,
Is it possible for the plugin to also include seller vat numbers on the invoice? I have a VAT ID field in my seller’s registration form using Dokan using the following in my child functions.php:
add_filter( 'dokan_settings_form_bottom', 'extra_fields', 10, 2); function extra_fields( $current_user, $profile_info ){ $seller_vat= isset( $profile_info['seller_vat'] ) ? $profile_info['seller_vat'] : ''; ?> <div class="gregcustom dokan-form-group"> <label class="dokan-w3 dokan-control-label" for="setting_address"> <?php _e( 'VAT ID', 'dokan' ); ?> </label> <div class="dokan-w5"> <input type="text" class="dokan-form-control input-md valid" name="seller_vat" id="reg_seller_vat" value="<?php echo $seller_vat; ?>" /> </div> </div> <?php } //save the field value add_action( 'dokan_store_profile_saved', 'save_extra_fields', 15 ); function save_extra_fields( $store_id ) { $dokan_settings = dokan_get_store_info($store_id); if ( isset( $_POST['seller_vat'] ) ) { $dokan_settings['seller_vat'] = $_POST['seller_vat']; } update_user_meta( $store_id, 'dokan_profile_settings', $dokan_settings ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Including seller VAT # on invoice’ is closed to new replies.