Work on wiaas orders
This commit is contained in:
25
backend/app/plugins/wiaas/includes/class-wiaas-customer.php
Normal file
25
backend/app/plugins/wiaas/includes/class-wiaas-customer.php
Normal 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();
|
||||
Reference in New Issue
Block a user