• 1. This adds a custom social field to the social fields form. (OK)
    2. If the user fills out the form on his own, then the data is saved in the database and displayed on the seller’s page. (OK)
    3. But the PROBLEM is that if the administrator fills in or changes the social field of the vendor, then when the administrator saves the changes , they are not written to the database. (dont ok)

    Could you send a working code?

    add_filter('wcfm_profile_fields_social',function($fields,$user_id){
    $custom_social = get_user_meta( $user_id, '_custom_social', true );
    $fields["custom_social"] = array('label' => __('Custom Social', 'wc-frontend-manager') , 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $custom_social );
    return $fields;
    },10,2);
    
    add_action( 'wcfm_profile_update','wcfmu_vendor_custom_social_update', 20, 2 );
    function wcfmu_vendor_custom_social_update( $user_id, $wcfm_profile_form ) {
    global $WCFM, $WCFMu, $_POST;
    update_user_meta( $user_id, '_custom_social', $wcfm_profile_form['custom_social'] );
    }
    add_action( 'wcfmmp_store_after_social', function( $vendor_id ) {
    $custom_social = get_user_meta( $vendor_id, '_custom_social', true );
    if( $custom_social ) {
    ?>
    <li><a href="<?php echo wcfmmp_generate_social_url( $custom_social, 'custom_social' ); ?>" target="_blank"><i class="fab fa-whatsapp" aria-hidden="true" target="_blank"></i></a></li>
    <?php
    }
    }, 50 );
    add_action( 'wcfm_social_url', function( $social_handle, $social ) {
    if( $social == 'custom_social' ) {
    $social_handle = 'wa.me/' . $social_handle;
    }
    return $social_handle;
    }, 50, 2 );
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cousinr

    (@cousinr)

    For 2 months now I have been waiting for a simple answer from you, but you all do not answer. Perhaps you have actually decided to go out of business. And now, instead of buying wcfm ultimate and all addon, I am thinking of buying dokan business. I am still waiting for an answer.

    Thread Starter cousinr

    (@cousinr)

    If you don’t want to answer me just because I didn’t buy the premium support renewal again, then so write to me. Then I would immediately understand that you are not a worthy supplier, and I would not be under the illusion for a long time that you can provide support to your users. I’m sorry to have contacted you. Then I will definitely never buy your plugins for my clients again. And I will definitely leave bad reviews about you. Because you deserve it.

    Plugin Author WC Lovers

    (@wclovers)

    I didn’t buy the premium support renewal again

    So you are already a premium user, then why not creating premium support ticket for such queries?

    Thread Starter cousinr

    (@cousinr)

    Because this question is not a premium support request. I wanted to buy a premium support renewal, but if you don’t answer your users here, then where is the guarantee that you will provide premium support. That’s right, there are no guarantees. Therefore, everyone writes bad reviews about you, that you do not support even premium users.

    • This reply was modified 3 years, 2 months ago by cousinr.
    Plugin Author WC Lovers

    (@wclovers)

    Doesn’t matter, please create premium support ticket.

    You require customisation help, free forum is not right place for such things.

    Thread Starter cousinr

    (@cousinr)

    I don’t believe you anymore. You may have answered much earlier. I will not buy your products again.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘custom social fields’ is closed to new replies.