skip to Main Content

Using WooCommerce Bookings – I am trying to modify the booking status label which appears on customer-facing front-end views and in customer emails. When a reservation is booked, in the booking summary it displays a status label of “Paid”, but since I am using this to book free reservations I don’t want it to say “Paid” anywhere because that will confuse customers. I’m trying to get it to say “Booked” instead. Literally all I care about is the text that appears, I’m not trying to modify any status in the actual booking or order.

I would hide the element with CSS, but that same html element is used to display a “Cancelled” label if the customer cancel the booking, and I don’t want that hidden. Also hiding it in CSS would not prevent “Paid” from appearing in the customer booking confirmation emails.

In /order/booking-display.php I located this code where the status is being displayed:

echo esc_html( wc_bookings_get_status_label( $booking->get_status() ) );

I assume this is relevant, but I’m a designer & marketer, not a developer, so this is over my head. I have been searching everywhere for a way to do this, but can’t figure this out. Thanks in advance for your help!

2

Answers


  1. Chosen as BEST ANSWER

    Right after I posted this question I realized... why don't I just use conditional statements to check the booking status and display different markup depending on the status? So I did that and it worked like a charm. I'll update this answer with the code in the morning.


  2. WooCommerce normally doesn’t allow you to change the core order statuses which are Paid, Cancelled, On Hold. However, if you are looking for a paid solution, there’s an extension provided by WooCommerce which allows you to do so. You may wanna check this out:
    https://woocommerce.com/products/woocommerce-order-status-manager/

    Hope this helps you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search