• Resolved keranov

    (@keranov)


    My website is broken since the last update (updated it this morning) with the following fatal error: Fatal error: Cannot declare class WC_Stripe_REST_Controller, because the name is already in use in /home/customer/www/engineeringacademy.eu/public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-rest-controller.php on line 0
    Also what happened overnight is
    1. SG security not working
    2. SG optimization not working
    3. Cloudflare not working
    4. weird cronjob malfunction
    5. statistics stopped working
    6. the cart icon disappeared
    7. member having the course can buy it over and over again
    8. coming soon courses are displayed as launched courses and members can buy them
    9. members who bought already launched courses can’t enter the course – they don’t see the button “take the course” or however it was called (the button replacing “Buy Now” after the purchase)

    The investigation so far shows that the problem is connected to the woocommerce and stripe which are integrated together with the theme.

    I tried using a wp CLI command and I could see the following fatal error:

    baseos | [email protected]:~/www/engineeringacademy.eu/public_html$ wp plugin status
    Fatal error: Cannot declare class WC_Stripe_REST_Controller, because the name is already in use in /home/customer/www/engineeringacademy.eu/public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-rest-controller.php on line 11
    <!DOCTYPE html>
    <html lang="en-US">
    <head>...

    Then instead of a list of the active plugins, I saw an html page. In the php_errorlog file in ~/www/engineeringacademy.eu/public_html I can also see the same fatal error:

    [02-Oct-2021 09:27:19 UTC] PHP Fatal error: Cannot declare class WC_Stripe_REST_Controller, because the name is already in use in /home/customer/www/engineeringacademy.eu/public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-rest-controller.php on line 11

    It is connected with woocommerce-gateway-stripe and I need to know how to resolve this error.

    It seems related to the other mentioned issues. Furthermore, the REST API does not receive an expected result this impedes the normal working of SiteGround Optimizer for example.

    wp cron event run –due-now results in the same html output and fatal error:

    baseos | [email protected]:~/www/engineeringacademy.eu/public_html$ wp cron event run --due-now
    Fatal error: Cannot declare class WC_Stripe_REST_Controller, because the name is already in use in /home/customer/www/engineeringacademy.eu/public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-rest-controller.php on line 11
    <!DOCTYPE html>
    <html lang="en-US">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    	<meta name="viewport" content="width=device-width">
    		<meta name='robots' content='max-image-preview:large, noindex, follow' />
    	<title>WordP...

    Need help guyssss

