Replies: 0
There is a conflict between StoreFront PowerPak and SportsPress. Both can’t be activated at the same time. When I had SportsPress activated, afterthe install of StoreFront PowerPack and when activating it, the whole WordPress site crashed and wouldn’t come back up. I had to go in an manually remove the storefront-powerpack directory to get WordPress back up again.
The reason is because they both use the class SP_Admin. Here is the error:
Fatal error: Cannot declare class SP_Admin, because the name is already in use in /var/www/html/wp-content/plugins/sportspress/includes/admin/class-sp-admin.php on line 15 intext:”Plugin: SportsPress – Sports Club & League Manager”
Here is the proof:
[root@ip-172-31-7-60 plugins]# grep -rnw ./ -e SP_Admin
./storefront-powerpack/includes/class-sp-admin.php:14:if ( ! class_exists( ‘SP_Admin’ ) ) :
./storefront-powerpack/includes/class-sp-admin.php:19: class SP_Admin {
./storefront-powerpack/includes/class-sp-admin.php:256:return new SP_Admin();
./sportspress/includes/admin/class-sp-admin.php:9: * @class SP_Admin
./sportspress/includes/admin/class-sp-admin.php:15:class SP_Admin {
./sportspress/includes/admin/class-sp-admin.php:133:return new SP_Admin();
Recommended solution is one of the plugins need to change their classname. Also, to prevent name collisions of PHP classes in plugins, there should be a standard to prefix these classes with a company’s or developer’s registered prefix name.