Title: WooCommerce PHP extracting data API into In-House SQL Database
Last modified: December 18, 2017

---

# WooCommerce PHP extracting data API into In-House SQL Database

 *  [jrothe1](https://wordpress.org/support/users/jrothe1/)
 * (@jrothe1)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/woocommerce-php-extracting-data-api-into-in-house-sql-database-2/)
 * Shopping Cart
    Our website [http://www.DrinkMasterBartending.com](http://www.DrinkMasterBartending.com)
   is developed using WooCommerce registrations for students to register for our
   courses. The courses having 3 parameters, “location”, “duration” and “date range”.
   We found that the HasteDesign plugin “registration” would be the right fit for
   us. We are using “Registrations-for-WooCommerce” plugin by HasteDesign ([https://github.com/HasteDesign/Registrations-for-WooCommerce](https://github.com/HasteDesign/Registrations-for-WooCommerce)).
   We are facing few issues. 1. Course participants name, surname & email are captured
   during the checkout along with other billing information.
 * When I view the order thru API the participant’s information comes like this 
   in JSON object
    “meta_data”: [ { “id”: 31259, “key”: “_registrations_order_meta”,“
   value”: “a:1:{i:0;a:2:{s:4:\”date\”;s:88:\”Master Bartending Course: 1-Week –{\”
   type\”:\”range\”,\”dates\”:[\”2018-01-29\”,\”2018-02-02\”]}\”;s:12:\”participants\”;
   a:2:{i:0;a:3:{s:4:\”name\”;s:6:\”Student Name1\”;s:7:\”surname\”;s:8:\”Student
   Surname1\”;s:5:\”email\”;s:26:\”email@email.com\”;}i:1;a:3:{s:4:\”name\”;s:7:\”
   Student Name 2\”;s:7:\”surname\”;s:8:\” Student SurName2\”;s:5:\”email\”;s:26:\”
   email@email.com\”;}}}}”
 * Is there any better way to read the participants names? Something like this
    {“
   id”: 31259, “key”: “_registrations_order_meta”, “course”: “Master Bartending 
   Course: 1-Week –“, “varationid:” “12345”, “firstname:”: “Student Name1”, “surname”:“
   Student Surname1”, “email:” : “asdf@asdf.com” },
 * 2. Is there a way to sort the Date in the drop down?
 * 3. Remove if the date is completed from the drop down. In the above screen shot
   you can see 12/11 course date is appearing in the dropdown. Is there any Option
   to remove once the course start past? I’ve found the following option in the 
   plugin to Prevent registration, but I prefer remove them.
 * 4. Currently, we are pulling all the completed orders from WooCommerce API thru
   our cron job every 5 min. The service successfully pulling all the orders successfully
   and insert into our back office database, initially the order status is “processing”,
   after pulling the order the cron job update the WooCom order status to “completed”.
   
   a. We sell few things. If anyone buy product, the order get created with “processing”
   status, the order status should be “Sales processing” as default so that it should
   ignored by my cron job and manually someone can process this. 5. All the forms
   need validation, example customer need to enter valid email or phone number etc.
 * 6. The Course date range appears like this, I would prefer to appear 01/13/2018.

The topic ‘WooCommerce PHP extracting data API into In-House SQL Database’ is closed
to new replies.

 * ![](https://ps.w.org/registrations-for-woocommerce/assets/icon.svg?rev=1387789)
 * [Registrations for WooCommerce](https://wordpress.org/plugins/registrations-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/registrations-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/registrations-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/registrations-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/registrations-for-woocommerce/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [jrothe1](https://wordpress.org/support/users/jrothe1/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/woocommerce-php-extracting-data-api-into-in-house-sql-database-2/)
 * Status: not resolved