<?php
/**
* The Third Party integration with WCML.
*
* @since 3.0
* @package LiteSpeed
* @subpackage LiteSpeed_Cache\Thirdparty
*/
namespace LiteSpeed\Thirdparty;
defined('WPINC') || exit();
/**
* Provides compatibility with WCML for currency handling.
*/
class WCML {
/**
* Holds the current WCML currency.
*
* @var string
*/
private static $_currency = '';
/**
* Detect if WCML is active and register hooks.
*
* @since 3.0
* @access public
* @return void
*/
public static function detect() {
if (!defined('WCML_VERSION')) {
return;
}
add_filter('wcml_client_currency', __CLASS__ . '::apply_client_currency');
add_action('wcml_set_client_currency', __CLASS__ . '::set_client_currency');
}
/**
* Sets the client currency and triggers vary updates.
*
* @since 3.0
* @access public
* @param string $currency The currency code to set.
* @return void
*/
public static function set_client_currency( $currency ) {
self::apply_client_currency($currency);
do_action('litespeed_vary_ajax_force');
}
/**
* Applies the client currency and adjusts vary accordingly.
*
* @since 3.0
* @access public
* @param string $currency The currency code to apply.
* @return string The applied currency.
*/
public static function apply_client_currency( $currency ) {
self::$_currency = $currency;
add_filter('litespeed_vary', __CLASS__ . '::apply_vary');
return $currency;
}
/**
* Appends WCML currency to vary list.
*
* @since 3.0
* @access public
* @param array $vary_list The existing vary list.
* @return array The updated vary list including WCML currency.
*/
public static function apply_vary( $vary_list ) {
$vary_list['wcml_currency'] = self::$_currency;
return $vary_list;
}
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| aelia-currencyswitcher.cls.php | 2026-06-06 16:18 | 2.67 KB | 76129f60960:kunden | -xw-x----- | |
| amp.cls.php | 2026-06-06 16:18 | 2.44 KB | 76129f60960:kunden | -xw-x----- | |
| autoptimize.cls.php | 2026-06-06 16:18 | 910 B | 76129f60960:kunden | -xw-x----- | |
| avada.cls.php | 2026-06-06 16:18 | 813 B | 76129f60960:kunden | -xw-x----- | |
| bbpress.cls.php | 2026-06-06 16:18 | 2.58 KB | 76129f60960:kunden | -xw-x----- | |
| beaver-builder.cls.php | 2026-06-06 16:18 | 1.12 KB | 76129f60960:kunden | -xw-x----- | |
| caldera-forms.cls.php | 2026-06-06 16:18 | 806 B | 76129f60960:kunden | -xw-x----- | |
| divi-theme-builder.cls.php | 2026-06-06 16:18 | 3.57 KB | 76129f60960:kunden | -xw-x----- | |
| elementor.cls.php | 2026-06-06 16:18 | 3.25 KB | 76129f60960:kunden | -xw-x----- | |
| entry.inc.php | 2026-06-06 16:18 | 1.51 KB | 76129f60960:kunden | -xw-x----- | |
| facetwp.cls.php | 2026-06-06 16:18 | 1.44 KB | 76129f60960:kunden | -xw-x----- | |
| gravity-forms.cls.php | 2026-06-06 16:18 | 1.14 KB | 76129f60960:kunden | -xw-x----- | |
| litespeed-check.cls.php | 2026-06-06 16:18 | 5.41 KB | 76129f60960:kunden | -xw-x----- | |
| nextgengallery.cls.php | 2026-06-06 16:18 | 6.51 KB | 76129f60960:kunden | -xw-x----- | |
| perfmatters.cls.php | 2026-06-06 16:18 | 996 B | 76129f60960:kunden | -xw-x----- | |
| theme-my-login.cls.php | 2026-06-06 16:18 | 1.01 KB | 76129f60960:kunden | -xw-x----- | |
| user-switching.cls.php | 2026-06-06 16:18 | 793 B | 76129f60960:kunden | -xw-x----- | |
| wc-pdf-product-vouchers.cls.php | 2026-06-06 16:18 | 992 B | 76129f60960:kunden | -xw-x----- | |
| wcml.cls.php | 2026-06-06 16:18 | 1.74 KB | 76129f60960:kunden | -xw-x----- | |
| woo-paypal.cls.php | 2026-06-06 16:18 | 869 B | 76129f60960:kunden | -xw-x----- | |
| woocommerce.cls.php | 2026-06-06 16:18 | 30.15 KB | 76129f60960:kunden | -xw-x----- | |
| woocommerce.content.tpl.php | 2026-06-06 16:18 | 3.91 KB | 76129f60960:kunden | -xw-x----- | |
| woocommerce.tab.tpl.php | 2026-06-06 16:18 | 230 B | 76129f60960:kunden | -xw-x----- | |
| wp-polls.cls.php | 2026-06-06 16:18 | 807 B | 76129f60960:kunden | -xw-x----- | |
| wp-postratings.cls.php | 2026-06-06 16:18 | 900 B | 76129f60960:kunden | -xw-x----- | |
| wpdiscuz.cls.php | 2026-06-06 16:18 | 1.18 KB | 76129f60960:kunden | -xw-x----- | |
| wplister.cls.php | 2026-06-06 16:18 | 870 B | 76129f60960:kunden | -xw-x----- | |
| wpml.cls.php | 2026-06-06 16:18 | 1.02 KB | 76129f60960:kunden | -xw-x----- | |
| wptouch.cls.php | 2026-06-06 16:18 | 879 B | 76129f60960:kunden | -xw-x----- | |
| yith-wishlist.cls.php | 2026-06-06 16:18 | 5.23 KB | 76129f60960:kunden | -xw-x----- | |