I am writing a code that would display the user defined additional content on woocommerce email setting only when a user is a vendor.
I have tried using different functions to identify if a user is a vendor on the dokan-lite multivendor plugin but without any success. Here is the last code I tried to use:
/**
* Show user-defined additional content.
*/
if ($additional_content && dokan_is_seller_enabled(get_current_user_id())) { echo wp_kses_post(wpautop(wptexturize($additional_content))); }
For everything I have tried, it fails to identify users that are vendors. I have also tried to check if user has certain permissions peculiar to vendors but still no result.
Trying to use this to include additional contents in the woocommerce emails for only vendors