title: Get the date an order was paid on Woocommerce
body: <p>How can I get, on Woocommerce, the date an order had its status changed to paid/complete?</p>
  
  <p>I saw something about getting the orders from a costumer, but this would be just the first step of my algorithm. Then I would need to know when it changed to complete.</p>
  
  <p>The idea is to make a membership area: a payment lasts 3 months. So I will count the days passed since it was bought</p>
  
  <p>Something related
  <a href="https://www.skyverge.com/blog/get-all-woocommerce-orders-for-a-customer/" rel="nofollow">https://www.skyverge.com/blog/get-all-woocommerce-orders-for-a-customer/</a></p>
  
  <p>And this is what I use to know if a product was bought by the costumer</p>
  
  <pre><code>if (wc_customer_bought_product($customer_email, $user_id,$loop-&gt;post-&gt;ID)){
              $courses[] = $this-&gt;find($loop-&gt;post-&gt;ID);
            }
  </code></pre>