I'm using CT. When a customer checks out they are required to select a location for where they want to pickup their order. I would like to save both the location's ID and the location's pickup date to custom fields that I'v set on the orders channel. Currently, when a customer selects a location from the select menu the location ID is submitted along with the form. I've written an extension that looks for the cartthrob_on_authorize hook. It allows me to get the location ID from the custom field and run a query to get the location date. My question is, how do I save the location date to the order through my extension? I've tired various combinations like this:
"ee()->cartthrob->cart->order->set_custom_data('order_pickup_date', $pickup_date)"
but nothing like that seems to work. Any help is much appreciated. Thanks!