WPBP / WordPress-Plugin-Boilerplate-Powered

Wordpress Plugin Boilerplate but Powered with examples and a generator!
https://wpbp.github.io/
GNU General Public License v3.0
793 stars 114 forks source link

Plugin Name is on production environment with missing `composer dumpautoload -o` #156

Closed MikeiLL closed 4 years ago

MikeiLL commented 4 years ago

The first time I saw the above message in my browser, I just ran the command and it went away (for a while).

I'm not in a production environment.

Mte90 commented 4 years ago

This happens because Composer doesn't have the list of files to load or you have WP_DEBUG constant as false. https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/blob/master/plugin-name/engine/Initialize.php#L137

If you are in dev environment you need to turn this constant as true and this error will not happen. Instead when you will release or deploy the plugin you need to execute that command so the autoload will be optimized.

MikeiLL commented 4 years ago

Fantastic. Thank you!

rinart73 commented 2 years ago

It still shouldn't display "Plugin Name" there though but plugin name. It still does on current stable version.

Mte90 commented 2 years ago

It is a bug in the generator not in the boilerplate if Plugin Name doesn't get replaced. I am working on a fix on the generator :-)

pixelmultiplo commented 12 months ago

I don't want wp_debug to true in my dev env, what should i do? What is used to determine the env in wordpress?

Mte90 commented 12 months ago

You need to edit the initialize of the plugin for that, since 6.1 (I guess) they added a constant to set the dev environment but the boilerplate still don't use it