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!
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.
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.
Related
I want to include a 'check my order status' link in the thank you email. Woocommerce comes with a order tracking form, but the user has to input their order id and email. Is there a way to show the tracking page without going through the input form?
I know my accounts has a view order link, but that would only work if the user is registered.
Yes, you can show an order tracking link in your email. It is a bit convoluted way and will take some time. It is much easier to let the user input his information. This makes things a lot less complicated. But if you absolutely need the order tracking in the email, then,
Put this information somewhere other than your secured site,
Make sure you update this information regularly,
Take the ID of
this information from your database and make a GET endpoint(hoping
its a web application), such that it takes in the ID number of the
information and displays it,
This GET link needs to be embedded
into a HTML form/template which you are sending as the email
If you want the whole implementation, you need to specify the tech stack you are using and other details.
If you want to show one tracking page which page customers/users can search their order status without login, then you can use the plugin Order Tracker for WooCommerce
If you use the plugin then the user can check his/her order status without login/hassle free, and also you don't need to add any extra tracking number, user can search using their order ID and phone number.
you can use it the very easy way, like making a page template or using the [cbwct-order-tracker] shortcode, anytime anywhere, and it’s also working with ajax.
You can watch the video for the plugin documentation on how to use that plugin here is the
Video Tutorial
Here is what I am trying to do - a website with online courses using WooCommerce and Elementor. I want to have a page called "My Courses" where customers can see only the courses they've purchased.
I'm not using any LMS.
I will use the plugin Dynamic Conditions for Elementor to show or hide a widget.
I know that WooCommerce has a function to check if a user has bought a specific product.
I don't know how to make a connection between the two, though. That is my problem.
Dynamic Conditions uses Elementor's dynamic tags system to check against. How can I use the WC's function to check if the user bought the product and only if he/she did, then to show them the widget with the course page?
Thanks a lot for any answers with ideas or directions on how to solve this problem!
Using Dynamic.ooo you can benefit from "Visibility" extention (comes with Dynamic.ooo/ don't need seperate plugin installation) which allows you write your customized conditions (in PHP). I myself have not used the "Custom Condition" becuase I don't know much about PHP, but if you know the function and just need to connect them i think that'll do.
This might be off topic question but I would like to ask it anyway to the developers out there.
Is there a plugin or whatever, that can enable automatic single use coupon code delivery to a user on wordpress/page?
Basically WordPress will send an email to the customer and then the user takes an action (clicks button, clicks link from email), and can see a unique, single use, coupon code back to the wordpress site? Each user of course would see a unique coupon code because there would need to have been a list of unique coupon codes selected/uploaded to begin with.
Thanks for your kind answers if there is any. Please.
I am not sure if this is what you are looking for:
YITH WOOCOMMERCE COUPON EMAIL SYSTEM
I'm having major problems customising the checkout page on a WooCommerce site for a client.
They have asked me to move a heap of fields around and, for the most part, I've got it done but the login form is causing me no end of grief.
They have asked that I create something similar to the checkout at www.adairs.com.au and would like the login form to be part of the "Billing Fields" section, and only displayed when a customer clicks the "Existing Member" tab.
I've got everything moved around but when clicking on the "Existing Member" tab to display the login form, and then logging in I get errors saying "Billing First Name", "Billing Last Name" and "Billing Address" are required.
Digging into it, it seems that when I call do_action( 'woocommerce_before_checkout_form', $checkout ) it is creating all the necessary form fields but it is not wrapping it in a form, so there is no data being posted.
I've tried moving the hook around to different parts of both the form-checkout.php and the form-billing.php files but get the same result.
When I call the same hook in the payment.php file, or leave it as it was originally coded the form is created as it should be, but is not rendered to the section of the checkout I am hoping for.
I can't for the life of me figure out why the form is created some times when I call the hook and not others.
I hope this makes sense. Any help would be greatly appreciated.
Thanks in advance,
Don
Sounds like all the "moving around" is breaking the logic. I would look into WooCommerce plugins that allow you to customize the checkout. There are lots of them
Another possibility... if you want the login form "only displayed when a customer clicks the Existing Member tab" why not leave the form where it is -- code wise -- and use JS/JQ to show/hide the actual form inputs. Look at this woo demo theme and click "Returning customer? Click here to login" for one idea.
I'm using woocommerce version 2.4.6 if that's helpful at all. I'm trying to modify the view-order page of a specific order. The web address would be something like:
http://www.edventurelearning.com/my-account/view-order/244/
The page lists the status of the order, the order details, customer details, and then the billing address. I'd like to remove the billing address section since I don't collect the data and all the payments are done through paypal.
I'm having trouble figuring out how to get rid of the Billing Address field from showing up on the page. (I've already removed the field from the checkout process). view-order.php is the file that creates the page and I can modify it but the code that creates all the order detail sections is lumped into:
do_action( 'woocommerce_view_order', $order_id );
I've found the woocommerce_view_order function which is called by woocommerce_order_details_table which is called by wc_get_template. At that point I get lost and I figure there has to be an easier way to modify what is displayed. All I need to do is remove the Billing Address section.
Thanks for any help.
I posted this in the woocommerce forums and one answer was:
An easier way is to hide it using custom css. I can't see your view order page as I'm not a customer and haven't bought anything, but on my site I would use:
.woocommerce-view-order .woocommerce header.title,
.woocommerce-view-order .woocommerce address
{display:none}
Not very subtle but at least there is no need to maintain a custom version of the relevant template.
That post can be seen here:
Wordpress Forum