• Resolved vsacad

    (@vsacad)


    I am having error on my website related to Woocommerce plugin. The error is given below…

    Kindly help or guide me how to rectify it. I tried the recovery mode, and resumed the plugin. Then the website works normally. But when I logout from my dashboard and open the frontpage of the website then I get the error message as: There has been a critical error on this website. Learn more about troubleshooting WordPress.

    The error details in plugin page in recovery mode are as follows –

    An error of type?E_ERROR?was caused in line?19?of the file?/home1/dsvidtyp/dpakola.com/wp-content/plugins/woocommerce/includes/class-wc-api.php. Error message:?Uncaught Error: Class "WC_Legacy_API" not found in /home1/dsvidtyp/dpakola.com/wp-content/plugins/woocommerce/includes/class-wc-api.php:19 Stack trace: #0 /home1/dsvidtyp/dpakola.com/wp-content/plugins/woocommerce/includes/class-wc-autoloader.php(54): include_once() #1 /home1/dsvidtyp/dpakola.com/wp-content/plugins/woocommerce/includes/class-wc-autoloader.php(98): WC_Autoloader->load_file('/home1/dsvidtyp...') #2 [internal function]: WC_Autoloader->autoload('wc_api') #3 /home1/dsvidtyp/dpakola.com/wp-content/plugins/woocommerce/src/Internal/Utilities/LegacyRestApiStub.php(61): class_exists('WC_API') #4 [internal function]: Automattic\WooCommerce\Internal\Utilities\LegacyRestApiStub::parse_legacy_rest_api_request(Object(WP)) #5 /home1/dsvidtyp/dpakola.com/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php(178): call_user_func_array(Array, Array) #6 /home1/dsvidtyp/dpakola.com/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\Utilities\LegacyRestApiStub::__callStatic('parse_legacy_re...', Array) #7 /home1/dsvidtyp/dpakola.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 /home1/dsvidtyp/dpakola.com/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #9 /home1/dsvidtyp/dpakola.com/wp-includes/class-wp.php(418): do_action_ref_array('parse_request', Array) #10 /home1/dsvidtyp/dpakola.com/wp-includes/class-wp.php(813): WP->parse_request('') #11 /home1/dsvidtyp/dpakola.com/wp-includes/functions.php(1336): WP->main('') #12 /home1/dsvidtyp/dpakola.com/wp-blog-header.php(16): wp() #13 /home1/dsvidtyp/dpakola.com/index.php(17): require('/home1/dsvidtyp...') #14 {main} thrown

    Kindly help. It will be very helpful for me. I am stuck right now…!

