That warning is telling you:
"Hey, the variable $layout
is not an array."
The conditional expression you've shown wants it to be an array. It's checking if the element (keyed by 'woo_layout'
) has a non-falsey value in it. But when that line of code runs for your home page, the variable is set to a string value and not an array.
How to Verify
Well, you want to dump the value out to the browser (or use XDebug) to check what it's set to when that line of code runs. Therefore, put this code in right away the if ()
:
var_dump( $layout['woo_layout'] );
Once you see the value, then you can backtrace to find what is going on.
My guess (pure guess since I haven't seen the Woo Theme code) is: you need to set a layout option for that page. It's likely a metadata (custom field) option you need to set. But you can reach out to Woo and ask them for help.