CyberAlphaWolf

Server : Apache
System : Linux 182.49.167.72.host.secureserver.net 4.18.0-553.92.1.el8_10.x86_64 #1 SMP Wed Jan 14 06:31:58 EST 2026 x86_64
User : kikai ( 1014)
PHP Version : 8.3.30
Disable Function : NONE
Directory :  /home/kikai/www/wp-content/plugins/hummingbird-performance/core/integration/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/kikai/www/wp-content/plugins/hummingbird-performance/core/integration/class-wcml.php
<?php
/**
 * Compatibility with WCML.
 *
 * @since 3.9.3
 * @package Hummingbird\Core\Integration
 */

namespace Hummingbird\Core\Integration;

use Hummingbird\Core\Utils;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class WCML
 */
class WCML {

	/**
	 * Hummingbird WCML Integration constructor.
	 */
	public function __construct() {
		if ( ! $this->is_wcml_active() ) {
			return;
		}

		add_filter( 'wcml_is_cache_enabled_for_switching_currency', array( $this, 'is_cache_enabled_for_switching_currency' ) );
	}

	/**
	 * Check if cache is enabled for switching currency.
	 *
	 * @param bool $cache_enabled Cache enabled.
	 *
	 * @return bool
	 */
	public function is_cache_enabled_for_switching_currency( $cache_enabled ) {
		if ( Utils::get_module( 'page_cache' )->is_active() ) {
			$cache_enabled = true;
		}

		return $cache_enabled;
	}

	/**
	 * Check if WCML is active.
	 *
	 * @return bool
	 */
	private function is_wcml_active() {
		return defined( 'WCML_VERSION' ) && defined( 'ICL_SITEPRESS_VERSION' );
	}
}

XYZEAZ - Cyber Alpha Wolf © All Rights Reserved