• Resolved biggers

    (@biggers)


    Hi everyone, I had to update and some time later I received the following message: Fatal error: Uncaught Error: Call to undefined function add_rewrite_rule() in /home/medapti1/medecinestock.com/wp-content/plugins/woocommerce/includes/class-wc-auth.php:60 Stack trace: #0 /home/medapti1/medecinestock.com/wp-includes/class-wp-hook.php(324): WC_Auth::add_endpoint(”) #1 /home/medapti1/medecinestock.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /home/medapti1/medecinestock.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/medapti1/medecinestock.com/wp-settings.php(643): do_action(‘init’) #4 /home/medapti1/medecinestock.com/wp-config.php(96): require_once(‘/home/medapti1/…’) #5 /home/medapti1/medecinestock.com/wp-load.php(50): require_once(‘/home/medapti1/…’) #6 /home/medapti1/medecinestock.com/wp-login.php(12): require(‘/home/medapti1/…’) #7 {main} thrown in?/home/medapti1/medecinestock.com/wp-content/plugins/woocommerce/includes/class-wc-auth.php?on line?60

    I watched some tutorials and I renamed the “ plugins ” file but without success. I also tried to rename ” includes ” files and its also without succes.

    I arrive at the file in question ( class-wc-auth.php?on line?60 ) but I do not know how to modify it to fix the error. I will be happy to put your advice into practice. Thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @biggers,

    Thank you for reaching out! I’ll be happy to assist you.

    I understand you are facing a fatal error in your site after trying to update your WooCommerce plugin. Is that correct?

    First, let’s solve the fatal error and regain access to your site. I recommend following the steps below:

    1. Access your site via FTP or cPanel.
    2. Navigate to /wp-content/plugins/.
    3. Temporarily rename the WooCommerce folder (e.g., woocommerce_old). This will deactivate the plugin.
    4. Try again to access your site. If it works, the problem is with the WooCommerce plugin.
    5. Then, rename the WooCommerce folder back to its original name and visit your WordPress admin area and head over to Plugins > Installed Plugins and reactivate WooCommerce back.

    Once that is done, you can then create a staging site or use a plugin (like this one) to create a staging site.

    From the staging site, you can try updating the WooCommerce version to see if the issue is replicated. If it’s not replicated on your staging site, you can try updating your live site.

    Let us know how it goes.



    Thread Starter biggers

    (@biggers)

    Hi @ckadenge ,

    thank you for wanting to help me, I had already tried this procedure but without success. I have just repeated the procedure once again but still no change. Maybe you have another method?

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello biggers

    Thanks for your reply.

    I understand you are still facing the error Fatal error: Uncaught Error: Call to undefined function add_rewrite_rule().

    The function add_rewrite_rule() is part of the core WordPress. The Call to undefined function means WooCommerce is not able to access this core Function of WordPress.

    There can be multiple reasons for this error and the most common one is a broken or failed WordPress core update. Did you make any updates or changes to the site recently that may have resulted in this error?

    To help you further, I’d like to understand more about your setup.
    Could you please send me a copy of your site’s System Status?
    You can find it via WooCommerce > Status.
    Select Get system report and then Copy for support.

    Once you’ve done that, you can paste the text in https://gist.github.com
    After that, you can paste the Gist link here in your reply.

    Looking forward to your response. ??

    Thread Starter biggers

    (@biggers)

    The Problem is that i dont have access to my wordpress dashboard

    Hi there @biggers,

    Thanks again for reaching out. I understand you are unable to access your WordPress dashboard.

    To regain access, please try these steps:

    1. Access your site via FTP or cPanel.
    2. Navigate to?/wp-content/plugins/woocommerce.
    3. Temporarily rename this WooCommerce folder (e.g., woocommerce_old). This will deactivate the plugin.
    4. Try again to access your site from your browser.
    5. You should be able to regain access after renaming the WooCommerce folder.

    Let us know if any of these steps are unclear.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Uncaught Error: Call to undefined function add_rewrite_rule()’ is closed to new replies.