Just nitoced that after making order i dont get confirmation site but white screen and fatal error.
I do get order on mail but as client i dont see cnfirmation on site after paying.
On woo logs i get this i fatal errors:
2026-10-03T20:14:33+00:00Krytyczny Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /home/host94795/domains/propsownia.pl/public_html/wp-content/themes/goya-child/functions.php:33
Can anyone help with it?
The page I need help with: [log in to see the link]
It seems you’re using a custom child theme for the Goya theme. There appears to be an error in the functions.php file of this child theme. Since only you know the code for this child theme, you’ll need to check what’s wrong at the location mentioned in the error message. Feel free to post the code here so others can help you.
I agree with @threadi its an error in the functions.php file. Here’s you can fix in this way
in_array() expects its second argument to be an array, but at line 33 of your child theme’s functions.php it is receiving null. So some variable there (a theme option, order meta, or filtered value) is not returning what the code expects.
Find the variable passed as the 2nd argument to in_array() on line 33 and guard it:
or simply cast it: in_array( $needle, (array) $my_var ).
To confirm the child theme is the culprit, temporarily switch to the parent Goya theme and place a test order if the confirmation page works, the bug is definitely in the child theme.
You want to have an array in $chosen_shipping_rates here. But WC()->session->get() apparently doesn’t return that. You have two options:
Before your functions, check whether $chosen_shipping_rates is an array, and if not, turn it into one (even if it’s empty).
Contact WooCommerce support to ask if there’s another way to use their function to get an array. Then adjust the code according to their instructions: https://wordpress.org/support/plugin/woocommerce/
The isset( WC()->session ) check on line 31 only confirms the session object exists get( ‘chosen_shipping_methods’ ) still returns null when nothing is stored in the session yet, which is exactly what happens on the confirmation page after checkout. With this guard, $chosen_shipping_rates is always an array when in_array() runs, so the fatal error is gone.
This reply was modified 16 hours, 21 minutes ago by Hafiz Hamza Javed.