• Resolved Biplav

    (@bplv)


    Check /classes/includes/class-functions.php line 25 you’ve used translate_user_role This doesn’t always return “Vendor” I’ve experienced this several times. I mostly use loco translate for translating my site.
    Can’t use just check for role slug instead of role name?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Is this because your vendors are assigned multiple roles? I’ve just checked the WP_Roles class and there is no mention of a role slug only role name.

    If you can provide some working code as a solution I’d be happy to look into it.

    cheers,

    Jamie.

    Hello,

    As you have not provided any code we will consider this resolved. If you do provide code, please do so and we can investigate this further.

    cheers,

    Jamie.

    Thread Starter Biplav

    (@bplv)

    It’s because the role name is translated.
    If you test on the different language the name comes differently and on many places the conditions are placed otherwise. I had the exact place but it was months ago so I forgot. But the plugin does break some functionality when you’re using WordPress on different language.

    • This reply was modified 6 years, 2 months ago by Biplav.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘is_vendor_product_page is messed up’ is closed to new replies.