aelia-currencyswitcher.cls.php
8 months ago
amp.cls.php
8 months ago
autoptimize.cls.php
8 months ago
avada.cls.php
8 months ago
bbpress.cls.php
8 months ago
beaver-builder.cls.php
8 months ago
caldera-forms.cls.php
8 months ago
divi-theme-builder.cls.php
8 months ago
elementor.cls.php
8 months ago
entry.inc.php
8 months ago
facetwp.cls.php
8 months ago
gravity-forms.cls.php
8 months ago
litespeed-check.cls.php
8 months ago
nextgengallery.cls.php
8 months ago
perfmatters.cls.php
8 months ago
theme-my-login.cls.php
8 months ago
user-switching.cls.php
8 months ago
wc-pdf-product-vouchers.cls.php
8 months ago
wcml.cls.php
8 months ago
woo-paypal.cls.php
8 months ago
woocommerce.cls.php
8 months ago
woocommerce.content.tpl.php
8 months ago
woocommerce.tab.tpl.php
8 months ago
wp-polls.cls.php
8 months ago
wp-postratings.cls.php
8 months ago
wpdiscuz.cls.php
8 months ago
wplister.cls.php
8 months ago
wpml.cls.php
8 months ago
wptouch.cls.php
8 months ago
yith-wishlist.cls.php
8 months ago
wc-pdf-product-vouchers.cls.php
32 lines
| 1 | <?php |
| 2 | // phpcs:ignoreFile |
| 3 | /** |
| 4 | * The Third Party integration with WooCommerce PDF Product Vouchers. |
| 5 | * |
| 6 | * @since 5.1.0 |
| 7 | */ |
| 8 | namespace LiteSpeed\Thirdparty; |
| 9 | |
| 10 | defined('WPINC') || exit(); |
| 11 | |
| 12 | class WC_PDF_Product_Vouchers { |
| 13 | |
| 14 | /** |
| 15 | * Do not cache generated vouchers |
| 16 | * |
| 17 | * @since 5.1.0 |
| 18 | */ |
| 19 | public static function detect() { |
| 20 | if (!class_exists('\WC_PDF_Product_Vouchers_Loader')) { |
| 21 | return; |
| 22 | } |
| 23 | |
| 24 | $is_voucher = !empty($_GET['post_type']) && 'wc_voucher' === $_GET['post_type']; |
| 25 | $has_key = !empty($_GET['voucher_key']) || !empty($_GET['key']); |
| 26 | |
| 27 | if ($is_voucher && $has_key) { |
| 28 | do_action('litespeed_control_set_nocache', '3rd WC PDF Product Voucher'); |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 |