public function reload_customer() { // No timeout limit $this->increase_timeout(); // Don't break the JSON result error_reporting(0); header('Content-type: application/json'); $id = (int) $_REQUEST['id']; try { $result = wc_crm_reload_customer($id); die(json_encode($result)); } catch (Exception $e) { $this->die_json_failure_msg($id, '<b><span style="color: #DD3D36;">' . $e->getMessage() . '</span></b>'); } die; }
public function user_register($user_id = '') { if (!$user_id || empty($user_id)) { return; } wc_crm_reload_customer($user_id); wc_crm_clear_transient(); }