• Great looking plugin!

    I’m using this with Local / Flywheel, so the command I used to get it running is ngrok http -host-header=local-site.org 443

    When running either the http or https ngrok link, the site does somewhat load with this warning:

    Notice: Constant WP_PLUGIN_DIR already defined in /Users/alexwright/Sites/level/app/public/wp-content/plugins/wp-ngrok/core.php on line 106

    The site somewhat loads the parent theme but not much of anything beyond that.

    Happy to send any other ngrok inspect details.

    • This topic was modified 3 years, 9 months ago by axlright.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The constant WP_PLUGIN_DIR is already defined in /wp-includes/default-constants.php. A constant can only be defined once so PHP throws a warning. If you’re comfortable working in source code go to the plugin file /wp-content/plugins/wp-ngrok/core.php and modify line 106 to include a test for the presence of the constant:

    change :

    define( 'WP_PLUGIN_DIR', $server_proto . $_SERVER['HTTP_HOST'] );
    to:

    if (!defined('WP_PLUGIN_DIR')) {
    		            define( 'WP_PLUGIN_DIR', $server_proto . $_SERVER['HTTP_HOST'] );
    	            }

    The only problem with this fix is that if the plugin is updated the change will probably be overwritten. Hopefully the developer sees this and applies a fix.

    • This reply was modified 3 years, 7 months ago by overtureweb.
    • This reply was modified 3 years, 7 months ago by overtureweb.
    • This reply was modified 3 years, 7 months ago by overtureweb.
    Plugin Author Theme.id

    (@themeid)

    @axlright Thank you for your feedback.
    and thank to @overtureweb for your suggest.
    we’ll update

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Constant WP_PLUGIN_DIR already defined’ is closed to new replies.