awesomemotive / easy-digital-downloads

Sell digital downloads through WordPress
https://easydigitaldownloads.com
GNU General Public License v2.0
863 stars 474 forks source link

EDD Software Licensing Plugin Class Slug Code Incorrect Usage #9696

Closed WildeWebMarketing closed 3 months ago

WildeWebMarketing commented 7 months ago

Just a heads up, your software licensing plugin class code specifies the plugin slug as follows:

$this->slug = basename( $_plugin_file, '.php' );

This is not actually the slug. It's the filename without the .php, which only works if the folder and filename are exactly the same, which they shouldn't need to be. The slug should be the folder name.

If the plugin is my-custom-plugin/init.php, the above code would designate the slug as init.

Shouldn't this actually be:

$this->slug = basename( dirname( $_plugin_file ));