Hi @abdullahthinkun,
Thanks for reporting this. Can you confirm if you were logged in as a wholesale customer at the time or just browsing as a guest or as a regular customer/admin?
That line refers to retrieving the wholesale price based on the user role. So I assume its having some issue detecting if the role is empty.
I will try to replicate it, but if you could let me know the specifics that would be awesome 🙂
Also, this should not effect the running of your site. But let me know if any other symptoms come up.
Thanks,
Josh
Thanks for your quick response. It only seems to happen when logged in to a user with the wholesale role, you are right. The error appears multiple times under each product.
No worries thanks for the quick reply too!
Can you let me know if you’re using any other User Role editing plugins? Such as User Role Editor or similar? Does this user have multiple user roles?
If you create a new test wholesale user and only assign that default Wholesale Customer role does the problem exist for this new user also?
Thanks and sorry about the 100 questions! Just trying to narrow down for you 🙂
Cheers,
Josh
Also would be great to know if this happens on the a default theme such as TwentySixteen with other plugins disabled. There may be a conflict happening somewhere.
I’m not able to reproduce as yet!
Cheers,
Josh
Yep we have User Role Editor and it is only happening on the wholesale user who has multiple roles. That user’s primary role is Administrator.
Ahh ok.. In that case I suggest starting a new user to keep around as a test user for your wholesale and just give them the one role.
Admins are a bit of a special case because they are allowed to see everything. Giving them the wholesale customer role as well might have some weird sideeffects.
To make things easier you might also consider making use of the User Switching plugin (https://wordpress.org/plugins/user-switching/) which can make switching between user accounts really simple when you’re signed in as admin and just want to do some quick testing.
Hope this helps clear it up!
Cheers,
Josh
Yeah, so this won’t really affect the site in any way. It will only print debug errors when logged in as the admin+wholesale.
Thanks!