Display an estimated delivery date range based on WooCommerce cart item stock
问题 I am trying to output an estimated delivery date in the cart based on the stock status of the products in the cart. I was a little bit successful but now I am stuck. This is what I have written so far. It goes in the function.php function lieferzeit() { global $woocommerce; $cart_items = $woocommerce->cart->get_cart(); foreach ($cart_items as $variation) { $variation_id = $variation['variation_id']; $variation_obj = new WC_Product_variation($variation_id); $stock = $variation_obj->get_stock