diff --git a/includes/wc-template.php b/includes/wc-template.php index f602ad8..d904f87 100755 --- a/includes/wc-template.php +++ b/includes/wc-template.php @@ -50,12 +50,21 @@ function dokan_product_seller_tab( $val ) { global $product; $author = get_user_by( 'id', $product->post->post_author ); - $store_info = dokan_get_store_info( $author->ID ); - dokan_get_template_part('global/product-tab', '', array( - 'author' => $author, - 'store_info' => $store_info, - ) ); + if ($author) { + $store_info = dokan_get_store_info( $author->ID ); + + dokan_get_template_part( + 'global/product-tab', + '', + [ + 'author' => $author, + 'store_info' => $store_info, + ] + ); + } else { + echo "No vendor information found!"; + } }