Skip to content

Replace deprecated Query::get_data usage with DataStore::get_data in WooCommerce status child class #780

@bkatusic

Description

@bkatusic

Description of Issue:

The Automattic\WooCommerce\Admin\API\Reports\Products\Query::get_data method is deprecated since WooCommerce 9.3.0.
In class-mainwp-child-woocommerce-status.php (line 389), the following code needs to be updated:

$report = new \Automattic\WooCommerce\Admin\API\Reports\Products\Query( $args );
$product_data = $report->get_data();

Proposed replacement:

use Automattic\WooCommerce\Admin\API\Reports\Products\DataStore;
$data_store = new DataStore();
$product_data = $data_store->get_data( $args );

Note

If you have a similar issue but the steps to reproduce are different, please open a help ticket for us to review and verify if it's a new issue or part of this one. Thanks!

Reported on: 2025-05-06
Issue confirmed with dev team: 2025-05-06
Resolved: Pending

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions