• Anas

    (@anashannoun)


    Dear plugin Developers,

    Thank you so much for the hard work you are putting into the plugin, it’s much appreicated.

    However one of our sites’ logs is being overflooded with a WooCommerce error

    get_cart was called incorrectly. Get cart should not be called before the wp_loaded action. Backtrace: require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\BlockTypesController->register_blocks, Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->__construct, Automattic\WooCommerce\Blocks\BlockTypes\Checkout->initialize, Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->initialize, Automattic\WooCommerce\Blocks\BlockTypes\Checkout->register_block_type_assets, Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->register_block_type_assets, Automattic\WooCommerce\Blocks\Assets\Api->register_script, apply_filters('woocommerce_blocks_register_script_dependencies'), WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Payments\Api->add_payment_method_script_dependencies, Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry->get_all_active_payment_method_script_dependencies, Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType->get_payment_method_script_handles_for_admin, Mollie\WooCommerce\Assets\MollieCheckoutBlocksSupport->get_payment_method_script_handles, Mollie\WooCommerce\Assets\MollieCheckoutBlocksSupport::localizeWCBlocksData, Mollie\WooCommerce\Assets\MollieCheckoutBlocksSupport::gatewayDataForWCBlocks, WC_Payment_Gateways->get_available_payment_gateways, apply_filters('woocommerce_available_payment_gateways'), WP_Hook->apply_filters, Alg_WC_PGPP_Core->filter_available_payment_gateways_per_category, WC_Cart->is_empty, WC_Cart->get_cart, wc_doing_it_wrong. This message was added in version 2.3.

    I’m talking 2.5+ GB error log per month!

    Could you please not call get_cart incorrectly? ??

    PS. I have already tried to change Add filter to “In constructor” instead of “init” and still the same!

    Kind Regards.

    • This topic was modified 9 months, 3 weeks ago by Anas.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    I am really sorry to know that you are having issues.

    I have escalated this with our development team. They will back to you as soon as possible.

    Kind regards.

    Plugin Contributor Kousik Mukherjee

    (@kousikmukherjeeli)

    Hello @anashannoun,

    Apologies for the delayed response.

    Please upgrade your store with our latest version of plugin 1.7.11.

    You can try this setting: add a filter > on the “wp_loaded” action.

    Regards,
    Kousik Mukherjee

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_cart was called incorrectly’ is closed to new replies.