3

I am developing plugins extending Woocommerce.

This plugins is for trip booking.

My objective is to get the customer information such as his arrival at airport and his next flight time, and show it during the checkout.

I know it can be added to the booking after checkout, but I need to show it somewhere before the checkout. Is there any Cart property i can use to store that information? I can't see anything suitable as per Class WC_Cart documentation.

  • 5
    I don't think this is a duplicate and it is a valid question. The main thing that was overlooked is that all the answers refer to the ORDER or PRODUCT within the Cart. However, Ashraf is asking about the CART as a whole prior to the Order being created. – ggedde Oct 26 '19 at 22:13
  • 3
    Ok I just found this: WC()->session->set( 'foo', 'some-data' ); WC()->session->get( 'foo' ); – ggedde Oct 26 '19 at 22:20
  • 2
    I agree with @ggedde; this isn't a duplicate. None of those linked questions answer this question about adding metadata to the cart object. – Dane Rossenrode Jun 15 '20 at 10:00
  • This question should be reopen – nyconing Sep 27 '22 at 08:06

0 Answers0