AbandonedCheckoutSettings.php
3 years ago
AccountSettings.php
3 years ago
AdvancedSettings.php
3 years ago
BaseSettings.php
2 years ago
BrandSettings.php
3 years ago
CacheSettings.php
3 years ago
ConnectionSettings.php
3 years ago
CustomerSettings.php
3 years ago
ExportSettings.php
3 years ago
OrderSettings.php
3 years ago
ProcessorsSettings.php
3 years ago
ShippingProfileSettings.php
3 years ago
ShippingSettings.php
3 years ago
SubscriptionPreservationSettings.php
3 years ago
SubscriptionSettings.php
3 years ago
TaxRegionSettings.php
3 years ago
TaxSettings.php
3 years ago
UpgradeSettings.php
3 years ago
CacheSettings.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Controllers\Admin\Settings; |
| 4 | |
| 5 | /** |
| 6 | * Controls the settings page. |
| 7 | */ |
| 8 | class CacheSettings { |
| 9 | /** |
| 10 | * Show the page. |
| 11 | * |
| 12 | * @param \SureCartCore\Requests\RequestInterface $request Request. |
| 13 | * @return function |
| 14 | */ |
| 15 | public function clear( \SureCartCore\Requests\RequestInterface $request ) { |
| 16 | $url = wp_get_referer(); |
| 17 | delete_transient( 'surecart_account' ); |
| 18 | return \SureCart::redirect()->to( esc_url_raw( add_query_arg( 'status', 'cache_cleared', $url ) ) ); |
| 19 | } |
| 20 | } |
| 21 |