WPIntell

Source evidence

Add custom fields to the checkout

BA Book Everything · support · 2025-06-18T20:22:00+00:00

complaintsentiment
highseverity
0.91relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 29 rows with source links

20.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

23 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
petrfid unresolved
Hi, I need to add a field to checkout contact informations. I tried to add the code to the functions.php file according to the documentation ( https://ba-booking.com/ba-book-everything/documentation/customization/add-custom-fields-to-the-checkout/ ). My code: add_filter('babe_checkout_args', 'customtheme_babe_checkout_args', 10, 2); /** * Add checkout text field */ function customtheme_babe_checkout_args( $args_meta, $args ) { $args_meta['pickup'] = $args['meta']['pickup'] ?? ''; return $args_meta; } //////// add_filter('babe_checkout_field_label', 'customtheme_babe_checkout_field_label', 10, 2); /** * Add checkout field title */ function customtheme_babe_checkout_field_label( $field_title, $field_name ) { if ($field_name === 'pickup'){ $field_title = __('Pick up location', 'textdomain'); } return $field_title; } //////// add_filter('babe_checkout_field_required', 'customtheme_babe_checkout_field_required', 10, 2); /** * Required tag for checkout field. Use it only if you need to make field required */ function customtheme_babe_checkout_field_required($required_tag, $field_name){ if ($field_name === 'new_field'){ $required_tag = 'required="required"'; } return $required_tag; } /////////////////// add_filter('babe_sanitize_checkout_vars', 'customtheme_sanitize_checkout_vars', 10, 2); /** * Add fields to sanitize checkout vars method */ function customtheme_sanitize_checkout_vars( $output, $arr ) { $output['pickup'] = isset($arr['pickup']) ? sanitize_text_field($arr['pickup']) : ''; return $output; } But – nothing. Can you please advise me? The page I need help with: [ log in to see the link]

Comments

0 shown

No comments were stored for this source.