Fixing AMP Plugin Error “Fatal error: Cannot make static method”

If you have a WordPress and are using the AMP plugin, the latest update (5-Aug) seems to have broken some code resulting in the entire website going down. Your users will see the following error:

Fatal error: Cannot make static method AMP_Customizer_Design_Settings::register_customizer_ui() non static in class AMPFORWP_Customizer_Design_Contols in /home/techzog/public_html/wp-content/plugins/accelerated-mobile-pages/templates/customizer/customizer.php on line 217

This can be fixed in one of the following ways:

1. Disable the AMP plugin

2. Upgrade the plugin to version 0.9.57. The team has put out an upgrade which fixes the issue as of 5-Aug 9 PM GMT.

3. Fix the issue temporarily by making the following change yourself:

Go to the /wp-content/plugins/accelerated-mobile-pages/templates/customizer/customizer.php file and change line 44 from

public function register_customizer_ui( $wp_customize )

to

public static function register_customizer_ui( $wp_customize )

Please leave a thank you note in the comments section if the above solution resolved your problem.

  • Comment Policy: Comments adding value to the article are encouraged. Relevant links will be allowed in such comments. Comments left solely for spamming links will be deleted. Thank you for understanding.

2 thoughts on “Fixing AMP Plugin Error “Fatal error: Cannot make static method”

Leave a Reply to Eburnie News Cancel reply

Your email address will not be published. Required fields are marked *

*
*

CommentLuv badge