• Resolved Siman-Tov Yechiel

    (@mastersgate)


    hi
    in the past i asked for help for this topic and you helped me hear
    now after the new version you changed the function and i need hepl again please so i can display the administrator store too…
    thank you

Viewing 10 replies - 1 through 10 (of 10 total)
  • @masters,

    Thanks for your ticket. We did not change the function because it is on the same file – wp-content/plugins/dokan/includes/functions.php and line 1141 ??

    Thread Starter Siman-Tov Yechiel

    (@mastersgate)

    hi

    the last function was:

    /**
    * Get seller listing
    *
    * @param array $args
    *
    * @return array
    */
    function dokan_get_sellers( $args = array() ) {

    $defaults = array(
    ‘role__in’ => array(‘seller’,’administrator’),
    ‘number’ => 10,
    ‘offset’ => 0,
    ‘orderby’ => ‘registered’,
    ‘order’ => ‘ASC’,
    ‘meta_query’ => array(
    array(
    ‘key’ => ‘dokan_enable_selling’,
    ‘value’ => ‘yes’,
    ‘compare’ => ‘=’
    )
    )
    );

    $args = wp_parse_args( $args, $defaults );

    $user_query = new WP_User_Query( $args );
    $sellers = $user_query->get_results();

    return array( ‘users’ => $sellers, ‘count’ => $user_query->total_users );
    }

    and the new is:

    /**
    * Get seller listing
    *
    * @param array $args
    *
    * @return array
    */
    function dokan_get_sellers( $args = array() ) {
    $vendors = dokan()->vendor;
    $all_vendor = wp_list_pluck( $vendors->all( $args ), ‘data’ );
    return array( ‘users’ => $all_vendor, ‘count’ => $vendors->get_total() );
    }

    where to put the change ?

    thank you

    Hello @mastersgate.

    If you are using a filter to add new function then you can put those codes on your child theme’s functions.php file ??

    Cheers!

    Thread Starter Siman-Tov Yechiel

    (@mastersgate)

    hi
    i added the first function above in my child themes function.php and its making error… can you tell me the right code to add please ?

    thank you

    Thread Starter Siman-Tov Yechiel

    (@mastersgate)

    hi

    i will be glade if you answere me..

    thank you

    Thread Starter Siman-Tov Yechiel

    (@mastersgate)

    hi

    is there a way that i got answere ?

    thank you

    @mastersgate, We are unable to provide custom development support through this forum. You may need to modify the core file because there is no filter/hook to override through the child theme. So, you have to do the code again on Please open dokan-lite/includes/functions.php.

    Cheers!

    Thread Starter Siman-Tov Yechiel

    (@mastersgate)

    i didnt understand you.. at first you said that you didnt changed the function and i showd to you that you changed it …do i have to replace in the new file the old function or what ? why cant you add the administrator in the new function like before ?

    thank you

    @mastersgate, On this ticket, we had provided the location and the line which need to be replaced. We mentioned that you have to modify the plugin file. You did that and it was working fine. When you updated the plugin, your custom line was lost. Now, you have to do the same code again.

    By default Dokan only shows the vendor store on the store list page and we did not add the admin role on that page yet.

    Thread Starter Siman-Tov Yechiel

    (@mastersgate)

    ok thank you…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘admin store not in displayin the store list’ is closed to new replies.