• Hi there

    I’ve got this error

    [28-Jun-2026 19:08:18 UTC] PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /home/mysite/public_html/wp-content/plugins/side-cart-woocommerce/includes/class-xoo-wsc-frontend.php:150

    This is the line:

    'shippingEnabled' => in_array( 'shipping' , $glSettings['scf-show'] ),

    and this error can be prevent by doing like this:

    'shippingEnabled' => in_array(
    'shipping',
    is_array( $glSettings['scf-show'] ) ? $glSettings['scf-show'] : array( $glSettings['scf-show'] )
    ),

    or like this:

    'shippingEnabled' => is_array( $glSettings['scf-show'] ) && in_array( 'shipping', $glSettings['scf-show'] ),

    Anyway, I’ve entered in Side Cart > Settings and just Saved without making any change and now the Shop runs.
    It seems that somehow some value vas null; maybe never stored or maybe lost.

    Fix is still recommended in case data where null. It’ shouldn’t but it happened.

    Thanks

You must be logged in to reply to this topic.