• Resolved shaunek

    (@shaunek)


    I’m trying to test out this plugin so I installed a WordPress site locally (via LocalWP), added Woocommerce, and then added this WeeConnectPay plugin. So I only have two plugins installed. When I click the Activate button the page displays an error “Plugin could not be activated because it triggered a fatal error.” I have installed this on two localhost dev sites and same result.

    I found the following logged in wp-content/uploads/wc-logs/fatal-errors-2025-08-27-960e8afb5aa41b69d86c907069a60421.log:

    2025-08-27T16:36:02+00:00 CRITICAL Uncaught Error: Class "WeeConnectPay\Utils\LogService" not found in /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/includes/modules/WeeConnectPay/Integration/Authentication.php:118 CONTEXT: {"error":{"type":1,"file":"/Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/includes/modules/WeeConnectPay/Integration/Authentication.php","line":118},"remote-logging":true,"backtrace":["","#0 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/includes/modules/WeeConnectPay/Integration/IntegrationSettings.php(1018): WeeConnectPay\Integrations\Authentication::fetchIntegrationId()","#1 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/includes/modules/WeeConnectPay/Integration/IntegrationSettings.php(1002): WeeConnectPay\Integrations\IntegrationSettings::initialize()","#2 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/includes/modules/WeeConnectPay/Integration/IntegrationSettings.php(762): WeeConnectPay\Integrations\IntegrationSettings::reinitialize()","#3 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/includes/WeeConnectPayActivator.php(57): WeeConnectPay\Integrations\IntegrationSettings::maybeFirstTimeInit()","#4 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-content/plugins/weeconnectpay/weeconnectpay.php(52): WeeConnectPay\WordPress\Plugin\includes\WeeConnectPayActivator::activate()","#5 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-includes/class-wp-hook.php(324): activate_weeconnectpay(false)","#6 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)","#7 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)","#8 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-admin/includes/plugin.php(703): do_action('activate_weecon…', false)","#9 /Users/shaun/Local Sites/bare-woocommerce/app/public/wp-admin/plugins.php(60): activate_plugin('weeconnectpay/w…', 'http://bare-woo…', false)","#10 {main}","thrown"]}

    I also attempted to install and activate this plugin on a sandbox website, which is hosted on a wordpress hosting setup and it activated okay. To me this is a little bit of a red flag, but maybe this is how you intended it to be?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WeeConnectPay

    (@weeconnectpay)

    Thank you for the detailed bug report and for taking the time to test our plugin! You’ve identified a genuine issue that we really appreciate you bringing to our attention.

    What Happened

    The fatal error you encountered was due to a very small (namespace) code issue during our plugin’s initial setup process. When the plugin tries to establish its first connection with our payment system during activation, it encountered an error and couldn’t properly log what went wrong – that’s what caused the fatal error you saw.

    The Fix

    We’ve just corrected this issue. Version 3.15.2 is live with the fix. Now instead of a fatal error, you’ll see a clear, helpful message explaining exactly what’s happening during activation. This gives you (and us) much better information about any setup requirements.

    Why Different Behavior on Different Environments

    You’re absolutely right to notice the difference between your local setup and the hosted site – that’s actually expected behavior. Our plugin needs to establish a secure connection with our payment processing system during initial setup. Local development environments (like LocalWP) sometimes have different network configurations, domain setups, or security settings that can affect this initial connection process.

    The plugin is designed to work with standard web hosting environments where these connections work seamlessly. This isn’t about blocking local development – it’s just that payment processing requires certain network and security configurations that are standard in hosted environments but can vary in local setups.

    Moving Forward

    With the upcoming update, you’ll get clear information about what’s happening during activation instead of that cryptic fatal error. This will help you understand exactly what the plugin needs to complete its setup process.

    Should you need more help resolving the underlying issue, please reach out to support@weeconnectpay.com and we will be happy to follow up within our ticketing system.

    We really appreciate you taking the time to report this – detailed feedback like yours helps us improve the plugin for everyone!

    Thread Starter shaunek

    (@shaunek)

    Wow, what a quick response, thank you very much. I got the most recent version and attempted to activate, and I still got a very similar error in the WordPress Admin UI. See screenshots here: https://imgur.com/a/wGyfoRk

    But I did get a different error message in my php error log…

    [27-Aug-2025 22:16:02 UTC] [WeeConnectPay] [CRITICAL] CRITICAL WARNING: WeeConnectPay is running in 'development' environment instead of 'production'. Non-production use of this plugin will NOT WORK because Clover does not expose our app in non-production environments. Authentication will fail. REQUIRED ACTION: (1) Uninstall the WeeConnectPay plugin completely, (2) Set your WordPress environment to 'production', (3) Reinstall the plugin. This happens because your WP_ENVIRONMENT constant is set to non-production. Non-production authentication is only available to internal WeeConnectPay developers. If you don't understand why WeeConnectPay is not resolving to production environment, please contact support@weeconnectpay.com for assistance.

    Thankfully that had a good error message that helped me understand that I needed to change the WP_ENVIRONMENT_TYPE constant that was defined in my wp-config.php file from ‘local’ to ‘production’ to get this to work.

    So in the end I was able to install the plugin on my localhost. I had more to do but thanks for helping me figure out the issue. I will say that the message that was provided in the error log would have been nice if it could have been displayed on the screen. Not all WordPress users know how to rummage through the appropriate log files.

    All the best, cheers!

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

The topic ‘Failure activating plugin’ is closed to new replies.