• Resolved akberovr

    (@akberovr)


    I am trying to customize my WooCommerce checkout page. I have two shipping methods (express and standard) and in fields section I’ve also added delivery time select options in which I want to make changes according to the shipping method selected by user. By default my delivery time input select box have 2 options.
    I want to decrease time interval from 3 hours to 1 hour if Express shipping method is selected.

        function custom_override_checkout_fields( $fields ) {
    
                 switch( date("h:00" ) ){
                            case  date("h:00" ) != "19:00":
                        $fields['billing']['billing_time']['options'] = array(
                                'option_1' => date("h:00" ). " - " .date("h:00",strtotime('+3 hours')),
                                'option_2' => date("h:00",strtotime('+3 hours')). " - " .date("h:00",strtotime('+6 hours'))
                        );
                            break;
                    }
                         return $fields;
                }
    • This topic was modified 5 years, 8 months ago by akberovr.
    • This topic was modified 5 years, 8 months ago by akberovr.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Change Select box value if checkbox is checked WordPress WooCommerce’ is closed to new replies.