• Resolved Mike Straw

    (@mikestraw)


    Installed the plugin and started immediately getting fatal errors after activating. Initially, the fatals only showed in the logs or when using WP-CLI, but then spread to the site.

    Running WordPress 6.5.5, WooCommerce 9.0.2, PHP 8.3.8.

    [27-Jun-2024 17:48:39 UTC] PHP Warning:  Undefined array key "bitpay_checkout_gateway" in /srv/htdocs/wp-content/p
    lugins/bitpay-checkout-for-woocommerce/build/BitPayLib/Blocks/class-bitpaypaymentsblocks.php on line 25
    [27-Jun-2024 17:48:39 UTC] PHP Fatal error: Uncaught Error: Call to a member function is_available() on null in /
    srv/htdocs/wp-content/plugins/bitpay-checkout-for-woocommerce/build/BitPayLib/Blocks/class-bitpaypaymentsblocks.ph
    p:29
    Stack trace:
    #0 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/Payments/PaymentMethodRegistry.php(28): BitPayVendor\BitP
    ayLib\Blocks\BitPayPaymentsBlocks->is_active()
    #1 [internal function]: Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry->Automattic\WooCommerce\Block
    s\Payments\{closure}(Object(BitPayVendor\BitPayLib\Blocks\BitPayPaymentsBlocks))
    #2 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/Payments/PaymentMethodRegistry.php(25): array_filter(Arra
    y, Object(Closure))
    #3 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/Payments/PaymentMethodRegistry.php(40): Automattic\WooCom
    merce\Blocks\Payments\PaymentMethodRegistry->get_all_active_registered()
    #4 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/Payments/Api.php(65): Automattic\WooCommerce\Blocks\Payme
    nts\PaymentMethodRegistry->get_all_active_payment_method_script_dependencies()
    #5 /wordpress/core/6.5.5/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\Payments\Api->add_payme
    nt_method_script_dependencies(Array, 'wc-cart-block')
    #6 /wordpress/core/6.5.5/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
    #7 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/Assets/Api.php(275): apply_filters('woocommerce_blo...',
    Array, 'wc-cart-block')
    #8 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(139): Automattic\WooCommerce
    \Blocks\Assets\Api->register_script('wc-cart-block', 'assets/client/b...', Array, true)
    #9 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/Cart.php(271): Automattic\WooCommerce\Blocks\B
    lockTypes\AbstractBlock->register_block_type_assets()
    #10 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(124): Automattic\WooCommerc
    e\Blocks\BlockTypes\Cart->register_block_type_assets()
    #11 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/Cart.php(34): Automattic\WooCommerce\Blocks\B
    lockTypes\AbstractBlock->initialize()
    #12 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(70): Automattic\WooCommerce
    \Blocks\BlockTypes\Cart->initialize()
    #13 /srv/htdocs/wp-content/plugins/woocommerce/src/Blocks/BlockTypesController.php(106): Automattic\WooCommerce\Bl
    ocks\BlockTypes\AbstractBlock->__construct(Object(Automattic\WooCommerce\Blocks\Assets\Api), Object(Automattic\Woo
    Commerce\Blocks\Assets\AssetDataRegistry), Object(Automattic\WooCommerce\Blocks\Integrations\IntegrationRegistry))
    #14 /wordpress/core/6.5.5/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockTypesController->
    register_blocks('')
    #15 /wordpress/core/6.5.5/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #16 /wordpress/core/6.5.5/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #17 /wordpress/core/6.5.5/wp-settings.php(695): do_action('init')
    #18 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1374): require('/wordpress/core...')
    #19 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1293): WP_CLI\Runner->load_wordpress()
    #20 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->st
    art()
    #21 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->proces
    s(Object(WP_CLI\Bootstrap\BootstrapState))
    #22 phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
    #23 phar:///usr/local/bin/wp-cli/php/boot-phar.php(20): include('phar:///usr/loc...')
    #24 /usr/local/bin/wp-cli(4): include('phar:///usr/loc...')
    #25 {main}
    thrown in /srv/htdocs/wp-content/plugins/bitpay-checkout-for-woocommerce/build/BitPayLib/Blocks/class-bitpaypaym
    entsblocks.php on line 29
Viewing 3 replies - 1 through 3 (of 3 total)
  • Bob Brodie

    (@bobbrodie)

    Hi @mikestraw, thank you so much for letting us know. We’ll check this out.

    Bob Brodie

    (@bobbrodie)

    Hello,

    We are working on reproducing the issue but so far have not been able to while running the same versions you posted:

    WordPress 6.5.5, WooCommerce 9.0.2, PHP 8.3.8

    Could you share a step-by-step replication flow with more detail, as well as a list of other plugins and their versions that are installed?

    Thanks again,

    Bob

    Thread Starter Mike Straw

    (@mikestraw)

    Hi @bobbrodie ,

    I assumed because it wasn’t finding a function, that it was a bug in the plugin, but your question led me to do some conflict testing, and I found the error goes away when we deactivate one of our internally-developed plugins.

    I’ll dig into that plugin and find out why it’s causing the conflict.

    Thanks for the quick response!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error on activation’ is closed to new replies.