Skip to main content

Sometimes it may be necessary to export data from the course booking system. We provide assistance and examples for these exports:

Export of customer data

To export customer data, we use the same plugin that we recommend for import: “Import and export users and customers“.

In the plugin settings under the “Export” tab, please select “Customer” as the role and export these Columns:

user_email,first_name,last_name,birthday, billing_address_1,billing_postcode,billing_city,billing_country,billing_phone,description,user_registered

Export of card balances

To export card statuses, please select “Customer” as the role and export these Columns:

user_email,first_name,last_name,card,expire,card_2,expire_2,card_3,expire_3,card_4,expire_4,card_5,expire_5

Export of subscriptions

To export subscriptions, please select “Customer” as the role and export these Columns:

user_email,first_name,last_name,abo_start,abo_expire,abo,abo_2,abo_3,abo_course,abo_course_2,abo_course_3,card

Export of bookings

The bookings, however, are best queried via the database and then exported. To do this, log in to the database (for example via phpMyAdmin) and enter the following query in the “SQL” tab:

CREATE VIEW bookings_export AS SELECT booking_id,course_id,wp_cbs_bookings.date,start,end,post_id,post_title,wp_cbs_bookings.user_id,user_email,display_name FROM wp_cbs_bookings JOIN wp_users ON(wp_cbs_bookings.user_id = wp_users.ID) JOIN wp_cbs_data ON(wp_cbs_bookings.course_id = wp_cbs_data.id) JOIN wp_posts ON(wp_cbs_data.post_id = wp_posts.ID);

Please note that the wp_ prefix may vary for you.

This will give you a VIEW of all bookings with the most important information. You can export this view as usual. If you need additional values, you can of course adapt the query to your requirements.

Maxim

Maxim is the owner of ComMotion and your contact for all advertising agency services in the Stuttgart area. His core competence lies in web development with WordPress, WooCommerce and search engine optimization. He is also a passionate sailor and coffee drinker.

Leave a Reply