Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid "Fatal error: Uncaught Error: Class 'PC' not found" #18

Closed
rafaelsaback opened this issue Jul 5, 2019 · 1 comment
Closed
Labels

Comments

@rafaelsaback
Copy link

Hi Fulvio,

First I'd like to thank you for creating such a useful plugin for PHP developers in WP. I've read in your plugin page the reason why I'm getting the error Fatal error: Uncaught Error: Class 'PC' not found, but I could not understand 100% how to solve it.

When you write that we can use the following code bellow, where exactly should I place it in?

// PHP Console autoload
require_once dirname( __FILE__ ) . '/wp-php-console/vendor/autoload.php';

// make PC class available in global PHP scope
if ( ! class_exists( 'PC', false ) ) PhpConsole\Helper::register();
@unfulvio
Copy link
Owner

unfulvio commented Jul 8, 2019

Hey there,

perhaps this might be helpful to you:

https://wordpress.org/support/topic/working-with-plugin-development/

thanks for checking in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants