Tag: woocommerce

  • Add delivery date and time for woocommerce

    Add delivery date and time for woocommerce

    /** * Add the field to the checkout * */ add_action(‘woocommerce_after_checkout_billing_form’, ‘my_custom_checkout_field’); function my_custom_checkout_field($checkout) { echo ” . __(‘Prefered delivery time’, ‘woothemes’) . ”; $tomorrow = date(‘Y-m-d’, strtotime(the_date(‘Y-m-d’, ”,”, FALSE) .’ +1 day’)); $after_tomorrow = date(‘Y-m-d’, strtotime(the_date(‘Y-m-d’, ”,”, FALSE) .’ +2 day’)); $_3day_now = date(‘Y-m-d’, strtotime(the_date(‘Y-m-d’,”,”, FALSE) .’ +3 day’)); echo ”; woocommerce_form_field(‘prefered_delivery_date’, array( ‘type’…