• Resolved nouradawy

    (@nouradawy)


    hi I am trying to add an extra field as a button by returning the store(vendor) user nickname next to link

    add_action( 'dokan_store_header_info_fields', 'sold_by', 10);
    
    function sold_by(){
         ?>
            </a>
            <?php
                
    
                $author  = get_user_by( 'id', $seller );
                $store_info = dokan_get_store_info( $author->ID );
                
                 ?>
                        <span class="button">
                            <?php printf( '<a href=https://www.gamerhype.net/inbox/?new-message&fast=1&to=%s>Contact Seller</a>', esc_html__( $author->user_nicename ) ); ?>
                        </span>
                <?php 
            
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @nouradawy ,

    Though we do not provide any customization solution, here is what you need on your code to make it work –

    add_action( 'dokan_store_header_info_fields', 'sold_by', 10);
    
    function sold_by($store_user){
         ?>
            </a>
            <?php
                
    
                $author  = get_user_by( 'id', $store_user );
                $store_info = dokan_get_store_info( $store_user );
                
                 ?>
                        <span class="button">
                            <?php printf( '<a href=https://www.gamerhype.net/inbox/?new-message&fast=1&to=%s>Contact Seller</a>', esc_html__( $author->user_nicename ) ); ?>
                        </span>
                <?php 
            
    }

    If you are happy with our support, you can always share your appreciation as a review.

    Thank you ??

    Thread Starter nouradawy

    (@nouradawy)

    @rur165
    thank you so much !!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘extra field store page’ is closed to new replies.