79115310

Date: 2024-10-22 18:15:37
Score: 0.5
Natty:
Report link

I found a solution that works, using another hook (instead of gettext).

`add_filter('woocommerce_bookings_calculated_booking_cost_error_output', 'modify_booking_cost_error_outout', 999, 3); function modify_booking_cost_error_outout( $message, $cost, $product) { $error_message = $cost->get_error_message(); if ($error_message == 'Date is required - please choose one above' && has_term( 'Teaterkurser', 'product_cat', $product->get_id() )) { $message = 'Datum väljs - vänta lite...'; }

return $message;

}`

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Erik Almén