1 | <?php |
---|
2 | |
---|
3 | namespace LiteSpeed\Thirdparty; |
---|
4 | |
---|
5 | defined('WPINC') || exit; |
---|
6 | |
---|
7 | use \LiteSpeed\API; |
---|
8 | use \LiteSpeed\Doc; |
---|
9 | use \LiteSpeed\Admin_Display; |
---|
10 | use \LiteSpeed\Lang; |
---|
11 | use \LiteSpeed\Base; |
---|
12 | ?> |
---|
13 | |
---|
14 | <div data-litespeed-layout='woocommerce'> |
---|
15 | |
---|
16 | <h3 class="litespeed-title-short"> |
---|
17 | <?php echo __('WooCommerce Settings', 'litespeed-cache'); ?> |
---|
18 | <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/cache/#woocommerce-tab'); ?> |
---|
19 | </h3> |
---|
20 | |
---|
21 | <div class="litespeed-callout notice notice-warning inline"> |
---|
22 | <h4><?php echo __('NOTICE:', 'litespeed-cache'); ?></h4> |
---|
23 | <p><?php echo __('After verifying that the cache works in general, please test the cart.', 'litespeed-cache'); ?></p> |
---|
24 | <p><?php echo sprintf(__('To test the cart, visit the <a %s>FAQ</a>.', 'litespeed-cache'), 'href="https://docs.litespeedtech.com/lscache/lscwp/installation/#non-cacheable-pages" target="_blank"'); ?></p> |
---|
25 | <p><?php echo __('By default, the My Account, Checkout, and Cart pages are automatically excluded from caching. Misconfiguration of page associations in WooCommerce settings may cause some pages to be erroneously excluded.', 'litespeed-cache'); ?></p> |
---|
26 | </div> |
---|
27 | |
---|
28 | <table class="wp-list-table striped litespeed-table"> |
---|
29 | <tbody> |
---|
30 | <tr> |
---|
31 | <th> |
---|
32 | <?php $id = self::O_UPDATE_INTERVAL; ?> |
---|
33 | <?php echo __('Product Update Interval', 'litespeed-cache'); ?> |
---|
34 | </th> |
---|
35 | <td> |
---|
36 | <?php |
---|
37 | $options = array( |
---|
38 | self::O_PQS_CS => __('Purge product on changes to the quantity or stock status.', 'litespeed-cache') . ' ' . __('Purge categories only when stock status changes.', 'litespeed-cache'), |
---|
39 | self::O_PS_CS => __('Purge product and categories only when the stock status changes.', 'litespeed-cache'), |
---|
40 | self::O_PS_CN => __('Purge product only when the stock status changes.', 'litespeed-cache') . ' ' . __('Do not purge categories on changes to the quantity or stock status.', 'litespeed-cache'), |
---|
41 | self::O_PQS_CQS => __('Always purge both product and categories on changes to the quantity or stock status.', 'litespeed-cache'), |
---|
42 | ); |
---|
43 | $conf = (int) apply_filters('litespeed_conf', $id); |
---|
44 | foreach ($options as $k => $v) : |
---|
45 | $checked = (int) $k === $conf ? ' checked ' : ''; |
---|
46 | ?> |
---|
47 | <?php do_action('litespeed_setting_enroll', $id); ?> |
---|
48 | <div class='litespeed-radio-row'> |
---|
49 | <input type='radio' autocomplete='off' name='<?php echo $id; ?>' id='conf_<?php echo $id; ?>_<?php echo $k; ?>' value='<?php echo $k; ?>' <?php echo $checked; ?> /> |
---|
50 | <label for='conf_<?php echo $id; ?>_<?php echo $k; ?>'><?php echo $v; ?></label> |
---|
51 | </div> |
---|
52 | <?php endforeach; ?> |
---|
53 | <div class="litespeed-desc"> |
---|
54 | <?php echo __('Determines how changes in product quantity and product stock status affect product pages and their associated category pages.', 'litespeed-cache'); ?> |
---|
55 | </div> |
---|
56 | </td> |
---|
57 | </tr> |
---|
58 | |
---|
59 | <tr> |
---|
60 | <th> |
---|
61 | <?php $id = self::O_CART_VARY; ?> |
---|
62 | <?php echo __('Vary for Mini Cart', 'litespeed-cache'); ?> |
---|
63 | </th> |
---|
64 | <td> |
---|
65 | <?php |
---|
66 | $conf = (int) apply_filters('litespeed_conf', $id); |
---|
67 | $this->cls('Admin_Display')->build_switch($id); ?> |
---|
68 | <div class="litespeed-desc"> |
---|
69 | <?php echo __('Generate a separate vary cache copy for the mini cart when the cart is not empty.', 'litespeed-cache'); ?> |
---|
70 | <?php echo __('If your theme does not use JS to update the mini cart, you must enable this option to display the correct cart contents.', 'litespeed-cache'); ?> |
---|
71 | <br /><?php Doc::notice_htaccess(); ?> |
---|
72 | </div> |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | |
---|
76 | </tbody> |
---|
77 | </table> |
---|
78 | </div> |
---|