bookingactivities/booking-activities

Phone number required

Closed this issue · 2 comments

Describe the bug
Despite having configured the phone field as required, in the frontend the user can create a reservation without indicating the phone number.

To Reproduce

  • Just installed:
    -- Booking Activities
    -- Booking Activities - Display Pack
    -- Booking Activities - Licenses & Updates
    -- Booking Activities - Prices & Credits

  • Create a new Booking form.

  • In User Data section, click the gear icon, click on Show advanced options.

  • Set the Phone number field as required.

Screenshots

Captura de pantalla 2022-08-29 111530

Captura de pantalla 2022-08-29 111711

Expected behavior
It should set the field as required.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Booking Activities, its add-ons, and WooCommerce are activated.
  • This bug happens with the default WordPress theme Twenty Seventeen.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment
Wordpress: 6.0.1
PHP: 7.4.30
MySQL: 5.5.5
Booking Activities: 1.14.3
Display Pack: 1.4.24
Prices and Credits: 1.7.7

Thank you, on your screenshot, I can see that the booking were made with WooCommerce.
With WooCommerce, the User Data field is not used. There used to be a feedback to inform about it but it seems to have disappeared since 1.14, I'll fix it in the next release.
Capture

You need to get the phone number with WooCommerce on the checkout page.
By default, the phone number is required on the checkout page, so if it is not required on your site, it may be due to a third party plugin / theme.
checkout

(Otherwise, maybe this custom code can help).

Right! It was a third party plugin we used to hide some fields, as we thought that entering the phone number in the reservation field it was already saved, regardless of whether the reservation was made with WooCommerce or not.