• Resolved Vince

    (@vincentrich)


    I am getting strange PHP fatal errors when I enable this plugin. It breaks my WordPress admin and I have to SSH and use WP-CLI to manually deactivate this plugin to make my WordPress admin work again.

    I have also tried to delete the plugin directory and install the plugin manually again. Either through FTP or WP-CLI.

    I have also tried to delete all the database options of this plugin with Advanced DB Cleaner PRO. This allows me to activate the plugin and follow the connection step but it breaks my WordPress admin during the connection to Stripe step.

    [10-Mar-2024 00:41:41 UTC] PHP Fatal error:  Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php:438
    Stack trace:
    #0 /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php(438): ftp_nlist()
    #1 /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php(456): WP_Filesystem_FTPext->exists()
    #2 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php(260): WP_Filesystem_FTPext->is_file()
    #3 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php(424): Automattic\WooCommerce\Internal\Admin\Logging\FileV2\File->is_writable()
    #4 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php(148): Automattic\WooCommerce\Internal\Admin\Logging\FileV2\File->write()
    #5 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/LogHandlerFileV2.php(60): Automattic\WooCommerce\Internal\Admin\Logging\FileV2\FileController->write_to_file()
    #6 /public_html/wp-content/plugins/woocommerce/includes/class-wc-logger.php(164): Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2->handle()
    #7 /public_html/wp-content/plugins/woocommerce/includes/class-wc-logger.php(286): WC_Logger->log()
    #8 /public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-logger.php(56): WC_Logger->debug()
    #9 /public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-api.php(171): WC_Stripe_Logger::log()
    #10 /public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-account.php(83): WC_Stripe_API::retrieve()
    #11 /public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-account.php(62): WC_Stripe_Account->cache_account()
    #12 /public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-admin-notices.php(255): WC_Stripe_Account->get_cached_account_data()
    #13 /public_html/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-admin-notices.php(56): WC_Stripe_Admin_Notices->stripe_check_environment()
    #14 /public_html/wp-includes/class-wp-hook.php(324): WC_Stripe_Admin_Notices->admin_notices()
    #15 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #16 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #17 /public_html/wp-admin/admin-header.php(303): do_action()
    #18 /public_html/wp-admin/plugins.php(621): require_once('/mnt/data/home/...')
    #19 {main}
      thrown in /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438
    [10-Mar-2024 00:41:41 UTC] PHP Fatal error:  Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php:438
    Stack trace:
    #0 /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php(438): ftp_nlist()
    #1 /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php(456): WP_Filesystem_FTPext->exists()
    #2 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php(260): WP_Filesystem_FTPext->is_file()
    #3 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php(424): Automattic\WooCommerce\Internal\Admin\Logging\FileV2\File->is_writable()
    #4 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php(148): Automattic\WooCommerce\Internal\Admin\Logging\FileV2\File->write()
    #5 /public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/LogHandlerFileV2.php(60): Automattic\WooCommerce\Internal\Admin\Logging\FileV2\FileController->write_to_file()
    #6 /public_html/wp-content/plugins/woocommerce/includes/class-wc-logger.php(164): Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2->handle()
    #7 /public_html/wp-content/plugins/woocommerce/includes/class-wc-logger.php(211): WC_Logger->log()
    #8 /public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(325): WC_Logger->critical()
    #9 [internal function]: WooCommerce->log_errors()
    #10 {main}
      thrown in /public_html/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438

    Any help would be appreciated. I have no choice but to disable this plugin for now. PayPal will be my only payment method for now.

    • This topic was modified 8 months, 3 weeks ago by Vince.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Vince

    (@vincentrich)

    define('FS_METHOD', 'direct');

    I am testing adding this filesystem method into my WP config file to see if it helps. So far so good. I got to complete the Stripe wizard set up without anything breaking. I am just doing a bit more testing to make sure it runs fine.

    I do not understand why I have to add this setting all of a sudden. I never had to do this before.

    Hi @vincentrich,

    I understand you’re experiencing issues with the WooCommerce Stripe plugin. From the error message you provided, it seems like there might be an issue with the FTP connection when the plugin tries to write logs. This could be due to a variety of reasons such as incorrect FTP credentials, issues with the FTP server, or file permission issues on your server.

    Here are a few steps you can take to troubleshoot this issue:

    1. Ensure that the FTP credentials in your wp-config.php file is correct.
    2. Sometimes, file permission issues on your server can cause problems.
    3. Enabling WordPress debugging will allow you to see any PHP errors that might be occurring when you try to activate the plugin.
    4. Try deactivating all other plugins except WooCommerce and Stripe to see if the issue persists. If the issue is resolved, reactivate your plugins one by one until you find the one causing the conflict.

    If none of these steps resolve your issue, please share with us the System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Looking forward to your response.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @vincentrich,

    I do not understand why I have to add this setting all of a sudden. I never had to do this before.

    The FS_METHOD determines how WordPress interacts with the file system on your server. By default, WordPress tries to use the direct method, but if it can’t, it falls back to other methods such as ftp_nlist() which seems to be causing the issue in your case.

    The line define('FS_METHOD', 'direct'); you added to your wp-config.php file is forcing WordPress to use the direct method. This is likely why you’re seeing an improvement.

    However, it’s important to note that the direct method requires that PHP has access to write directly to your files, which might not be true on some shared hosts for security reasons. If unsure, it’s best to consult your hosting provider.

    I hope this provides some clarity. Please let us know if you have any other questions!

    Thread Starter Vince

    (@vincentrich)

    I was also expecting my FS_Method to be direct by default but I do not understand why I now have to explicitly set it in my WP config to make that work.

    I personally do not use the FTP methods because I usually update my plugins during deployment or in WP-CLI. I do not like to use the update features in WP Admin.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Vince

    Thank you for your reply.

    The reason that FS_Method is not set to Direct by default may depend on your server environment and how the WordPress was installed.
    Your Host will be in a better position to provide you with an accurate answer.

    I understand you do not use FTP but to edit the wp-config.php file you will need to use FTP or any other web-based method provided by your host.
    For example, some servers provide cPanel which has a built-in File Manager to browse and edit files.

    I hope this answers your question. ??
    Feel free to contact us again if you have more questions.

    Best regards.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @vincentrich,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WooCommerce 8.6.1 + Stripe 8.0.0 PHP Fatal Error’ is closed to new replies.