- Created a new template for the cart rule form with custom label, switch, and choice widgets. - Implemented the InPost Pay block in the order details template for displaying delivery method, APM, and VAT invoice request. - Added legacy support for the order details template to maintain compatibility with older PrestaShop versions.
30 lines
517 B
PHP
30 lines
517 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace izi\prestashop\CacheClearer;
|
|
|
|
use Psr\SimpleCache\CacheInterface;
|
|
|
|
final class Psr16CacheClearer implements CacheClearerInterface
|
|
{
|
|
/**
|
|
* @var CacheInterface
|
|
*/
|
|
private $cache;
|
|
|
|
public function __construct(CacheInterface $cache)
|
|
{
|
|
$this->cache = $cache;
|
|
}
|
|
|
|
public function clear(): void
|
|
{
|
|
if ($this->cache->clear()) {
|
|
return;
|
|
}
|
|
|
|
throw new \RuntimeException('Failed to clear cache.');
|
|
}
|
|
}
|