Woocomerce Reviews Issue

As in the subject, I point out a problem that I am experiencing with Woocommerce, after the last update.
If you look at https://moli.se/shop/box-verde-natale-2018/ in the “reviews” tab there is a php error. I also saw that Woocommerce reports that there are obsolete templates in the theme. Can the two things be connected?
Can you help me?
Thanks in advance.

Hey @adverman,

It’s not related to the out of date templates. Does your product have a review? I’m currently not sure how it could generate that warning so please give us WordPress Admin and FTP credentials in a Secure Note so we could check and replicate your setup.

Thanks.

1 Like

I did, many thanks!

Hello @Adverman,

After I log in to your site, I get redirected to a different url found in the secure note.

Could you please provide the PHP error in your next reply?

Thank you in advance.

The error is:
Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in /home/corif232/public_html/wp-content/themes/pro/woocommerce/single-product/tabs/tabs.php on line 55

visible at https://moli.se/shop/box-verde/ (recensioni tab)

Hi @adverman,

It’s not an error but just a warning when Wordpress debug feature is active on your site. And I also checked the product and it has no review so it’s only normal to have empty review section. But yes, it shouldn’t display the warning and you can do that by toggling off the Wordpress debugging option in wp-config.php.

But upon checking, the WP_DEBUG is already turned off (set to FALSE) which only means your hosting setting is overriding the error reporting of your site. Perhaps you can contact your hosting provider to turn off warnings? It shouldn’t be visible, else, the configuration you set in Wordpress has no use at all.

Thanks!

Wrong way Rad, because other products have not reviews (e.g. this => https://moli.se/shop/box-terra-madre/ ), but doesn’t show errors or warnings. Case where there are not reviews is handled.

Hi @adverman,

Sorry for the confusion, but I’ll explain it further. What I’m saying is, it’s normal to have warnings if the review is empty WHILE Wordpress debug is active. That’s why I said that upon checking, it’s already turned off so something is off with your host environment.

Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given

This means the parameter given to call_user_func() is empty, and since it’s empty while WP_DEBUG is active, then it’s only normal to display the warning (which I assume first)

My explanation is just based on the given warning.

On this https://moli.se/shop/box-terra-madre/ product, a review is applicable which makes it not empty. Not necessarily e review entry or comment. So I went ahead and turn on the Consenti la scrittura di commenti per i nuovi articoli option in Admin > Impostazioni > Discussione to allow comment/reviews to newly added post or products. But this only takes effect on newly added products so you should manually activate the review or already added products, example,

But regardless of the fix, it’s not working on your site, the review on that specific product is still inactive and any change I make is not taking effect. Something is wrong with your setup and host environment as I can’t replicate this on any of my installation.

But my initial answer about the warning is still the same, regardless of review status (open or not), the warning should disappear since it’s off in Wordpress configuration.

How about creating a staging of your site outside your current host just for testing? Then maybe I could do further changes on that one that I can’t implement on your current site since it’s live.

Thanks!

Sorry but… it works at my end! :grinning:
Thank u!

You’re welcome! Then maybe it’s due to cache and the fix doesn’t take effect immediately. But I still recommend contacting your hosting provider as it shouldn’t display warnings, it seems it’s overriding your Wordpress configuration.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.