• Resolved tigertech

    (@tigertech)


    An update of WP Hide Post from version 1.2.2 to 2.0.4 caused this error that broke a site:

    PHP Fatal error: Cannot declare class Encryption, because the name is already in use in wp-content/plugins/wp-hide-post/admin/license/encryption.php on line 17

    The plugin conflicts with another plugin called “Easy Custom Auto Excerpt Premium” because both plugins declare a class called “Encryption” with no prefix. This violates the WordPress plugin guidelines:

    All the functions in your Plugin need to have unique names that are different from functions in the WordPress core, other Plugins, and themes. For that reason, it is a good idea to use a unique function name prefix on all of your Plugin’s functions. A far superior possibility is to define your Plugin functions inside a class (which also needs to have a unique name).

    There’s more information about name prefixing here.

    The class should be renamed something like “WP_Hide_Post_Encryption” to avoid this problem.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WP Hide Post conflicts with other plugins using generic class name “Encryption”’ is closed to new replies.