I am trying to:
Link to a page where the issue can be seen:
I expected to see:
Instead, I got:
Hello, I got a problem with some of my products since I have moved the website to another server and domain (on the old one everything works fine).
There is a message:
Warning: Invalid argument supplied for foreach() in /home/ [...] /woocommerce/content-product.php on line 47
It is shown only in some cases.
After I moved the website I noticed that the templates created with Toolset were switched off, so I had to switched them on. The woocommerce plugin used the default template, so I had to changed it too. I also re-installed the woocommerce, but it did not do any improvement. Then i copied the woocommerce catalog from the old server but it did not improve anything as well. Then I reinstalled the database - again nothing changed.
Could you help me with it?
The full error is:
Warning: Invalid argument supplied for foreach() in /public_html/some_custom_name/some_custom_name/themes/some_custom-theme/woocommerce/content-product.php on line 47
This is a customized WordPress install, and it should be an error coming from your theme, if I read the path right, although this is not the native default WordPress path, so it could be anything - I assume thou it's the theme's folder.
Does it persist if you disable Toolset?
Please try that after a Backup or on a test site.
I think this is a issue with the Theme you use.
Hello, thank you for the tip. Of course I can give a try, but the old site is still working and there i no problem, as I mentioned above.
We need to know if the issue is due to Toolset first.
As it seems it's not unless that error has a Call Stack mentioning Toolset, which I do not know.
Disabling the Toolset and testing again will do it.
Please do this either on a test site or a backed up site.
I switched off Toolset Types, Views, Woocommerce Views and the error is still visible. But stangely a custom taxonomy called 'author' created with help of Tollset Views is visible as well.
Hello again,
I tried again to examine carefully my files. I found a catalogue woocommerce in my custom theme that caused the issue. I really do not know why they do not create that problem on the original site but when I cancelled them from the page no. 2, the issue disappeared so the ticket is resolved.
Thank you for all the guides.