• Hi Webby,

    I’ve tried to debug these errors showing on Query Monitor, but it seems they’re a bit above my pay grade..

    Invalid argument supplied for foreach()
    woo-bookings-dropdown.php:135

    Undefined index: type
    woo-bookings-dropdown.php:123

    I really appreciate your efforts in building and maintaining this plugin!
    Cheers!

    • This topic was modified 5 years, 10 months ago by Timbre Design.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Timbre Design

    (@timbre-design)

    Hi there,

    I was able to solve it, at least for my purposes, I found that there was an extra array not accounted for in the foreach nest.

    I wrapped line 121 with another foreach.

    So this:
    foreach($rules as $key => $dateset) {

    Turns into this:
    foreach($rules as $rule => $keys) {
    foreach($keys as $key => $dateset) {

    With the subsequent closes at the end of course.

    I hope that helps.

    Plugin Author Webby Scots

    (@webby-scots)

    Can you tell me what version of WooCommerce Bookings you were using when you encountered this error?

    Thanks

    I am getting these exact same errors. @timbre-design’s solution fixed the ‘Invalid argument supplied for foreach() woo-bookings-dropdown.php:135’ error but I am still getting the ‘Undefined index: type woo-bookings-dropdown.php:123’. Is there a fix for this? I’m using Version 1.2.1 of the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not working: PHP errors showing’ is closed to new replies.