queueService = $queueService; $this->connectionRepository = $connectionRepository; } /** * @inheritDoc */ public function getId(): string { return 'elementor'; } /** * @inheritDoc */ public function getName(): string { return __('Elementor Pro Forms', '1-click-form-sync'); } /** * @inheritDoc */ public function isAvailable(): bool { return class_exists('ElementorPro\Plugin') || defined('ELEMENTOR_PRO_VERSION'); } /** * @inheritDoc */ public function register(): void { if (!$this->isAvailable()) { return; } add_action('elementor_pro/forms/actions/register', function ($actionsManager) { $action = new ElementorGoogleSheetsAction( $this->queueService, $this->connectionRepository ); $actionsManager->register($action); }); } /** * @inheritDoc */ public function normalizeSubmission($submission, array $settings): NormalizedSubmission { $normalizer = new ElementorSubmissionNormalizer(); $customParams = $settings['oneclickformsync_custom_utm_params'] ?? ''; return $normalizer->normalize($submission, $customParams); } }