Need values in cart page
-
Thanks for the awesome plugin. I want to retrieve fields on cart page like normal custom field. Example code :
foreach ( WC()->cart->get_cart() as $cart_item ) { $deliveryDays[] = get_post_meta( $cart_item['variation_id'], 'custom_field', true); }
I tried
get_post_meta($cart_item['variation_id'], 'delivery_week', true);
Where delivery week is the name of custom field.
I see you have a hook when order is placed
wc_get_order_item_meta($orderID, 'delivery_week', $single = true );
Do we have something similar so I can get the value when looping through the cart in the cart page?
Thanks in advance.
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Need values in cart page’ is closed to new replies.