/home/fortodpl/thecutediva.com/wp-content/plugins/litespeed-cache/thirdparty
NameSizeModeActions
aelia-currencyswitcher.cls.php27330644editdlrm
amp.cls.php25000644editdlrm
autoptimize.cls.php9100644editdlrm
avada.cls.php8130644editdlrm
bbpress.cls.php26370644editdlrm
beaver-builder.cls.php11430644editdlrm
caldera-forms.cls.php8060644editdlrm
divi-theme-builder.cls.php41840644editdlrm
elementor.cls.php33320644editdlrm
entry.inc.php16190644editdlrm
facetwp.cls.php14790644editdlrm
gravity-forms.cls.php11710644editdlrm
litespeed-check.cls.php55410644editdlrm
nextgengallery.cls.php66690644editdlrm
perfmatters.cls.php9960644editdlrm
rank-math.cls.php13230644editdlrm
theme-my-login.cls.php10340644editdlrm
user-switching.cls.php7930644editdlrm
wc-pdf-product-vouchers.cls.php9920644editdlrm
wcml.cls.php85980644editdlrm
woo-paypal.cls.php8690644editdlrm
woocommerce.cls.php326720644editdlrm
woocommerce.content.tpl.php39990644editdlrm
woocommerce.tab.tpl.php2300644editdlrm
wp-polls.cls.php8070644editdlrm
wp-postratings.cls.php9000644editdlrm
wpdiscuz.cls.php12100644editdlrm
wplister.cls.php8700644editdlrm
wpml.cls.php10450644editdlrm
wptouch.cls.php8790644editdlrm
yith-wishlist.cls.php53580644editdlrm
Edit: /home/fortodpl/thecutediva.com/wp-content/plugins/litespeed-cache/thirdparty/wcml.cls.php (8598B)
multi_currency) && method_exists($woocommerce_wpml->multi_currency, 'get_client_currency') ) { self::$_currency = $woocommerce_wpml->multi_currency->get_client_currency(); } if (empty(self::$_currency)) { self::$_currency = get_option('woocommerce_currency', 'USD'); } } $vary_list['wcml_currency'] = self::$_currency; return $vary_list; } /** * Inject the WCML vary row into the crawler cookie list. * * @since 7.9 * @access public * @param mixed $cookies Crawler cookie list. * @return array */ public static function inject_vary_row( $cookies ) { if (!is_array($cookies)) { $cookies = []; } $currencies = self::_currencies(); $selected = count($currencies) >= 2 ? self::_selected($currencies) : []; if (empty($selected)) { return $cookies; } $vals = []; foreach ($selected as $code) { $h = self::_vary_hash($code); if (!empty($h)) { $vals[] = $h; } } if (empty($vals)) { return $cookies; } $vary_name = \LiteSpeed\Vary::cls()->get_vary_name(); // Merge with admin's same-name rows $existing_vals = []; $other_rows = []; foreach ($cookies as $c) { if (is_array($c) && isset($c['name']) && $vary_name === $c['name']) { if (!empty($c['vals']) && is_array($c['vals'])) { $existing_vals = array_merge($existing_vals, $c['vals']); } } else { $other_rows[] = $c; } } $other_rows[] = [ 'name' => $vary_name, 'vals' => array_values(array_unique(array_merge($existing_vals, $vals))), ]; return $other_rows; } /** * Render the WCML multi-currency crawler picker. * * @since 7.9 * @access public * @return void */ public static function render_picker() { $currencies = self::_currencies(); if (count($currencies) < 2) { return; } $selected = self::_selected($currencies); ?>


get_vary_name(); if (empty($_COOKIE[ $vary_name ])) { return; } $currencies = self::_currencies(); $selected = count($currencies) >= 2 ? self::_selected($currencies) : []; if (empty($selected)) { return; } $val = sanitize_text_field(wp_unslash($_COOKIE[ $vary_name ])); foreach ($selected as $code) { if (self::_vary_hash($code) === $val) { add_filter('wcml_client_currency', function () use ( $code ) { return $code; }, 0); self::apply_client_currency($code); return; } } } /** * User-selected currencies, intersected with what is currently available. * * @since 7.9 * @access private * @param string[] $available Available WCML currencies. * @return string[] */ private static function _selected( $available ) { $stored = get_option(self::OPT_PICK, []); if (!is_array($stored)) { return []; } return array_values(array_intersect($available, $stored)); } /** * All active WCML currency codes. * * @since 7.9 * @access private * @return string[] */ private static function _currencies() { global $woocommerce_wpml; if (is_object($woocommerce_wpml) && isset($woocommerce_wpml->multi_currency) && method_exists($woocommerce_wpml->multi_currency, 'get_currency_codes') ) { return $woocommerce_wpml->multi_currency->get_currency_codes(); } $settings = get_option('_wcml_settings', []); if (!empty($settings['currency_options']) && is_array($settings['currency_options'])) { return array_keys($settings['currency_options']); } return []; } /** * Compute the vary cookie value for a guest under the given currency. * * @since 7.9 * @access private * @param string $currency Currency code. * @return string|false Vary value, or false if Vary cannot finalize (LITESPEED_GUEST etc.). */ private static function _vary_hash( $currency ) { $prev = self::$_currency; self::$_currency = $currency; $hash = \LiteSpeed\Vary::cls()->finalize_default_vary(-1); self::$_currency = $prev; return $hash; } }