• Resolved Simo2606

    (@simo2606)


    Hello!

    We added some custom fields to checkout, that are required, but when the user pay by Apple Pay or Google Pay, they are ignored and not filled out by user.

    We use this code to validate the fields:

    // Validate delivery date and time fields
    add_action('woocommerce_checkout_process', 'cwpai_validate_delivery_date_time_fields');
    function cwpai_validate_delivery_date_time_fields()
    {
    if (isset($_POST['cwpai_delivery_date']) && empty($_POST['cwpai_delivery_date'])) {
    wc_add_notice(('Please select a date, 'codewp'), 'error'); } if (isset($_POST['cwpai_delivery_time']) && empty($_POST['cwpai_delivery_time']) && empty($_POST['cwpai_specific_delivery_time'])) { wc_add_notice(('Please select an hour.', 'codewp'), 'error');
    }
    }

    Is there something we are missing?

    Thank you,

    Simona

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.