• Resolved Jaime

    (@wilfredo1234)


    Hello, can you please help me, I am changing to add multiple lines.

    but do not record the data in the user profile section.

    this is the code.

    /* Link(s) to store products or design portfolio*/
    function dokan_custom_seller_registration_required_fields( $required_fields ) {
    $required_fields['gst_id'] = __( 'Link(s) to store products or design portfolio', 'dokan-custom' );
    return $required_fields;
    };

    add_filter( 'dokan_seller_registration_required_fields', 'dokan_custom_seller_registration_required_fields' );
    function dokan_custom_new_seller_created( $vendor_id, $dokan_settings ) {
    $post_data = wp_unslash( $_POST );
    $gst_id = $post_data['gst_id'];
    update_user_meta( $vendor_id, 'dokan_custom_gst_id', $gst_id );
    }

    add_action( 'dokan_new_seller_created', 'dokan_custom_new_seller_created', 10, 2 );

    /* Add custom profile fields (call in theme : echo $curauth->fieldname;) */
    add_action( 'dokan_seller_meta_fields', 'my_show_extra_profile_fields' );
    function my_show_extra_profile_fields( $user ) { ?>

    <?php if ( ! current_user_can( 'manage_woocommerce' ) ) {
    return;
    }
    if ( ! user_can( $user, 'dokandar' ) ) {
    return;
    }
    $gst = get_user_meta( $user->ID, 'dokan_custom_gst_id', true );
    ?>
    <tr>
    <th><?php esc_html_e( 'Link(s) to store products or design portfolio', 'dokan-lite' ); ?></th>
    <td>
    <textarea type="text" name="gst_id" class="regular-text" value="<?php echo esc_attr($gst); ?>"/></textarea>
    </td>
    </tr>
    <?php
    }

    add_action( 'personal_options_update', 'my_save_extra_profile_fields' );
    add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' );

    function my_save_extra_profile_fields( $user_id ) {
    if ( ! current_user_can( 'manage_woocommerce' ) ) {
    return;
    }
    update_usermeta( $user_id, 'dokan_custom_gst_id', $_POST['gst_id'] );
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @wilfredo1234

    Thank you for sharing the code with us. Unfortunately, our support policy does not cover providing custom solutions or reviewing custom code.

    For assistance with this custom requirement, you may need to consult with a developer who can help you implement and troubleshoot the feature effectively.

    Thanks!

    Thread Starter Jaime

    (@wilfredo1234)

    No consigo ninguna ayuda

    • This reply was modified 3 months, 2 weeks ago by Jaime.
    Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @wilfredo1234

    We kindly request read our support policy from this URL: https://dokan.co/support-policy/

    For assistance with this custom requirement, you may need to consult with a developer who can help you implement and troubleshoot the feature effectively.

    We appreciate your understanding.

    Thanks!

    Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @wilfredo1234

    As we haven’t heard back from you for a while, we’ll consider this topic resolved. If you encounter any further issues, please don’t hesitate to open a new topic.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.