• 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 file includes/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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Am having the same issue here.

    PHP Fatal error: Uncaught Error: Cannot use object of type Hide_Price as array in /nas/content/live/sitename/wp-content/plugins/woocommerce-square/includes/Admin.php:94\nStack trace:\n#0 /nas/content/live/sitename/wp-includes/class-wp-hook.php(287): WooCommerce\\Square\\Admin->WooCommerce\\Square\\{closure}(Object(Hide_Price))\n#1 /nas/content/live/sitename/wp-includes/plugin.php(206): WP_Hook->apply_filters(Object(Hide_Price), Array)\n#2 /nas/content/live/sitename/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-settings.php(62): apply_filters('woocommerce_get...', Array)\n#3 /nas/content/live/sitename/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php(123): WC_Admin_Settings::get_settings_pages()\n#4 /nas/content/live/sitename/wp-includes/class-wp-hook.php(287): WC_Admin_Menus->save_settings('')\n#5 /nas/content/live/sitename/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)\n#6 /nas/content/live/sitename/wp-includes/plugin.php(478): WP_Hook->do_actio in /nas/content/live/sitename/wp-content/plugins/woocommerce-square/includes/Admin.php on line 94, referer: https://sitename.wpengine.com/wp-admin/pluginssitename.php?plugin_status=all&paged=1&s

    intarwebsdeveloper

    (@intarwebsdeveloper)

    I was having this issue also. WP Wham’s suggested fix works like a charm. It literally took 10 seconds to implement. C’mon @cedcommerce! Hope you aren’t dead or something.

    This Worked perfect

    this needs pinned as a fix!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin causes fatal error’ is closed to new replies.