qr_url = $qr_url; $this->qr_size = $qr_size; $this->qr_margin = $qr_margin; $this->error_correction_code = $error_correction_code; } public function getGeneratedQRUrl(string $data): string { $code_url = add_query_arg(array_merge($this->getQRPrintOptions(), ['data' => urlencode($data)]), $this->qr_url); return $code_url; } private function getQRPrintOptions(): array { $options = [ 'size' => $this->qr_size, 'margin' => $this->qr_margin, 'ecc' => $this->error_correction_code, ]; return apply_filters('planzer/qr/generator/print_options', $options); } }