Add a custom select box to the WooCommerce checkout page

Reader Interactions

Comments

  1. Alexander says

    Thank you for tutorial.

    Tell me how to display field value as «In the afternoon» but not «afternoon».

    This part of code not work good?
    ‘options’ => array(
    ‘blank’ => __( ‘Select a day part’, ‘wps’ ),
    ‘morning’ => __( ‘In the morning’, ‘wps’ ),
    ‘afternoon’ => __( ‘In the afternoon’, ‘wps’ ),
    ‘evening’ => __( ‘In the evening’, ‘wps’ )
    )

    P.S. I`m not a programmer and i can`t understand how to make it.

    • Frank Schrijvers says

      The code in the example already shows the field value with ‘in the afternoon’ and should work fine. Only in the backend you see under the delivery option afternoon.

  2. satria says

    Hi Frank, thanks for tutorial. How to know user choice delivery in the admin panel if admin must approve? *sorry my bad english

  3. Gareth says

    This is great, thank you. Is there a way of getting the selected option to show up in the WooCommerce reports so we can view orders by what they have selected?

  4. kenza Filali says

    great tutorial ..i just have this problem after pasing the order neither the client nor the admin can see the delivery time chosen ……in the local site it works but on my online website it doesn;t work …can you sugest any solution ? thank you

    • Frank Schrijvers says

      If it works on your local site and not on your production environment you should first ask yourself what the differences are? Second I should activate wp_debug on your production environment.

  5. kenza Filali says

    great tutorial everythig works i just have the issue the delivery time doesn’t appear after passing the order neither for the admin nor for the client …will you give me any advice ……..and i’ll bethankful

  6. Balapiiine says

    hi, thx for your tutorial.
    Can you say me how to match my custom select field to the country field of billing ? They do not appear in the same way

  7. ROSA ESTE says

    super clear the explanation … but how can I create a 2nd field according to the option chosen in this select?

  8. Mohsen M. Amrei says

    Hello Frank,
    Thanks a lot, man, it is great. People are selling these codes as plugins for 100$.
    Q: what if I wanted to add a date selection instead?