WC Lovers

WooCommerce Frontend Manager - Multivendor marketplace vendor dashboard

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • darq roya
    Participant

    Perfect ing.rapparini you are a genius, that’s what I was looking for, thank you very much!

    darq roya
    Participant

    Hi!

    I see that the answer is not as simple as I thought, it’s been almost 2 days and nobody has answered I guess I’ll have to implement some ingenious solution to disable the wcfm sidebar using CSS and get the role using something similar to this that I got :

    function get_current_user_roles() {
     if( is_user_logged_in() ) {
     $user = wp_get_current_user();
     $roles = ( array ) $user->roles;
     return $roles; // This returns an array
     // Use this to return a single value
     // return $roles[0];
     } else {
     return array();
     }
    }

    Thank you very much for the effort.

Viewing 2 posts - 1 through 2 (of 2 total)