Woocommerce get all completed and paid orders

    // get paid orders
    $args = array(
        'post_type' => 'shop_order',
        'post_status' => 'wc-completed',
        'posts_per_page' => -1,
    );
    $orders = get_posts($args);

With this code you can get all completed and paid orders

Leave a Reply

Your email address will not be published.