Hey everyone!
With the Labour Day holidays coming up, we’d like to let you know about our upcoming working hours:
Thursday, May 1st: Our team will be off during Labour Day.
Friday, May 2nd: We'll also be off for an extended holiday break.
We’ll be back on Monday, May 5th, ready to respond to all messages received during this time.
In the meantime, if you need help, feel free to:
-
Use the support widget on the bottom right of our websites (Amelia and wpDataTables) — our AI-powered assistant is available 24/7 and can help with many common questions.
-
Visit our documentation, articles, or YouTube channels for quick answers and step-by-step guides.
https://www.youtube.com/@AmeliaWordPressBookingPlugin/videos
https://www.youtube.com/@wpDataTables/videos
Thank you for being so understanding, and we hope you enjoy the long weekend!
Hello,
When A user For the first time, tried to book then, we have added customer id in the note field of customer menu of Amelia in admin area and for notification we have setup the text of mail and we have added %customer_note% in mail but for the first time that note field value is not being displaying or display empty and we added the customer id by using below code:
function amelia_booking_added_hook($reservation, $bookings, $container) {
global $wpdb;
$id = $bookings[0][‘customerId’]; //1000
$customerNote = $wpdb->get_var(
“SELECT note FROM wp_amelia_users WHERE id = $id”
) ?: ”;
$customerWpId = $wpdb->get_var(
“SELECT externalId FROM wp_amelia_users WHERE id = $id”
);
$userId1000 = get_user_meta( intval($customerWpId), ‘user_id_1000’, true);
$nowDateTime = new DateTime(‘now’);
//if (empty($customerNote)) {
$customerNote = $userId1000 . PHP_EOL;
//}
$wpdb->update(‘wp_amelia_users’, [‘note’ => $customerNote], [‘id’ => $id]);
}
add_action(‘AmeliaBookingAdded’, ‘amelia_booking_added_hook’, 10, 3);
we have attached that note field value by using %customer_note% short code code in mail setup or notification setup but for the first time if user or customer book then in mail note field value is not coming or is not displaying
Hi, Ajay!
Sorry for the delayed response.
Where do you get the Customer note from? Could you please describe the process of first booking and note creation briefly? Step by step.
Best regards.