25 lines
635 B
PHP
25 lines
635 B
PHP
<?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(); |