Viewing 15 replies - 1 through 15 (of 18 total)
  • Looking for a solution too as I am experiencing the same error.

    Plugin Support Thu P. a11n

    (@thup90)

    Hi @keranov , @cartersheehan ,

    Could you share your System Status Report, it would help us to understand your site setup a bit better. You can find it via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, paste it here in your reply.

    Hi,

    We have the same problem

    WP error:
    An error of type E_COMPILE_ERROR was caused in line 11 of the file /home/…/admin/class-wc-stripe-rest-controller.php. Error message: Cannot declare class WC_Stripe_REST_Controller, because the name is already in use

    System status report:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://www.twobluedogsdesigns.com
    Site address (URL): https://www.twobluedogsdesigns.com
    WC Version: 5.7.1
    REST API Version: ? 5.7.1
    WC Blocks Version: ? 5.7.2
    Action Scheduler Version: ? 3.2.1
    WC Admin Version: ? 2.6.5
    Log Directory Writable: ?
    WP Version: 5.8.1
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: LiteSpeed
    PHP Version: 7.4.23
    PHP Post Max Size: 512 MB
    PHP Time Limit: 120
    PHP Max Input Vars: 8000
    cURL Version: 7.71.0
    OpenSSL/1.1.1d
    
    SUHOSIN Installed: –
    MySQL Version: 10.3.31-MariaDB-log-cll-lve
    Max Upload Size: 512 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 5.7.1
    WC Database Prefix: wp_
    Total Database Size: 17.67MB
    Database Data Size: 15.18MB
    Database Index Size: 2.49MB
    wp_woocommerce_sessions: Data: 0.19MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 0.08MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_actionscheduler_actions: Data: 0.03MB + Index: 0.03MB + Engine MyISAM
    wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_actionscheduler_logs: Data: 0.02MB + Index: 0.02MB + Engine MyISAM
    wp_blc_filters: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_blc_instances: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wp_blc_links: Data: 0.18MB + Index: 0.03MB + Engine MyISAM
    wp_blc_synch: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_duplicator_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_formmaker: Data: 0.03MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_backup: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_blocked: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_cookies: Data: 0.67MB + Index: 0.13MB + Engine MyISAM
    wp_formmaker_display_options: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_groups: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_query: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_sessions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_submits: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_themes: Data: 0.09MB + Index: 0.00MB + Engine MyISAM
    wp_formmaker_views: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Data: 3.08MB + Index: 0.14MB + Engine InnoDB
    wp_postmeta: Data: 2.33MB + Index: 0.38MB + Engine InnoDB
    wp_posts: Data: 2.20MB + Index: 0.22MB + Engine InnoDB
    wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_usermeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine MyISAM
    wp_wc_admin_note_actions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_customer_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_product_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_order_stats: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_product_meta_lookup: Data: 0.01MB + Index: 0.02MB + Engine MyISAM
    wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBlockedIPLog: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
    wp_wfBlocks7: Data: 0.04MB + Index: 0.03MB + Engine MyISAM
    wp_wfConfig: Data: 1.23MB + Index: 0.00MB + Engine InnoDB
    wp_wfCrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfFileChanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfFileMods: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    wp_wfHits: Data: 1.02MB + Index: 0.23MB + Engine InnoDB
    wp_wfHoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfIssues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wfKnownFileList: Data: 1.24MB + Index: 0.15MB + Engine MyISAM
    wp_wfLiveTrafficHuman: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_wfLocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfLogins: Data: 0.39MB + Index: 0.16MB + Engine InnoDB
    wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfNotifications: Data: 0.04MB + Index: 0.01MB + Engine MyISAM
    wp_wfPendingIssues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfReverseCache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wfSNIPCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfStatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB
    wp_wfTrafficRates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    
    ### Post Type Counts ###
    
    attachment: 835
    da_image: 5
    fmemailverification: 1
    form-maker: 1
    jetpack_migration: 2
    nav_menu_item: 16
    page: 20
    post: 3
    product: 44
    revision: 265
    shop_order: 42
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (20) ###
    
    Akismet Anti-Spam: by Automattic – 4.2.1
    Breadcrumb NavXT: by John Havlik – 6.6.0
    Broken Link Checker: by WPMU DEV – 1.11.16
    Disable Comments: by WPDeveloper – 2.2.1
    Draw Attention Pro: by N Squared – 1.13.7
    Duplicator: by Snap Creek – 1.4.3
    Easy Google Fonts: by Titanium Themes – 2.0.4
    Form Maker: by 10Web Form Builder Team – 1.14.3
    Google XML Sitemaps: by Auctollo – 4.1.1
    Jetpack: by Automattic – 10.1
    Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue: by Sendinblue – 3.1.20
    WooCommerce Table Rate Shipping by Mangohour: by mangohour – 1.2.1
    Advanced Editor Tools (previously TinyMCE Advanced): by Automattic – 5.6.0
    Termly | GDPR/CCPA Cookie Consent Banner: by Termly – 3.0.2
    W3 Total Cache: by BoldGrid – 2.1.8
    Google Analytics and Google Tag Manager by WebKinder: by WebKinder – 1.9.4
    Stripe For WooCommerce: by Payment Plugins
    [email protected] – 3.3.10
    
    WooCommerce Stripe Gateway: by WooCommerce – 5.6.0
    WooCommerce: by Automattic – 5.7.1
    Wordfence Security: by Wordfence – 7.5.5
    
    ### Inactive Plugins (0) ###
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #9 - /index.php/shop/
    Cart: #10 - /index.php/cart/
    Checkout: #11 - /index.php/checkout/
    My account: #12 - /index.php/my-account/
    Terms and conditions: #170 - /index.php/terms-and-conditions/
    
    ### Theme ###
    
    Name: Storefront
    Version: 3.9.1
    Author URL: https://woocommerce.com/
    Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 97
    Oldest: 2021-09-14 11:20:06 +0100
    Newest: 2021-10-03 15:30:46 +0100
    
    Failed: 1
    Oldest: –
    Newest: –
    
    Pending: 2
    Oldest: 2021-10-04 07:14:28 +0100
    Newest: 2021-10-06 07:58:35 +0100
    
    ### Status report information ###
    
    Generated at: 2021-10-03 16:26:06 +01:00
    
    • This reply was modified 3 years, 1 month ago by jesshurch.
    Plugin Support Thu P. a11n

    (@thup90)

    Hi @jesshurch ,

    Checking your System report, it appears there are 2 Stripe plugins being active on the site: the WooCommerce Stripe plugin and Stripe For WooCommerce: by Payment Plugins.

    This seems to have caused the clash in class name used in the two plugins. I’d recommend disabling the Stripe For WooCommerce: by Payment Plugins to fix this error.

    Let us know how it goes. We’re here to help further.

    Hi @thup90,

    This seems to have caused the clash in class name used in the two plugins. I’d recommend disabling the Stripe For WooCommerce: by Payment Plugins to fix this error.

    The classname WC_Stripe_REST_Controller has been used by my plugin since it was first released. This has happened in the past, where a release of this plugin clashes with a naming convention used in my plugin. Because both plugins have a sizeable user base, it might be good to test for class name conflicts before releases.

    Kind Regards,

    it appears there are 2 Stripe plugins being active on the site

    Thanks @thup90. Disabled one plugin and fixed

    Thread Starter keranov

    (@keranov)

    @thup90 I can’t even get a system report… that’s the screen I am getting https://ibb.co/GHG1XYn

    Plugin Support Thu P. a11n

    (@thup90)

    Hi @mrclayton ,

    It might be something in this release that might have triggered this error, however, you shouldn’t need both Stripe plugins that do the same thing? What is the purpose of having both plugins?

    Hi @keranov ,

    Do you also have a second Stripe plugin running? I’d suggest disabling the second plugin to see if that helps with the error.

    Hi @thup90

    What is the purpose of having both plugins?

    I personally am not running both plugins. I am the creator of Stripe for WooCommerce.

    I’d suggest disabling the second plugin to see if that helps with the error.

    I wish you would stop telling merchants to disable my plugin, it is not the cause of the error.

    Users can downgrade this plugin to version 5.5.0 and that will resolve the duplicate class name error that was introduced in version 5.6.0.

    Kind regards

    Thread Starter keranov

    (@keranov)

    I deleted the plugin (WooCommerce Stripe Gateway) And most of the things are back to normal, lol. I guess my best option now is to test Stripe for Woocommerce if it is suitable with my system.

    @mr.Clayton

    Instead of asking people to downgrade, why can’t you update the plugin to version 5.7.0 with the issue resolved? As soon as i disabled Stripe for WooCommerce everything started working again. Why do we need both plugins?

    @flockinglegless

    Instead of asking people to downgrade, why can’t you update the plugin to version 5.7.0 with the issue resolved?

    There seems to be some confusion. I am not the developer of the WooCommerce Stripe Payment Gateway and as such have no ability to update this plugin. I am the creator of Stripe for WooCommerce. Stripe for WooCommerce was not the cause of the issue.

    @mrclayton

    OK understood and thanks for replying. So basically it’s one or the other plugin? TBH i’m not sure why i had two in the first place!

    @flockinglegless

    So basically it’s one or the other plugin?

    Yes, it’s best to have one Stripe plugin enabled. But before version 5.6.0 of THIS plugin you could run both concurrently. The developers of this plugin are releasing a new version that resolves that issue.

    Plugin Support frosso1 (a11n)

    (@frosso1)

    Hi all,

    The name conflict that presented itself when also the other plugin is enabled has been resolved with version 5.6.1 of WooCommerce Stripe.

    Thanks for your patience!

    Francesco

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Fatal Error After Updating to WooCommerce Stripe Gateway version 5.6.0’ is closed to new replies.