• Resolved abdullahthinkun

    (@abdullahthinkun)


    Full error:
    Notice: Undefined offset: 0 in /home/retrospecdoosath/public_html/wp-content/plugins/woocommerce-wholesale-prices/includes/class-wwp-wholesale-prices.php on line 52

    After updating to the latest version of the plugin, we turned on WordPress’ debug mode, and see this error all over pages. Is this going to cause any other issues or is it just a harmless hidden error?

    Plugin version: 1.2.7
    PHP version: 5.4

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Josh Kohlbach

    (@jkohlbach)

    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

    • This reply was modified 7 years, 11 months ago by Josh Kohlbach.
    Thread Starter abdullahthinkun

    (@abdullahthinkun)

    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.

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    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

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    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

    Thread Starter abdullahthinkun

    (@abdullahthinkun)

    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.

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    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

    Thread Starter abdullahthinkun

    (@abdullahthinkun)

    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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Notice: Undefined offset: 0 in class-wwp-wholesale-prices.php on line 52’ is closed to new replies.