Come risolvere il problema del conflitto di date di YITH WOOCOMMERCE CHECKOUT MANAGER.

Aggiungete questo codice al file functions.php del vostro tema, alla fine del file. Il file si trova anche in Aspetto > Editor > Funzioni del tema (functions.php).

add_filter( 'woocommerce_billing_fields', 'bp_add_preorder_date_field_in_checkout',100 );

if( !function_exists( 'bp_add_preorder_date_field_in_checkout' ) ){
    function bp_add_preorder_date_field_in_checkout( $fields ){
        if ( 'no' === get_option( 'wc_preorders_always_choose_date' ) ) {
            $class = ['disabled-input', 'form-row-wide'];
        } else {
            $class = ['form-row-wide'];
        }
       
        $fields['preorder_date'] = [
            'label'             => __( 'Pre order Date', 'preorders-for-woocommerce-pro' ),
            'type'              => 'text',
            'class'             => $class,
            'description'       => __( 'Please enter the date when you want to receive your order', 'preorders-for-woocommerce-pro' ),
            // 'input_class'   => 'datepicker',
            'priority'          => 35,
            'required'          => true,
            'default'           => apply_filters( 'preorder_oldest_date', null ),
            'custom_attributes' => ['data-pre_order_date' => apply_filters( 'preorder_oldest_date', '' )],
        ];
        return $fields;
    }
}

Preordini per Woocommerce