Plugin causes fatal error
-
Hi there,
Your plugin is causing a fatal error “Uncaught Error: Cannot use object of type Hide_Price as array” for all plugins that use the
woocommerce_get_settings_pages
hook. The problem is in the fileincludes/hide-price-until-login-class.php
, line 19:return $settings[] = new Hide_Price();
This actually returns an instance of the Hide_Price object, which makes it impossible for any other plugin to append their page to the
$settings
array. I think what you meant to do was:$settings[] = new Hide_Price(); return $settings;
Please fix this issue so other plugins can use the
woocommerce_get_settings_pages
hook as intended. We have already received multiple support tickets from our users about this, and I’m sure other plugin authors are being impacted by it also.Best regards,
David Grant
Lead Developer
WP Wham
- The topic ‘Plugin causes fatal error’ is closed to new replies.