title: Get product IDs while using the "woocommerce_payment_complete" hook
body: <p>My hooks are in theme folder/functions.php</p>
  
  <p>I want tie hook with product_id from order.</p>
  
  <p>tryin this method but they return nothing.</p>
  
  <pre><code>$product-&gt;get_id()
  or
  $product = wc_get_product( $product_id );
  </code></pre>
  
  <p>Full code</p>
  
  <pre><code>add_action( 'woocommerce_payment_complete', 'so_payment_complete' );
  function so_payment_complete($order_id)
  {
      $order = wc_get_order($order_id);
      $billingEmail = $order-&gt;billing_email;
      $billingName = $order-&gt;billing_first_name;
      $product_id = $order-&gt;product_id;
  
      if ($product_id == 980) {
         ......
      }
  </code></pre>