| | |
| | | */ |
| | | protected function registerAdditionalHooks(): void |
| | | { |
| | | $this->ensureInitialized(); |
| | | if (!$this->isSetUp()) { |
| | | return; |
| | | } |
| | | // User login tracking for security |
| | | add_action('wp_login', [$this, 'trackUserLogin'], 10, 2); |
| | | |
| | |
| | | */ |
| | | public function enqueueScripts(): void |
| | | { |
| | | $this->ensureInitialized(); |
| | | if (!$this->isSetUp()) { |
| | | return; |
| | | } |
| | | // Helcim JS SDK |
| | | $sdk_url = $this->is_test_mode |
| | | ? 'https://helcim-js-sandbox.helcim.com/v1/helcim.js' |
| | |
| | | update_user_meta($user->ID, BASE . '_helcim_customer_updated', current_time('mysql')); |
| | | |
| | | // Clear cached customer data |
| | | $this->cache->delete('helcim_customer_' . $user->ID); |
| | | $this->cache->forget('helcim_customer_' . $user->ID); |
| | | } |
| | | |
| | | return true; |