Skip to content

Illegal offset type error during checkout #3833

@mrsurfhunter

Description

@mrsurfhunter

While using the Newspack plugin for user subscriptions, we encountered a PHP Recoverable Error in WooCommerce Subscriptions (v7.2.1). The error message is:

Mar 15/2025 17:37:31 > 2025-03-15T23:37:31.110382193Z stderr F [15-Mar-2025 23:37:31 UTC] PHP Recoverable Error: Uncaught exception 'TypeError' with message 'Illegal offset type' in /app/web/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/wcs-functions.php on line 545, request: POST /?wc-ajax=checkout, request_id: e967e093b4f5349ea14b983f851acb73

This is the line
$subscriptions[ $subscription_id ] = wcs_get_subscription( $subscription_id );

All the plugins and wordpress are el the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions