• Resolved Art Project Group

    (@artprojectgroup)


    Can you fix this error?

    The Automattic\WooCommerce\Admin\API\Reports\Products\Query::get_data function is deprecated since version 9.3.0. Replace with GenericQuery, \WC_Object_Query, or direct DataStore use.
    

    It is generated by /class/class-mainwp-child-woocommerce-status.php, line 389. The solution involves replacing this:

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

    With something along the lines of this:

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

    Thank you!

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Bojan Katusic

    (@bojankatusic)

    Hey @artprojectgroup

    Thanks for reporting this to us.

    It will be fixed in an upcoming MainWP Child release.

    Plugin Support Bojan Katusic

    (@bojankatusic)

    The fix for this issue was included in the v5.4.0.7 of the MainWP Child plugin released on 13-05-2025.

    Thanks again for reporting this to us.

    Thread Starter Art Project Group

    (@artprojectgroup)

    Yes, I’ve seen it and updated it.

    Thank you very much.

    Best regards.

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

The topic ‘Fix the plugin’ is closed to new replies.