WooCommerce 3.0+. you can get the order items of an order by $order = wc_get_order( $order_id ); $items = $order->get_items();. then if you loop through the ...
Or “How can I get the order items“? Or maybe the order ID, customer ID, billing info, payment method, total refunds and so on… hopefully this ...
This code is outdated for WooCommerce version 3+. You should use instead: add_action( 'woocommerce_thankyou' ...
Once again, in here you don't really have a $product available, so you have to loop through the order/cart items and “get” it. After that, you can then calculate and ...
If you use the get_id() method, you get your item ID which is 15 in your code. Get the product ID: The correct WC_Order_Item_Product method ...
To find the Product ID, go to the Products screen, hover over the product and the ID appears ...
It has to be added to functions.php in your theme, then called in the Content Template with the ShortCode [get_user_who_bought_the_product], ...
Get. Let's begin with WC_Order's get_items() that returns all products in an order. But why? – order items are not only products, shipping and fee are also order ...
the customer will receive an email when the pre-order is released prompting them to come back ...
Alternatively the items per page can be specified with the ?per_page parameter: GET /orders?per_page=15. You can specify further pages with the ?page ...