| @@ -162,16 +162,16 @@ | ||
| 162 | 162 | |
| 163 | 163 | wp_set_script_translations( 'elementor-ai', 'elementor' ); |
| 164 | 164 | |
| 165 | 165 | if ( $this->get_ai_app()->is_connected() && ! empty( $config['is_get_started'] ) ) { |
| 166 | - $remote_config = Utils::get_cached_callback( [ $this->get_ai_app(), 'get_remote_config' ], 'ai_remote_config' ); | |
| 166 | + $remote_config = Utils::get_cached_callback( [ $this->get_ai_app(), 'get_remote_config' ], 'ai_remote_config-' . get_current_user_id(), HOUR_IN_SECONDS ); | |
| 167 | 167 | |
| 168 | 168 | if ( ! is_wp_error( $remote_config ) && ! empty( $remote_config['config']['remoteIntegrationUrl'] ) ) { |
| 169 | - wp_enqueue_scripts( | |
| 169 | + wp_enqueue_script( | |
| 170 | 170 | 'elementor-ai-integration', |
| 171 | 171 | $remote_config['config']['remoteIntegrationUrl'], |
| 172 | 172 | [ |
| 173 | - 'elementor-editor', | |
| 173 | + 'elementor-ai', | |
| 174 | 174 | ], |
| 175 | 175 | ELEMENTOR_VERSION, |
| 176 | 176 | true |
| 177 | 177 | ); |