' . esc_html( $title ) . '
'; } if ( $desc !== '' ) { $html .= '' . esc_html( $desc ) . '
'; } $html .= $this->picky_settings_section_integration_strip( $sec_slug, $settings ); $html .= '' . esc_html( $this->picky_integration_url_summary( $url ) ) . ''
: '' . esc_html__( '—', 'pickybooking' ) . '';
} elseif ( 'picky_sec_zapier' === $sec_slug ) {
$on = isset( $settings['zapier_webhook_enabled'] ) && (string) $settings['zapier_webhook_enabled'] === '1';
$url = isset( $settings['zapier_webhook_url'] ) ? trim( (string) $settings['zapier_webhook_url'] ) : '';
if ( ! $on ) {
$state = 'disabled';
$conn = __( 'Webhook disabled', 'pickybooking' );
} elseif ( $url === '' ) {
$state = 'incomplete';
$conn = __( 'Incomplete — add Catch Hook URL below', 'pickybooking' );
} else {
$state = 'ready';
$conn = __( 'Ready to POST after each booking', 'pickybooking' );
}
$hook_val = $url !== ''
? '' . esc_html( $this->picky_integration_url_summary( $url ) ) . ''
: '' . esc_html__( '—', 'pickybooking' ) . '';
} elseif ( 'picky_sec_make' === $sec_slug ) {
$on = isset( $settings['make_webhook_enabled'] ) && (string) $settings['make_webhook_enabled'] === '1';
$url = isset( $settings['make_webhook_url'] ) ? trim( (string) $settings['make_webhook_url'] ) : '';
if ( ! $on ) {
$state = 'disabled';
$conn = __( 'Webhook disabled', 'pickybooking' );
} elseif ( $url === '' ) {
$state = 'incomplete';
$conn = __( 'Incomplete — add Custom webhook URL below', 'pickybooking' );
} else {
$state = 'ready';
$conn = __( 'Ready to POST after each booking', 'pickybooking' );
}
$hook_val = $url !== ''
? '' . esc_html( $this->picky_integration_url_summary( $url ) ) . ''
: '' . esc_html__( '—', 'pickybooking' ) . '';
} elseif ( 'picky_sec_gcal' === $sec_slug ) {
$on = isset( $settings['gcal_enabled'] ) && (string) $settings['gcal_enabled'] === '1';
$json = isset( $settings['gcal_service_account_json'] ) ? trim( (string) $settings['gcal_service_account_json'] ) : '';
$cal = isset( $settings['gcal_calendar_id'] ) ? trim( (string) $settings['gcal_calendar_id'] ) : '';
if ( ! $on ) {
$state = 'disabled';
$conn = __( 'Sync disabled', 'pickybooking' );
} elseif ( $json === '' ) {
$state = 'incomplete';
$conn = __( 'Incomplete — add Service Account JSON key', 'pickybooking' );
} elseif ( $cal === '' ) {
$state = 'incomplete';
$conn = __( 'Incomplete — add Calendar ID', 'pickybooking' );
} else {
$state = 'ready';
$conn = __( 'Ready to sync to Google Calendar', 'pickybooking' );
}
$k_conn = esc_html__( 'Connection', 'pickybooking' );
$k_cal = esc_html__( 'Calendar', 'pickybooking' );
$cal_span = $cal !== ''
? '' . esc_html( $cal === 'primary' ? __( 'Primary calendar', 'pickybooking' ) : $cal ) . ''
: '' . esc_html__( '—', 'pickybooking' ) . '';
return '' . '' . $k_conn . ' ' . '' . esc_html( $conn ) . '' . '' . '' . $k_cal . ' ' . $cal_span . '
'; } else { return ''; } $k_conn = esc_html__( 'Connection', 'pickybooking' ); $k_hook = esc_html__( 'Webhook URL', 'pickybooking' ); return '' . '' . $k_conn . ' ' . '' . esc_html( $conn ) . '' . '' . '' . $k_hook . ' ' . $hook_val . '
'; } /** * Optional brand icon beside integration section titles (`assets/img/brands/{slug}.svg`). * * @param string $brand Alphanumeric key (hubspot, mailchimp, …). * @param int $size Image width/height in pixels. * @return string Safe HTML or empty. */ private function picky_settings_section_brand_img_tag( $brand, $size = 28 ) { $brand = preg_replace( '/[^a-z0-9_-]/', '', strtolower( (string) $brand ) ); $size = max( 16, (int) $size ); if ( $brand === '' ) { return ''; } $basename = 'assets/img/brands/' . $brand . '.svg'; $abs = dirname( __DIR__ ) . '/' . $basename; if ( ! is_readable( $abs ) ) { return ''; } $url = plugins_url( $basename, dirname( __DIR__ ) . '/' . Info::MAIN_FILE ); return '' . '' . esc_html( $desc ) . '
'; } $html .= $this->picky_settings_section_integration_strip( $sec_slug, $settings ); $html .= '' . wp_kses_post( $sec_desc ) . '
'; } $output .= $this->picky_settings_section_integration_strip( $sec_slug, $settings ); $output .= '' . wp_kses_post( (string) $field['description'] ) . '
'; } $output .= ''; $output .= ' '; $output .= '' . esc_html__( 'Generate form copy with AI', 'pickybooking' ) . '
'; if ( ! empty( $field['description'] ) ) { $output .= '' . wp_kses_post( (string) $field['description'] ) . '
'; } $output .= ''; $output .= ''; $output .= '
'; $output .= '' . esc_html( (string) $field_hints[ $slug ] ) . '
'; } $output .= '' . esc_html( (string) $field_hints[ $slug ] ) . '
'; } if(!isset($settings[$slug])){ if(isset($default_options[$slug])){ $settings[$slug] = $default_options[$slug]; } } if ($field['type'] === 'text') { // text $output .= ''; $output .= ''; if($after !== ''){ $output .= ''.esc_html((string)$after).''; } $output .= '
'; } elseif ( $field['type'] === 'password' ) { $output .= ''; $stored = isset( $settings[ $slug ] ) ? (string) $settings[ $slug ] : ''; $default_ph = __( 'Paste secret token/key', 'pickybooking' ); if ( $slug === 'hubspot_access_token' ) { $default_ph = __( 'Paste HubSpot access token', 'pickybooking' ); } elseif ( $slug === 'mailchimp_api_key' ) { $default_ph = __( 'Marketing API key (Profile → Extras → API keys; not Mobile SDK)', 'pickybooking' ); } elseif ( $slug === 'ai_openai_key' ) { $default_ph = __( 'Paste OpenAI API key (sk-…)', 'pickybooking' ); } elseif ( $slug === 'ai_groq_key' ) { $default_ph = __( 'Paste Groq API key (gsk_…)', 'pickybooking' ); } elseif ( strpos( $slug, 'stripe_secret' ) !== false ) { $default_ph = __( 'Paste Stripe Secret key', 'pickybooking' ); } $ph = $stored !== '' ? __( 'Enter a new key/token to replace the stored one', 'pickybooking' ) : $default_ph; $output .= ''; if ( $stored !== '' ) { $output .= '' . esc_html__( 'A token is already saved (hidden). Leave blank to keep it.', 'pickybooking' ) . ''; } if ( $after !== '' ) { $output .= '' . esc_html( (string) $after ) . ''; } $output .= '
'; } elseif ($field['type'] === 'textarea') { // textarea $output .= ''; $output .= ''; if($after !== ''){ $output .= ''.esc_html((string)$after).''; } $output .= '
'; } elseif ($field['type'] === 'number') { // number $output .= ''; $output .= ''; if($after !== ''){ $output .= ''.esc_html((string)$after).''; } $output .= '
'; } elseif ($field['type'] === 'select') { // select $output .= ''; $output .= ''; if($after !== ''){ $output .= '' . esc_html((string)$after) . ''; } $output .= '
'; } else if($field['type'] === 'radio'){ // radio $output .= ''; $output .= ''; $output .= '
'; if ( $has_desc ) { $output .= '' . esc_html__( 'Insufficient permissions.', 'pickybooking' ) . '
'; return; } $order_post = get_post( $order_id ); if ( ! ( $order_post instanceof \WP_Post ) ) { echo '' . esc_html__( 'Order not found.', 'pickybooking' ) . '
'; return; } // Build a Public_Plugin instance on demand so we can reuse its meta-box renderers // without taking a hard dependency on the global plugin loader's instance graph. if ( ! class_exists( __NAMESPACE__ . '\\Public_Plugin' ) ) { require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php'; } $renderer = new Public_Plugin( $this->plugin_slug, $this->version, $this->option_name ); $back_url = $this->picky_order_dashboard_url( 0 ); $saved_flag = picky_request_query_value( 'saved' ) === '1'; $status_now = (string) get_post_status( $order_id ); $status_map = array( 'requests' => __( 'Requested', 'pickybooking' ), 'reserved' => __( 'Reserved', 'pickybooking' ), 'canceled' => __( 'Canceled', 'pickybooking' ), 'draft' => __( 'Draft', 'pickybooking' ), ); $title = get_the_title( $order_id ); if ( $title === '' ) { /* translators: %d: order id */ $title = sprintf( __( 'Order #%d', 'pickybooking' ), $order_id ); } $order_date = (string) get_post_meta( $order_id, '_picky_order_date', true ); $order_time = (string) get_post_meta( $order_id, '_picky_order_time', true ); $order_count = (int) get_post_meta( $order_id, '_picky_order_item_count', true ); ?> 400 ) ); } if ( ! current_user_can( 'edit_post', $order_id ) ) { wp_die( esc_html__( 'Insufficient permissions.', 'pickybooking' ), '', array( 'response' => 403 ) ); } // Re-use existing public-class save handler so any meta sanitization stays in one place. if ( ! class_exists( __NAMESPACE__ . '\\Public_Plugin' ) ) { require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php'; } $renderer = new Public_Plugin( $this->plugin_slug, $this->version, $this->option_name ); $renderer->save_order_metadata( $order_id ); // Status cascade: parent + every child picky_booking gets the same post_status so the // dashboard never shows "1 reserved / 2 requests" mismatches inside one order. $valid_statuses = array( 'draft', 'picky_requests', 'picky_reserved', 'picky_canceled', 'requests', 'reserved', 'canceled' ); $new_status = isset( $_POST['post_status'] ) && is_scalar( $_POST['post_status'] ) ? sanitize_key( wp_unslash( (string) $_POST['post_status'] ) ) : ''; if ( in_array( $new_status, $valid_statuses, true ) && $new_status !== get_post_status( $order_id ) ) { wp_update_post( array( 'ID' => $order_id, 'post_status' => $new_status, ) ); $children = get_posts( array( 'post_type' => 'picky_booking', 'post_status' => 'any', 'numberposts' => -1, 'fields' => 'ids', 'meta_query' => array( array( 'key' => '_picky_booking_order_id', 'value' => $order_id, 'compare' => '=', ), ), ) ); foreach ( $children as $cid ) { wp_update_post( array( 'ID' => (int) $cid, 'post_status' => $new_status, ) ); } } wp_safe_redirect( $this->picky_order_dashboard_url( $order_id, array( 'saved' => '1' ) ) ); exit; // phpcs:enable WordPress.DB.SlowDBQuery.slow_db_query_meta_query } /** * Dashboard URL for the calendar tab (tab 8), optionally opening a single booking editor. * * @param int $booking_id Booking post ID, or 0 for the calendar only. * @param array $extra Extra query args (e.g. saved=1). * @return string */ public function picky_booking_dashboard_url( $booking_id = 0, $extra = array() ) { $args = array( 'page' => 'picky_settings', 'picky-tab' => '8', ); $booking_id = absint( $booking_id ); if ( $booking_id > 0 ) { $args['booking_id'] = $booking_id; } if ( is_array( $extra ) ) { foreach ( $extra as $k => $v ) { if ( $v === null || $v === '' ) { continue; } $args[ (string) $k ] = $v; } } $url = admin_url( add_query_arg( $args, 'admin.php' ) ); if ( $booking_id > 0 ) { $url = wp_nonce_url( $url, 'picky_open_booking' ); } return $url; } /** * Filter `get_edit_post_link` for picky_booking so list/calendar links stay inside the dashboard. * * @param string $url URL WP built for the post. * @param int $post_id Post ID being linked. * @param string $context Context ('display'|'raw'). * @return string */ public function picky_booking_filter_edit_post_link( $url, $post_id, $context = 'display' ) { unset( $context ); if ( ! $post_id ) { return $url; } if ( get_post_type( (int) $post_id ) !== 'picky_booking' ) { return $url; } return $this->picky_booking_dashboard_url( (int) $post_id ); } /** * Intercept native WP "Edit" requests for picky_booking: redirect to the embedded calendar editor. */ public function redirect_edit_booking() { $action = sanitize_key( picky_request_query_value( 'action' ) ); if ( $action !== 'edit' ) { return; } $nonce = picky_request_query_value( '_wpnonce' ); if ( $nonce === '' || ! wp_verify_nonce( $nonce, 'picky_edit_picky_booking' ) ) { return; } $post_id = absint( picky_request_query_value( 'post' ) ); if ( get_post_type( $post_id ) !== 'picky_booking' ) { return; } if ( ! current_user_can( 'edit_post', $post_id ) ) { wp_die( esc_html__( 'Insufficient permissions.', 'pickybooking' ) ); } wp_safe_redirect( $this->picky_booking_dashboard_url( (int) $post_id ) ); exit; } /** * Render the embedded booking-edit screen inside the Calendar tab. * * @param int $booking_id picky_booking post ID. * @return void */ private function picky_render_booking_edit_embedded( $booking_id ) { // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Read-only admin GET for UI $booking_id = absint( $booking_id ); if ( $booking_id <= 0 || get_post_type( $booking_id ) !== 'picky_booking' ) { return; } if ( ! current_user_can( 'edit_post', $booking_id ) ) { echo '' . esc_html__( 'Insufficient permissions.', 'pickybooking' ) . '
'; return; } $booking_post = get_post( $booking_id ); if ( ! ( $booking_post instanceof \WP_Post ) ) { echo '' . esc_html__( 'Reservation not found.', 'pickybooking' ) . '
'; return; } if ( current_user_can( 'manage_options' ) && isset( $_GET['_wpnonce'] ) && is_scalar( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( (string) $_GET['_wpnonce'] ) ), 'picky_open_booking' ) ) { update_post_meta( $booking_id, '_picky_admin_seen', '1' ); } if ( ! class_exists( __NAMESPACE__ . '\\Public_Plugin' ) ) { require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php'; } $renderer = new Public_Plugin( $this->plugin_slug, $this->version, $this->option_name ); $back_url = $this->picky_booking_dashboard_url( 0 ); $saved_flag = picky_request_query_value( 'saved' ) === '1'; $status_now = (string) get_post_status( $booking_id ); $status_map = array( 'requests' => __( 'Requested', 'pickybooking' ), 'reserved' => __( 'Reserved', 'pickybooking' ), 'canceled' => __( 'Canceled', 'pickybooking' ), 'draft' => __( 'Draft', 'pickybooking' ), ); $title = get_the_title( $booking_id ); if ( $title === '' ) { /* translators: %d: booking id */ $title = sprintf( __( 'Reservation #%d', 'pickybooking' ), $booking_id ); } $table_id = (string) get_post_meta( $booking_id, '_picky_booking_id', true ); $date = (string) get_post_meta( $booking_id, '_picky_booking_date', true ); $time = (string) get_post_meta( $booking_id, '_picky_booking_time', true ); $people = (string) get_post_meta( $booking_id, '_picky_booking_people', true ); $layout_id = (int) get_post_meta( $booking_id, '_picky_reservation_layout_id', true ); $order_id = (int) get_post_meta( $booking_id, '_picky_booking_order_id', true ); /* translators: %s: configurable item name singular (e.g. Table, Room, Court) */ $details_title = sprintf( __( '%s Reservation Details', 'pickybooking' ), $renderer->picky_item_label() ); ?> 400 ) ); } if ( ! current_user_can( 'edit_post', $booking_id ) ) { wp_die( esc_html__( 'Insufficient permissions.', 'pickybooking' ), '', array( 'response' => 403 ) ); } if ( ! class_exists( __NAMESPACE__ . '\\Public_Plugin' ) ) { require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php'; } $renderer = new Public_Plugin( $this->plugin_slug, $this->version, $this->option_name ); $renderer->save_metadata( $booking_id ); $valid_statuses = array( 'draft', 'picky_requests', 'picky_reserved', 'picky_canceled', 'requests', 'reserved', 'canceled' ); $new_status = isset( $_POST['post_status'] ) && is_scalar( $_POST['post_status'] ) ? sanitize_key( wp_unslash( (string) $_POST['post_status'] ) ) : ''; if ( in_array( $new_status, $valid_statuses, true ) && $new_status !== get_post_status( $booking_id ) ) { wp_update_post( array( 'ID' => $booking_id, 'post_status' => $new_status, ) ); } if ( isset( $_POST['picky_payment_status'] ) && is_scalar( $_POST['picky_payment_status'] ) ) { $this->picky_update_booking_payment_status( $booking_id, sanitize_key( wp_unslash( (string) $_POST['picky_payment_status'] ) ) ); } wp_safe_redirect( $this->picky_booking_dashboard_url( $booking_id, array( 'saved' => '1' ) ) ); exit; } /** * Valid custom post statuses for bookings and orders. * * @return string[] */ private function picky_reservation_status_keys() { return array( 'draft', 'picky_requests', 'picky_reserved', 'picky_canceled', 'requests', 'reserved', 'canceled' ); } /** * Human-readable labels for reservation statuses. * * @return array' . esc_html__( 'Insufficient permissions.', 'pickybooking' ) . '
'; return; } $backup_get = $this->picky_sanitize_input_array( picky_request_query_bag() ); $backup_request = $backup_get; $backup_uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( (string) $_SERVER['REQUEST_URI'] ) ) : ''; /* * Sandbox GET/REQUEST + REQUEST_URI for this embedded list before prepare_items(). * WP_Posts_List_Table::prepare_items() calls wp_edit_posts_query(), which reads $_GET. * If the loaded URL was another tab (e.g. Calendar picky-tab=8), leaving $_GET untouched * breaks paging/totals vs pagination links (built later from REQUEST_URI). */ $embed_query = $backup_get; $embed_query['page'] = 'picky_settings'; $embed_query['post_type'] = $post_type; $embed_query['picky-tab'] = (string) $picky_tab; $strip_embed_noise = array( 'view', 'mode', 'saved_view', 'date', 'layout_id', 'order_id', 'saved', 'table_id', 'sort_by', 'density', 'status' ); foreach ( $strip_embed_noise as $noise_key ) { unset( $embed_query[ $noise_key ] ); } /* * Inactive tab panels are pre-rendered server-side for instant SPA tab switching. * Their list query MUST NOT inherit the active tab's paged/s/orderby — `WP_List_Table::set_pagination_args()` * does `wp_redirect( add_query_arg('paged', $total_pages) )` whenever requested `paged` exceeds this tab's * total pages, hijacking the user away from (e.g.) Reservations page 2 to Layouts page 1. * Active tab keeps the URL state; inactive tabs reset to "page 1, no filters". */ $active_tab_for_embed = $this->picky_request_picky_tab_value(); if ( $active_tab_for_embed === '' ) { $active_tab_for_embed = '13'; } // Tab 7 (Reservations) folded into tab 13 (Bookings/Orders). if ( $active_tab_for_embed === '7' ) { $active_tab_for_embed = '13'; } if ( $active_tab_for_embed !== (string) $picky_tab ) { $reset_for_inactive = array( 'paged', 's', 'orderby', 'order', 'm', 'cat', 'post_status' ); foreach ( $reset_for_inactive as $reset_key ) { unset( $embed_query[ $reset_key ] ); } } $GLOBALS['_GET'] = $embed_query; foreach ( $strip_embed_noise as $noise_key ) { unset( $GLOBALS['_REQUEST'][ $noise_key ] ); } if ( $active_tab_for_embed !== (string) $picky_tab ) { // Same reset list as $reset_for_inactive above — get_pagenum() reads the request paged value. foreach ( array( 'paged', 's', 'orderby', 'order', 'm', 'cat', 'post_status' ) as $reset_key ) { unset( $GLOBALS['_REQUEST'][ $reset_key ] ); } } foreach ( $embed_query as $gk => $gv ) { $GLOBALS['_REQUEST'][ $gk ] = $gv; } $built_embed = add_query_arg( $embed_query, admin_url( 'admin.php' ) ); $built_embed = $this->picky_normalize_admin_url_query( $built_embed ); $parsed_b = wp_parse_url( $built_embed ); $embed_path = ( is_array( $parsed_b ) && isset( $parsed_b['path'] ) && is_string( $parsed_b['path'] ) && $parsed_b['path'] !== '' ) ? $parsed_b['path'] : ( wp_parse_url( admin_url( 'admin.php' ), PHP_URL_PATH ) ?: '/wp-admin/admin.php' ); $embed_q = ( is_array( $parsed_b ) && isset( $parsed_b['query'] ) && is_string( $parsed_b['query'] ) ) ? $parsed_b['query'] : ''; $_SERVER['REQUEST_URI'] = $embed_path . ( $embed_q !== '' ? '?' . $embed_q : '' ); $prev_screen = get_current_screen(); global $typenow; $prev_typenow = isset( $typenow ) ? $typenow : ''; $typenow = $post_type; set_current_screen( 'edit-' . $post_type ); $picky_embed_list_root_class = 'picky-embedded-posts-list'; if ( $post_type === 'picky_layout' ) { $picky_embed_list_root_class .= ' picky-embedded-posts-list--picky-layout picky-reservations-custom picky-root picky-reservations-wrap picky-reservations-wrap--embedded'; } elseif ( $post_type === 'picky_booking' ) { $picky_embed_list_root_class .= ' picky-reservations-custom picky-root picky-reservations-wrap picky-reservations-wrap--embedded'; } elseif ( $post_type === 'picky_order' ) { $picky_embed_list_root_class .= ' picky-embedded-posts-list--picky-order picky-reservations-custom picky-root picky-reservations-wrap picky-reservations-wrap--embedded'; } echo ''; $_SERVER['REQUEST_URI'] = $backup_uri; $GLOBALS['_GET'] = $backup_get; $GLOBALS['_REQUEST'] = $backup_request; $typenow = $prev_typenow; if ( $prev_screen instanceof \WP_Screen ) { set_current_screen( $prev_screen ); } return; } if ( $post_type === 'picky_layout' ) { require_once ABSPATH . 'wp-admin/includes/class-wp-posts-list-table.php'; require_once __DIR__ . '/class-picky-embedded-posts-list-table.php'; require_once __DIR__ . '/class-picky-reservations-list-facade.php'; $picky_facade = new Picky_Reservations_List_Facade( array( 'screen' => get_current_screen() ) ); $picky_facade->set_picky_embed_base_url( $built_embed ); $picky_facade->set_picky_embed_canonical_query( $embed_query ); $picky_facade->set_picky_embed_admin( $this ); $picky_facade->prepare_items(); global $wp_query; $picky_posts = ( isset( $wp_query->posts ) && is_array( $wp_query->posts ) ) ? $wp_query->posts : array(); /** @var array'; echo esc_html__( 'This is your weekly availability model (per weekday + optional split shift). It is not the per-reservation length — that is covered by “Default booking duration / buffer” above.', 'pickybooking' ); echo '
'; echo '| ' . esc_html__( 'Day', 'pickybooking' ) . ' | '; echo '' . esc_html__( 'Status', 'pickybooking' ) . ' | '; echo '' . esc_html__( 'Window 1', 'pickybooking' ) . ' | '; echo '' . esc_html__( 'Split', 'pickybooking' ) . ' | '; echo '' . esc_html__( 'Window 2', 'pickybooking' ) . ' | '; echo '
|---|---|---|---|---|
| ' . esc_html( (string) $label ) . ' | '; echo '' . esc_html( (string) $enabled ) . ' | '; echo '' . esc_html( (string) $w1 ) . ' | ';
echo '' . esc_html( (string) $more ) . ' | '; echo '' . esc_html( (string) $w2 ) . ' | ';
echo '
| = 5 ) { $heat = 'picky-heat-3'; } elseif ( $lane_count >= 3 ) { $heat = 'picky-heat-2'; } elseif ( $lane_count >= 1 ) { $heat = 'picky-heat-1'; } ?> | 0 ) : ?> picky_calendar_card_icon_key( (string) ( $lead['status'] ?? '' ), $lane_payment ); ?> 1 ) : ?> |