Public Ticket #3536636

Hide vendor until profile picture and banner are set.

Closed
Comments
56 Tickets 59
Anthony O Connell started the conversation 3 years ago on December 5, 2023 at 9:48am

Hi guys.

Is their a way I can hide vendors profiles until they set their profile picture and banner. I want to hide profiles who don`t have pictures put up as I find it is off putting to customers when they see blank profiles.

2,762
KingsPlugins replied 3 years ago on December 12, 2023 at 12:29pm

You can achieve that by adding the following PHP code snippet to your site:

add_filter('marketking_vendor_is_inactive', function($inactive, $vendor_id){
    $profile_pic = marketking()->get_store_profile_image_link($vendor_id);
    if (empty($profile_pic)){
        $inactive = true;
    }
    $img = marketking()->get_store_banner_image_link($vendor_id);
    if (empty($img)){
        $inactive = true;
    }
    return $inactive;
}, 10, 2);

It will remove from the list all vendors that have not set either the profile image or the banner image.

1

Sign In