Viewing 11 replies - 1 through 11 (of 11 total)
  • As a temporary measure, rollback to previous version (8.9.3)

    Use the rollback plugin by WP Rollback.

    Hey there, @vsacad! Thanks for contacting us. I’m happy to help you.

    We suspect this issue is related with deleted files continuing to appear in the server as a result of a corrupted installation process.

    • For many users, manually removing the WooCommerce 9.0 plugin, and re-uploading the WooCommerce 9.0 plugin directory from the?WooCommerce WordPress Plugin Page?fixed the issue.
    • Users have also reported fixing the issue by installing WooCommerce 9.0 via?wp-cli.
    wp plugin deactivate woocommerce
    wp plugin install woocommerce --version=9.0.0 --force
    wp plugin activate woocommerce
    wp plugin status woocommerce

    If the fixes above do not stop the?Fatal error: Uncaught Error: Class 'WC_Legacy_API' not found...?error from appearing, please revert to?WooCommerce 8.9.3.?

    We have implemented a temporary fix that prevents the fatal error from occurring (#48593). However, this does not address the root cause of why deleted files continue to appear on servers.

    We are actively investigating the root cause in order to implement a permanent resolution to this issue.?

    If you wish, you can keep an eye on this post for future updates on this issue.

    I hope this was clarifying. If you face any issues or have any questions, please let us know so we can assist you further.

    Have a wonderful day!

    Plugin Author Barry

    (@barryhughes-1)

    @vsacad, would you be happy to share your system status report and, if you don’t mind, could you let us know who your web host is? We’re also quite puzzled by this error, so any further information like this could be really helpful.

    A lot of users do not know how to use WP-CLI!!

    Please suggest more friendly options.

    I have published some on other posts regarding this issue.

    It is depressing that Automattic made this release without testing PROPERLY!!

    Steve B

    • This reply was modified 5 months, 1 week ago by SteveHale.
    Plugin Author Barry

    (@barryhughes-1)

    It is depressing that Automattic made this release without testing PROPERLY!!

    You’re repeating this in various threads, and I understand your frustration entirely, but I’m not sure it is helpful. We performed extensive testing prior to releasing, and in fact I am not sure if we could reasonably have caught this specific problem ahead-of-time.

    A lot of users do not know how to use WP-CLI!!

    Please suggest more friendly options.

    Perhaps it was missed, but I believe my colleague did also suggest the following:

    For many users, manually removing the WooCommerce 9.0 plugin, and re-uploading the WooCommerce 9.0 plugin directory from the?WooCommerce WordPress Plugin Page?fixed the issue.

    To expand on this a little more, you don’t necessarily even have to deactivate and delete the plugin to begin with, you can download the latest version, then upload it and overwrite the existing copy via Plugins ? Add New Plugin ? Upload Plugin (then verify you wish to replace the existing version).

    However, 9.0.1 is now available, and it may be even easier to simply update to that version.

    I hope that helps!

    Thread Starter vsacad

    (@vsacad)

    I tried everything and then what I did is just restored my backup, which I had taken prior to this update.

    Now everything is working properly.

    Thank you so much for your help!

    Its so nice of you…!

    Hey, @vsacad!

    I’m glad that your website is working now, but from what I understand, it is working on 8.9.3, correct?

    As my colleague asked, do you mind sharing the System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support, and let us know who your host is, so we can investigate this further?

    Thank you!

    Have a wonderful day!

    Thread Starter vsacad

    (@vsacad)

    @carolm29

    Thanks for showing interest in my problem.

    Now there is another problem. I restored the backup and its showing my homepage, but when I click any of the links on homepage it shows the error.

    There has been a critical error on this website.

    Learn more about troubleshooting WordPress.

    The system report is here…

    WordPress Environment<br><br>WordPress address (URL): https://dpakola.com<br>Site address (URL): https://dpakola.com<br>WC Version: 9.0.1<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ? 3.8.0<br>Log Directory Writable: ?<br>WP Version: 6.5.4<br>WP Multisite: –<br>WP Memory Limit: 512 MB<br>WP Debug Mode: –<br>WP Cron: ?<br>Language: en_US<br>External object cache: – Server Environment<br><br>Server Info: Apache<br>PHP Version: 8.2.18<br>PHP Post Max Size: 516 MB<br>PHP Time Limit: 60<br>PHP Max Input Vars: 1000<br>cURL Version: 8.7.1<br>OpenSSL/1.1.1w<br><br>SUHOSIN Installed: –<br>MySQL Version: 5.7.23-23<br>Max Upload Size: 512 MB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database<br><br>WC Database Version: 9.0.1<br>WC Database Prefix: wp30_<br>Total Database Size: 7.40MB<br>Database Data Size: 4.94MB<br>Database Index Size: 2.46MB<br>wp30_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp30_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_woocommerce_order_itemmeta: Data: 0.09MB + Index: 0.11MB + Engine InnoDB<br>wp30_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp30_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_actionscheduler_actions: Data: 0.05MB + Index: 0.11MB + Engine InnoDB<br>wp30_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_comments: Data: 0.06MB + Index: 0.09MB + Engine InnoDB<br>wp30_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_options: Data: 0.47MB + Index: 0.06MB + Engine InnoDB<br>wp30_postmeta: Data: 0.48MB + Index: 0.44MB + Engine InnoDB<br>wp30_posts: Data: 2.52MB + Index: 0.06MB + Engine InnoDB<br>wp30_rank_math_404_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_rank_math_internal_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_rank_math_internal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_rank_math_redirections: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_rank_math_redirections_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_usermeta: Data: 0.11MB + Index: 0.03MB + Engine InnoDB<br>wp30_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp30_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>wp30_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB<br>wp30_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>wp30_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp30_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp30_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp30_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp30_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB<br>wp30_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp30_wpforms_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_wpforms_payments: Data: 0.02MB + Index: 0.14MB + Engine InnoDB<br>wp30_wpforms_payment_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp30_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp30_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB Post Type Counts<br><br>attachment: 25<br>nav_menu_item: 11<br>page: 14<br>post: 2<br>product: 8<br>revision: 70<br>shop_order: 130<br>wp_global_styles: 2<br>wp_navigation: 1<br>wpforms: 1 Security<br><br>Secure connection (HTTPS): ?<br>Hide errors from visitors: ? Active Plugins (14)<br><br>All-in-One WP Migration: by ServMask – 7.83<br>All-in-One WP Migration Unlimited Extension: by ServMask – 2.58<br>Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.2<br>Blocksy Companion: by CreativeThemes – 2.0.55<br>Site Kit by Google: by Google – 1.129.1<br>PhonePe Payment Solutions: by PhonePe – 2.0.11<br>Really Simple SSL: by Really Simple Plugins – 8.1.5<br>Rank Math SEO with AI SEO Tools: by Rank Math – 1.0.221<br>Stackable - Gutenberg Blocks: by Gambit Technologies<br>Inc – 3.13.1<br><br>WooCommerce - Instamojo: by instamojo – 2.0.1<br>Google Analytics for WooCommerce: by WooCommerce – 2.1.2<br>WooCommerce: by Automattic – 9.0.1<br>WP Revisions Control: by Erick Hitter – 1.4.3<br>WPForms Lite: by WPForms – 1.8.9.2 Inactive Plugins (6)<br><br>Demo Import Kit: by ThemeInWP – 1.1.0<br>Integrate PhonePe with WooCommerce: by Sevengits – 1.2.1<br>PayU India: by PayU – 3.8.2<br>Under Construction: by WebFactory Ltd – 4.00<br>WooCommerce Stripe Gateway: by WooCommerce – 8.4.0<br>WP Mail SMTP: by WP Mail SMTP – 4.0.1 Must Use Plugins (1)<br><br>Endurance Page Cache: by Mike Hansen – 2.2.1 Settings<br><br>API Enabled: –<br>Force SSL: –<br>Currency: INR (?)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: –<br>Enforce Approved Product Download Directories: ?<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: – Logging<br><br>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 5 MB WC Pages<br><br>Shop base: #117 - /shop/<br>Cart: #118 - /cart/<br>Checkout: #119 - /checkout/<br>My account: #120 - /my-account/<br>Terms and conditions: #121 - /refund_returns/ Theme<br><br>Name: Blocksy Child<br>Version: (update to version 0 is available)<br>Author URL:<br>Child Theme: ?<br>Parent Theme Name: Blocksy<br>Parent Theme Version: 2.0.55<br>Parent Theme Author URL: https://creativethemes.com<br>WooCommerce Support: ? Templates<br><br>Overrides: blocksy/woocommerce/cart/cart.php<br>blocksy/woocommerce/cart/mini-cart.php<br>blocksy/woocommerce/content-widget-product.php<br>blocksy/woocommerce/content-widget-reviews.php<br>blocksy/woocommerce/myaccount/my-account.php<br>blocksy/woocommerce/product-searchform.php<br>blocksy/woocommerce/single-product/tabs/tabs.php Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br><br>Disabled Features: minified-js<br>new-product-management-experience<br>pattern-toolkit-full-composability<br>product-pre-publish-modal<br>settings<br>async-product-editor-category-field<br>launch-your-store<br>product-editor-template-system<br><br>Daily Cron: ? Next scheduled: 2024-06-24 04:58:36 +00:00<br>Options: ?<br>Notes: 92<br>Onboarding: completed Action Scheduler<br><br>Complete: 32<br>Oldest: 2024-06-20 13:29:07 +0000<br>Newest: 2024-06-24 04:18:10 +0000<br><br>Failed: 12<br>Oldest: 2023-08-26 05:17:46 +0000<br>Newest: 2023-10-02 15:59:07 +0000<br><br>Pending: 6<br>Oldest: 2024-06-24 14:44:50 +0000<br>Newest: 2024-06-27 13:29:08 +0000 Status report information<br><br>Generated at: 2024-06-24 04:18:49 +00:00<br>
    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello vsacad

    Thank you for your reply.

    I understand that you are facing an issue where only Home is loading fine and all other links are showing a critical error. Is my understanding correct?

    Let’s try this step and see if the other pages are loading.
    Log in to the Dashboard and go to Settings → Permalinks and choose Plain.

    If the error persists, try disabling all plugins except WooCommerce and checking again.
    Let me know how it goes. ??

    Best regards.

    Thread Starter vsacad

    (@vsacad)

    @doublezed2

    I tried as per your suggestions and it worked.

    First I changed the permalik setting to plain, but nothing happened.

    Then I deactivated all plugins, except Woocommerce and the site started working normally.

    Then one by one I activated the plugins and checked for any issue at the frontend.

    When I activated, WooCommerce Stripe Gateway plugin, then the issue started again.

    So I removed that plugin and now using PhonePe gateway plugin with success.

    I think the issue is resolved now. Ok, is it?

    The original issue in this thread is reportedly resolved, @vsacad .

    Moreover, you are reporting to have discovered that while re-activating plugins one-by-one, after changing the permalinks structure, the critical error reported here started appearing again when the WooCommerce Stripe Gateway plugin was activated. Odd, but you were able to proceed by utilizing another one in its place.

    The issues reported in this thread appear to be resolved now — correct.

    Should you wish looking further into the issue with the WooCommerce Stripe Gateway plugin, feel free to post here.

    I hope this is helpful, have a great one!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.