Work on wiaas orders

This commit is contained in:
Almira Krdzic
2018-08-08 12:21:26 +02:00
parent c1834f679a
commit b8653ad18b
25 changed files with 644 additions and 81 deletions

View File

@@ -0,0 +1,25 @@
<?php
/**
* Class Wiaas_Customer
*
* Handler integration of Wiaas customer with Woocommerce customer
*/
class Wiaas_Customer {
public static function init() {
add_action('woocommerce_new_customer', array(__CLASS__, 'append_customer_info'));
}
/**
* Appends Wiaas customer info (name, phone)
*
* For now we will generate these, but later will be added to the interface
*/
public static function append_customer_info($customer_id) {
update_user_meta($customer_id, 'wiaas_customer_name', 'Wiaas Customer');
update_user_meta($customer_id, 'wiaas_customer_phone', '+46 (10) 5595148');
}
}
Wiaas_Customer::init();