• Resolved abgalaxy

    (@abgalaxy)


    Memory limit (4GB) error when using wc_get_orders, recommended by WC.

    wc_get_orders( array( ‘status’ => [‘wc-completed’], ‘limit’ => -1, ‘date_query’ => array( array( ‘after’ => $cutoff_date, ‘before’=> $before_date, ‘inclusive’ => true, ), ),

    I used and it generates the error memory limit when searching the orders:
    “Out of?memory?(allocated 1541406720) (tried to allocate 20480 bytes)
    “error”: { “type”: 1, “file”: “……\/class-wc-order-data-store-cpt.php”, “line”: 129},
    …}”

    The databse has a few thousand orders, it is small.
    The website (WC, WP, theme and plugins) is updated.
    The server is a VPS.

    Could not find anything in WC documentation to solve this situation.

    Thank you very much.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.