Title: Error 500
Last modified: February 12, 2022

---

# Error 500

 *  Resolved [svenms](https://wordpress.org/support/users/svenms/)
 * (@svenms)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/error-500-212/)
 * Dears,
 * When I try a custom link, for example a Woocommerce product link, I get a message:
   **
   Cannot connect to the requested page, the website returned the following HTTP
   error: 500 Internal Server Error**
 * Debug file says:
    `PHP Fatal error: Cannot declare class Rest_Client_Abstract,
   because the name is already in use in /public_html/wp-content/plugins/woocommerce-
   mercadopago/includes/module/sdk/lib/rest-client/class-rest-client-abstract.php
   on line 21`
 * This is a plugin related to payment methods, created by MercadoLibre, a kind 
   of Amazon from Latin America.
 * PS: I would be great to have a button to enable the scan in the top Admin Bar.
   
   PS2: Service Agent and Profile Name setttings are not saved when updating the
   plugin page.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-500-212%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [bruandet](https://wordpress.org/support/users/bruandet/)
 * (@bruandet)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/error-500-212/#post-15359786)
 * I just installed and activated WooCommerce and woocommerce-mercadopago and saw
   the same error:
 *     ```
        PHP Fatal error:  Cannot declare class Rest_Client_Abstract, because the name is already in use in wp-content/plugins/woocommerce-mercadopago/includes/module/sdk/lib/rest-client/class-rest-client-abstract.php on line 21
       ```
   
 * I edited that file and wrapped the whole Rest_Client_Abstract class into that
   code:
 *     ```
        if (! class_exists('Rest_Client_Abstract') ) {
       ...
       ...
       ...
       }
       ```
   
 * Then I received another similar error:
    `PHP Fatal error: Cannot declare class
   MP_Rest_Client, because the name is already in use in wp-content/plugins/woocommerce-
   mercadopago/includes/module/sdk/lib/rest-client/class-mp-rest-client.php on line
   19`
 * I edited that file too and wrapped the MP_Rest_Client class into that code:
 *     ```
       if (! class_exists( 'MP_Rest_Client' ) ) {
       ...
       ...
       ...
       }
       ```
   
 * Then, it worked.
    If you make those changes, test your plugin to make sure there’s
   no issues with it. I have no idea why it tries to load those classes twice.
 * The profiler can’t work with just a button in the admin bar, because there are
   some AJAX requests to be processed in the background and so far they are only
   available from the main profiler page.
 * The input fields on the profiler page are not saved. Maybe I will add a possibility
   to temporarily save them inside a cookie for the current session.
 *  Plugin Author [bruandet](https://wordpress.org/support/users/bruandet/)
 * (@bruandet)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/error-500-212/#post-15371827)
 * It seems that Mercado Pago fixed the problem in their plugin in version 5.7.x,
   which was released a couple of days ago.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error 500’ is closed to new replies.

 * ![](https://ps.w.org/code-profiler/assets/icon-256x256.png?rev=3143506)
 * [Code Profiler - WordPress Performance Profiling and Debugging Made Easy](https://wordpress.org/plugins/code-profiler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-profiler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-profiler/)
 * [Active Topics](https://wordpress.org/support/plugin/code-profiler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-profiler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-profiler/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bruandet](https://wordpress.org/support/users/bruandet/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/error-500-212/#post-15371827)
 * Status: resolved