| @@ -175,9 +175,9 @@ | ||
| 175 | 175 | protected function loadHooks() |
| 176 | 176 | { |
| 177 | 177 | |
| 178 | 178 | add_action('admin_menu', [$this, 'adminMenu' ]); |
| 179 | - add_action("wpide_ajax_request", [$this, "ajaxRequest"]); | |
| 179 | + add_action("wp_ajax_wpide_request", [$this, "ajaxRequest"]); | |
| 180 | 180 | add_action("admin_init", [$this, "registerTasks"]); |
| 181 | 181 | add_action('admin_enqueue_scripts', [ $this, 'enqueueCommonAssets' ]); |
| 182 | 182 | |
| 183 | 183 | if($this->isPluginScreen()) { |
| @@ -372,11 +372,15 @@ | ||
| 372 | 372 | |
| 373 | 373 | return false; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - public function isFreemiusScreen(): bool | |
| 376 | + public function isFreemiusScreen($section = null): bool | |
| 377 | 377 | { |
| 378 | 378 | |
| 379 | + if($section) { | |
| 380 | + return $this->isPluginScreen($section); | |
| 381 | + } | |
| 382 | + | |
| 379 | 383 | if( |
| 380 | 384 | $this->isPluginScreen('account') || |
| 381 | 385 | $this->isPluginScreen('pricing') || |
| 382 | 386 | $this->isPluginScreen('contact') || |
| @@ -394,9 +398,9 @@ | ||
| 394 | 398 | } |
| 395 | 399 | |
| 396 | 400 | public function getAjaxUrl($req = ''): string |
| 397 | 401 | { |
| 398 | - return URL.'ajax.php?action=request&req='.$req; | |
| 402 | + return admin_url('admin-ajax.php').'?action=wpide_request&req='.$req; | |
| 399 | 403 | } |
| 400 | 404 | |
| 401 | 405 | /** |
| 402 | 406 | * Get external url with utm campaign / content |