Help Center

How to Enable WooCommerce Integration for Appointments

Learn how to enable the WooCommerce integration for the JetAppointment plugin for WordPress to connect forms with the default WooCommerce pages (e.g., orders, payments, checkouts).

Before you start, check the tutorial requirements:

  • Elementor (Free version) or Block Editor (Gutenberg)

  • WooCommerce plugin installed and activated

  • JetAppointment plugin installed and activated

  • JetEngine plugin installed and activated with the “Service” and “Provider” type Custom Post Types (CPT) created

  • JetThemeCore plugin installed and activated, with a single page created

Things to know

The “WooCommerce integration” mode is intended to adjust online payment after the visitor books the service, for example, by using the default WooCommerce pages (e.g., orders, payments, check-outs).

Enable the WooCommerce Integration

Navigate to WordPress Dashboard > Appointments > Settings and enable the WooCommerce Integration toggle.

jetappointments general settings

Then, in the WordPress Dashboard > WooCommerce > Products tab, the “Appointment” sample product will appear. Note that it should remain unchanged.

Things to know

The created “Appointment” sample product is an auxiliary product intended to activate the checkout option. The actual billable products are the “Service” type CPT posts. Please, do not delete this sample product — payments will not work without it. Simply hide it if you do not need it on the front end.

woocommerce products appointment

Set the Options for the Service Products

To specify the needed options of the “Service” type CPT posts (e.g., prices, schedule, etc.), navigate to the corresponding post type tab (the “Service“ CPT, in this case).

service cpt posts enlisted

Then, unroll the needed post, scroll it down to the Appointment Settings section, and adjust the required values.

the appointment settings section

Also, you can set the common settings for all CPT posts using the JetAppointment Wizard Setup tutorial.

Create a Form

Things to know

You can create different types of appointment booking forms — a Static Page Booking Form, a Single Service Booking Form, and a Single Provider Booking Form. More specific examples of these types of forms are presented in the How to Set Appointment Booking Forms tutorial.

In this tutorial, we create the Single Service Booking Form, which, except for other fields, includes the Appointment Date block field specific to appointment forms. This field allows users to book a date during the booking hours of certain providers.

the appointment date field block

Also, we insert a Calculated Field, then define FIELD LABEL and FORM FIELD NAME, and paste the following calculation formula:

%FIELD::appointment_date_2% 

where ‘appointment_date_2’ represents the “Appointment Date” FORM FIELD NAME.

the calculated field block added to a form

Read the How to Create Appointment Booking Forms for an in-depth understanding of the appointment settings and the WooCommerce integration options set.

Also, the “Insert appointment” Post Submit Action should be set. In this case, we press the “pencil” button and unroll the Edit Insert appointment pop-up. Here, specify the required fields (e.g., SERVICE_ID FIELD, PROVIDER_ID FIELD, APPOINTMENT DATE FIELD, and more). Next, move to the WOOCOMMERCE PRICE FIELD and set the field to get the total price from. 

the edit insert appointment pop-up

After that, scroll the pop-up to the WOOCOMMERCE ORDER DETAILS fields and press the “Set up” button to specify the booking-related info you want to add to the WooCommerce orders and e-mails.

Once completed, press the “Update” button in the pop-up, then return to the “Edit Insert appointment” pop-up. Here, navigate to the WooCommerce checkout fields map to enable auto-filling of checkout form fields. All the data the user has already typed into the form will be automatically inserted into the checkout form fields.

Next, push the “Update” button after you have adjusted the fields.

In this case, we also added the “Send EmailPost Submit Action.

Finally, publish/save the form.

Add the Form to a Page

Open the single template, customize it as needed, and add the JetForm widget/block/element, depending on the editor you use. Also, the How to Display a Form on the Front End tutorial provides additional explanations.

the jetform widget added to a page

Save the template and check the progress.

Test the Flow

View the CPT post you want and fill out the form.

the form on the front end

After successful submission, users will be automatically redirected to the WooCommerce Checkout page.

the woocommerce checkout page

 After placing the order, the corresponding data will be added to the WordPress Dashboard > Appointments tab. To view the details of the required appointment, click the “pencil” icon next to the corresponding order. 

the appointments tab of the wordpress dashboard

In addition, all WooCommerce orders are collected in the WordPress Dashboard > WooCommerce > Orders tab.

the woocommerce orders tab

In turn, any order can be unrolled and modified by clicking its name.

the woocommerce order unrolled

That’s it. Now you know how to enable the WooCommerce integration for the JetAppointments plugin for WordPress to connect forms with the default WooCommerce pages (e.g., orders, payments, checkouts).

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 30K+ Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.