Get Product Variation Download Url in WC-Order > Get Items foreach loop
-
Trying to get the download URL for a product variation in a function hooked to woocommerce_checkout_order_processed, this isn’t working but unsure why, any pointers appreciated. The whole download_id thing is a little confusing…
function my_checkout_function($order_id) { $order = new WC_Order( $order_id ); $items = $order->get_items(); foreach ($items as $item) { $downloads = get_item_downloads($item); $downloadURL = $downloads[1]; }
- The topic ‘Get Product Variation Download Url in WC-Order > Get Items foreach loop’ is closed to new replies.