FavoriteLoadingAdd to favorites
add_action('woocommerce_checkout_update_order_meta',function( $order_id, $posted ) {
    $order = wc_get_order( $order_id );
    $order->update_meta_data( 'selected_date', $_COOKIE['selected_date'] );
    $order->save();
} , 10, 2);

On Checkout the Custom fields will get added.

Pin It on Pinterest

Share This