I'm trying to use the hook "" but it doesn't change the price for me and I echo the first few tests to modify it based on the number of reservations and the other one as I test myself and why I'm not ordered to correctly call the properties of the reservations
function apply_discount_after_eight_bookings($price, $booking) { // Obtén el ID del cliente de la reserva $customerId = $booking->getCustomerId();
// Calcula cuántas reservas ha realizado el cliente $reservationsCount = calculate_reservations_count($customerId);
// Si el cliente tiene exactamente 8 reservas, aplica un descuento if ($reservationsCount === 8) { // Aplica un 50% de descuento $price *= 0.5; }
We just got the feedback from our colleagues and they have told us the hook amelia_modify_payment_amount only modifies the amount of the payment in the database. It does not change the price shown on the form.
Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.
We wish you all the best and hope you have a wonderful day ahead.
Sorry for the question but this description that you mention to me according to the wpamelia documentation corresponds more with the hook "amelia_before_payment: Users can change the payment data before it is saved in the database." and the hook I'm asking about responds to the following description "amelia_modify_payment_amount Used to change the final calculated price for booking."
We just got the feedback from our colleagues and they have told us to ask you if you can please explain in more detail what you are trying to accomplish.
The filter you mentioned does not affect the front-end form, as shown in the screenshot you provided. Additionally, could you clarify the purpose of the 'calculate_reservations_count' function?
We are currently in the process of adding JavaScript hooks for the next update, allowing you to apply coupons based on specific customer parameters before the payment step. If this is what you are referring to, please note that this feature will be available only on new forms, as the screenshot you provided displays the old booking form.
I'm trying to use the hook "" but it doesn't change the price for me and I echo the first few tests to modify it based on the number of reservations and the other one as I test myself and why I'm not ordered to correctly call the properties of the reservations
function apply_discount_after_eight_bookings($price, $booking) {
// Obtén el ID del cliente de la reserva
$customerId = $booking->getCustomerId();
// Calcula cuántas reservas ha realizado el cliente
$reservationsCount = calculate_reservations_count($customerId);
// Si el cliente tiene exactamente 8 reservas, aplica un descuento
if ($reservationsCount === 8) {
// Aplica un 50% de descuento
$price *= 0.5;
}
return $price;
}
add_filter('amelia_modify_payment_amount', 'apply_discount_after_eight_bookings', 10, 2);
This is the test and in the same way I don't make any changes
function custom_discount_on_eight_bookings( $price, $booking ) {
$price = $price * 0.5;
return $price;
}
add_filter( 'amelia_modify_payment_amount', 'custom_discount_on_eight_bookings', 10, 2 );
Attached files: Captura de pantalla 2024-01-24 171059.png
Hello Francisco,
We have forwarded your ticket to our level 2 agents and as soon as we get some feedback from them we will contact you immediately.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Francisco,
We just got the feedback from our colleagues and they have told us the hook amelia_modify_payment_amount only modifies the amount of the payment in the database. It does not change the price shown on the form.
Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.
We wish you all the best and hope you have a wonderful day ahead.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Sorry for the question but this description that you mention to me according to the wpamelia documentation corresponds more with the hook "amelia_before_payment: Users can change the payment data before it is saved in the database." and the hook I'm asking about responds to the following description "amelia_modify_payment_amount Used to change the final calculated price for booking."
Hello Francisco,
We have forwarded your ticket to our level 2 agents again and as soon as we get some feedback from them we will contact you immediately.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Francisco,
We just got the feedback from our colleagues and they have told us to ask you if you can please explain in more detail what you are trying to accomplish.
The filter you mentioned does not affect the front-end form, as shown in the screenshot you provided. Additionally, could you clarify the purpose of the 'calculate_reservations_count' function?
We are currently in the process of adding JavaScript hooks for the next update, allowing you to apply coupons based on specific customer parameters before the payment step. If this is what you are referring to, please note that this feature will be available only on new forms, as the screenshot you provided displays the old booking form.
Looking forward to your reply.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables