1. Home
  2. WC Vendors Marketplace
  3. Code Snippets
  4. Notify Vendors if They Haven’t Configured Their Stores

Notify Vendors if They Haven’t Configured Their Stores

It’s good practice to have your vendors configure their store. Some of them don’t even notice they can add a short and long vendor description or set a shop name. So, this code fixes that by alerting them to their lack of having configured their shop.

Make sure you’ve copied the links.php into /wp-content/themes/YOURTHEME/wc-product-vendor/dashboard/links.php. Edit links.php and add this code wherever you wish the message to be displayed:

<?php

$author_id = get_current_user_id();
$shop_name_set = WCV_Vendors::get_vendor_shop_name( $author_id );
$vendor_login = get_userdata($author_id);
if ($shop_name_set == $vendor_login->user_login) {
// Only choose one of the following lines depending on what theme you have.
// Use the following line if you have a WooThemes theme.
echo do_shortcode( '[box type="alert"]<strong><h3>You havent configured your store name!</h3><p>More message text here.<br><br><a href="’.$settings_page.’">Click here to set your store name</a></p>.[/box]' );
// Use this line for any other theme
echo '<h3>You havent configured your store name!</h3><p>More message text here.<br><br><a href="'.$settings_page.'">Click here to set your store name</a>.</p>';
}

?>
Updated on November 10, 2016

Was this article helpful?