pixelyoursite
Last commit date
containers_gtm
1 year ago
dist
1 year ago
includes
1 year ago
modules
1 year ago
notices
1 year ago
vendor
1 year ago
vendor_prefix
1 year ago
facebook-pixel-master.php
1 year ago
pixelyoursite.php
1 year ago
readme.txt
1 year ago
facebook-pixel-master.php
51 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Plugin Name: PixelYourSite |
| 5 | * Plugin URI: http://www.pixelyoursite.com/ |
| 6 | * Description: Meta Pixel & CAPI, GA4, and GTM support with ZERO CODING. Track events, WooCommerce/EDD ready, with Pinterest & Bing add-ons, plus consent support. |
| 7 | * Version: 10.0.4 |
| 8 | * Author: PixelYourSite |
| 9 | * Author URI: http://www.pixelyoursite.com |
| 10 | * License: GPLv3 |
| 11 | * |
| 12 | * Requires at least: 4.4 |
| 13 | * Tested up to: 6.7 |
| 14 | * |
| 15 | * WC requires at least: 2.6.0 |
| 16 | * WC tested up to: 9.4 |
| 17 | * |
| 18 | * Text Domain: pys |
| 19 | */ |
| 20 | if ( ! defined( 'ABSPATH' ) ) { |
| 21 | exit; // Exit if accessed directly. |
| 22 | } |
| 23 | |
| 24 | function isPysProActive() { |
| 25 | |
| 26 | if ( ! function_exists( 'is_plugin_active' ) ) { |
| 27 | include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
| 28 | } |
| 29 | |
| 30 | return is_plugin_active( 'pixelyoursite-pro/pixelyoursite-pro.php' ); |
| 31 | |
| 32 | } |
| 33 | |
| 34 | register_activation_hook( __FILE__, 'pysFreeActivation' ); |
| 35 | function pysFreeActivation() { |
| 36 | |
| 37 | if ( isPysProActive() ) { |
| 38 | deactivate_plugins('pixelyoursite-pro/pixelyoursite-pro.php'); |
| 39 | } |
| 40 | \PixelYourSite\manageAdminPermissions(); |
| 41 | } |
| 42 | /** |
| 43 | * facebook-pixel-master.php used for backward compatibility. |
| 44 | */ |
| 45 | add_action( 'before_woocommerce_init', function() { |
| 46 | if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { |
| 47 | \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); |
| 48 | } |
| 49 | } ); |
| 50 | require_once 'pixelyoursite.php'; |
| 51 |