<?php declare(strict_types=1);
namespace GoogleAdsUploaderFinalFix;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\ActivateContext;
class GoogleAdsUploaderFinalFix extends Plugin
{
public function activate(ActivateContext $activateContext): void
{
$projectDir = $this->container->getParameter('kernel.project_dir');
$source = __DIR__ . '/Resources/public/ajax.php';
$destination = $projectDir . '/public/ajax.php';
if (!file_exists($destination)) {
copy($source, $destination);
}
parent::activate($activateContext);
}
}