Version Description
Download this release
Release Info
Developer | PixelYourSite |
Plugin | PixelYourSite – Facebook Pixel (Events, WooCommerce & Easy Digital Downloads) |
Version | 8.0.2 |
Comparing to | |
See all releases |
Code changes from version 8.0.1 to 8.0.2
- dist/scripts/public.js +2 -2
- facebook-pixel-master.php +1 -1
- includes/class-events-manager.php +1 -3
- includes/events/class-event-grouped.php +3 -3
- includes/events/class-event-single.php +1 -1
- includes/events/class-event.php +1 -1
- includes/events/class-events-custom.php +1 -1
- includes/events/class-events-edd.php +1 -4
- includes/events/class-events-woo.php +1 -3
- modules/facebook/facebook.php +3 -3
- pixelyoursite.php +1 -1
- readme.txt +6 -1
dist/scripts/public.js
CHANGED
@@ -827,7 +827,7 @@ if (!Array.prototype.includes) {
|
|
827 |
success: function(){},
|
828 |
});
|
829 |
} else {
|
830 |
-
|
831 |
setTimeout(function (json) {
|
832 |
jQuery.ajax({
|
833 |
type: 'POST',
|
@@ -840,7 +840,7 @@ if (!Array.prototype.includes) {
|
|
840 |
},
|
841 |
});
|
842 |
}, 1000, json);
|
843 |
-
}
|
844 |
}
|
845 |
}
|
846 |
}
|
827 |
success: function(){},
|
828 |
});
|
829 |
} else {
|
830 |
+
// if(name != "AddToCart") { // AddToCart call from hook
|
831 |
setTimeout(function (json) {
|
832 |
jQuery.ajax({
|
833 |
type: 'POST',
|
840 |
},
|
841 |
});
|
842 |
}, 1000, json);
|
843 |
+
//}
|
844 |
}
|
845 |
}
|
846 |
}
|
facebook-pixel-master.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: PixelYourSite
|
5 |
* Plugin URI: http://www.pixelyoursite.com/
|
6 |
* Description: No codding <strong>Facebook Pixel</strong> and <strong>Google Analytics</strong> install. Track key actions with our Global Events, or configure your own events. WooCommerce and EDD fully supported, with Facebook Dynamic Ads Pixel set-up and Google Analytics Enhanced Ecommerce. Insert any custom script with our Head & Footer option. Add the <strong>Pinterest Tag</strong> with our free add-on. The PRO version adds support for the Google Ads tag plus a lot of extra stuff.
|
7 |
-
* Version: 8.0.
|
8 |
* Author: PixelYourSite
|
9 |
* Author URI: http://www.pixelyoursite.com
|
10 |
* License: GPLv3
|
4 |
* Plugin Name: PixelYourSite
|
5 |
* Plugin URI: http://www.pixelyoursite.com/
|
6 |
* Description: No codding <strong>Facebook Pixel</strong> and <strong>Google Analytics</strong> install. Track key actions with our Global Events, or configure your own events. WooCommerce and EDD fully supported, with Facebook Dynamic Ads Pixel set-up and Google Analytics Enhanced Ecommerce. Insert any custom script with our Head & Footer option. Add the <strong>Pinterest Tag</strong> with our free add-on. The PRO version adds support for the Google Ads tag plus a lot of extra stuff.
|
7 |
+
* Version: 8.0.2
|
8 |
* Author: PixelYourSite
|
9 |
* Author URI: http://www.pixelyoursite.com
|
10 |
* License: GPLv3
|
includes/class-events-manager.php
CHANGED
@@ -5,9 +5,7 @@ namespace PixelYourSite;
|
|
5 |
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
exit; // Exit if accessed directly.
|
7 |
}
|
8 |
-
|
9 |
-
use FacebookAds\Object\ServerSide\CustomData;
|
10 |
-
use FacebookAds\Object\ServerSide\Content;
|
11 |
|
12 |
class EventsManager {
|
13 |
|
5 |
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
exit; // Exit if accessed directly.
|
7 |
}
|
8 |
+
|
|
|
|
|
9 |
|
10 |
class EventsManager {
|
11 |
|
includes/events/class-event-grouped.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
namespace PixelYourSite;
|
4 |
-
class GroupedEvent extends
|
5 |
{
|
6 |
private $events = array();
|
7 |
public function __construct($id, $type) {
|
@@ -9,14 +9,14 @@ class GroupedEvent extends Event
|
|
9 |
}
|
10 |
|
11 |
/**
|
12 |
-
* @param
|
13 |
*/
|
14 |
public function addEvent($event) {
|
15 |
$this->events[] = $event;
|
16 |
}
|
17 |
|
18 |
/**
|
19 |
-
* @return
|
20 |
*/
|
21 |
public function getEvents() {
|
22 |
return $this->events;
|
1 |
<?php
|
2 |
|
3 |
namespace PixelYourSite;
|
4 |
+
class GroupedEvent extends PYSEvent
|
5 |
{
|
6 |
private $events = array();
|
7 |
public function __construct($id, $type) {
|
9 |
}
|
10 |
|
11 |
/**
|
12 |
+
* @param PYSEvent $event
|
13 |
*/
|
14 |
public function addEvent($event) {
|
15 |
$this->events[] = $event;
|
16 |
}
|
17 |
|
18 |
/**
|
19 |
+
* @return PYSEvent[]
|
20 |
*/
|
21 |
public function getEvents() {
|
22 |
return $this->events;
|
includes/events/class-event-single.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
namespace PixelYourSite;
|
3 |
-
class SingleEvent extends
|
4 |
|
5 |
public $params = array(
|
6 |
);
|
1 |
<?php
|
2 |
namespace PixelYourSite;
|
3 |
+
class SingleEvent extends PYSEvent{
|
4 |
|
5 |
public $params = array(
|
6 |
);
|
includes/events/class-event.php
CHANGED
@@ -6,7 +6,7 @@ class EventTypes {
|
|
6 |
static public $TRIGGER = "trigger";
|
7 |
}
|
8 |
|
9 |
-
abstract class
|
10 |
protected $id;
|
11 |
protected $type;
|
12 |
public $args = null;
|
6 |
static public $TRIGGER = "trigger";
|
7 |
}
|
8 |
|
9 |
+
abstract class PYSEvent {
|
10 |
protected $id;
|
11 |
protected $type;
|
12 |
public $args = null;
|
includes/events/class-events-custom.php
CHANGED
@@ -56,7 +56,7 @@ class EventsCustom implements EventsFactory {
|
|
56 |
}
|
57 |
/**
|
58 |
* @param CustomEvent $event
|
59 |
-
* @return
|
60 |
*/
|
61 |
function getEvent($event)
|
62 |
{
|
56 |
}
|
57 |
/**
|
58 |
* @param CustomEvent $event
|
59 |
+
* @return PYSEvent
|
60 |
*/
|
61 |
function getEvent($event)
|
62 |
{
|
includes/events/class-events-edd.php
CHANGED
@@ -95,10 +95,7 @@ class EventsEdd implements EventsFactory {
|
|
95 |
if ( strtolower( $status ) != 'publish' && strtolower( $status ) != 'pending' ) {
|
96 |
return false;
|
97 |
}
|
98 |
-
|
99 |
-
if ( PYS()->getOption( 'edd_purchase_on_transaction' ) && get_post_meta( $order_id, '_pys_purchase_event_fired', true ) ) {
|
100 |
-
return false;
|
101 |
-
}
|
102 |
update_post_meta( $order_id, '_pys_purchase_event_fired', true );
|
103 |
return true;
|
104 |
}
|
95 |
if ( strtolower( $status ) != 'publish' && strtolower( $status ) != 'pending' ) {
|
96 |
return false;
|
97 |
}
|
98 |
+
|
|
|
|
|
|
|
99 |
update_post_meta( $order_id, '_pys_purchase_event_fired', true );
|
100 |
return true;
|
101 |
}
|
includes/events/class-events-woo.php
CHANGED
@@ -183,9 +183,7 @@ class EventsWoo implements EventsFactory {
|
|
183 |
$events = array();
|
184 |
$order_key = sanitize_key($_REQUEST['key']);
|
185 |
$order_id = (int) wc_get_order_id_by_order_key( $order_key );
|
186 |
-
|
187 |
-
return array();
|
188 |
-
}
|
189 |
update_post_meta( $order_id, '_pys_purchase_event_fired', true );
|
190 |
$events[] = new SingleEvent($event,EventTypes::$STATIC);
|
191 |
|
183 |
$events = array();
|
184 |
$order_key = sanitize_key($_REQUEST['key']);
|
185 |
$order_id = (int) wc_get_order_id_by_order_key( $order_key );
|
186 |
+
|
|
|
|
|
187 |
update_post_meta( $order_id, '_pys_purchase_event_fired', true );
|
188 |
$events[] = new SingleEvent($event,EventTypes::$STATIC);
|
189 |
|
modules/facebook/facebook.php
CHANGED
@@ -45,14 +45,14 @@ class Facebook extends Settings implements Pixel {
|
|
45 |
/** @var PYS $core */
|
46 |
$core->registerPixel( $this );
|
47 |
} );
|
48 |
-
|
49 |
-
|
50 |
}
|
51 |
|
52 |
function server_woo_add_to_cart_ajax($product_id,$quantity = 1) {
|
53 |
|
54 |
if(EventsWoo()->isEnabled() && EventsWoo()->isReadyForFire("woo_add_to_cart_on_button_click")) {
|
55 |
-
|
56 |
$event = EventsWoo()->getEvent("woo_add_to_cart_on_button_click");
|
57 |
$isSuccess = Facebook()->addParamsToEvent( $event );
|
58 |
if ( !$isSuccess ) {
|
45 |
/** @var PYS $core */
|
46 |
$core->registerPixel( $this );
|
47 |
} );
|
48 |
+
// add_action( 'woocommerce_add_to_cart', array($this,'server_woo_add_to_cart') , 20, 6 );
|
49 |
+
// add_action( 'woocommerce_ajax_added_to_cart', array($this,'server_woo_add_to_cart_ajax') );
|
50 |
}
|
51 |
|
52 |
function server_woo_add_to_cart_ajax($product_id,$quantity = 1) {
|
53 |
|
54 |
if(EventsWoo()->isEnabled() && EventsWoo()->isReadyForFire("woo_add_to_cart_on_button_click")) {
|
55 |
+
|
56 |
$event = EventsWoo()->getEvent("woo_add_to_cart_on_button_click");
|
57 |
$isSuccess = Facebook()->addParamsToEvent( $event );
|
58 |
if ( !$isSuccess ) {
|
pixelyoursite.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
-
define( 'PYS_FREE_VERSION', '8.0.
|
8 |
define( 'PYS_FREE_PINTEREST_MIN_VERSION', '3.0.0' );
|
9 |
define( 'PYS_FREE_BING_MIN_VERSION', '2.0.0' );
|
10 |
define( 'PYS_FREE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
+
define( 'PYS_FREE_VERSION', '8.0.2' );
|
8 |
define( 'PYS_FREE_PINTEREST_MIN_VERSION', '3.0.0' );
|
9 |
define( 'PYS_FREE_BING_MIN_VERSION', '2.0.0' );
|
10 |
define( 'PYS_FREE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Facebook Pixel, New Facebook Pixel, Facebook Conversion Pixel, Facebook Pi
|
|
4 |
Requires at least: 3.0.1
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 8.0.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -396,6 +396,11 @@ NO, absolutely not! We don't track any type of data about your website. We simpl
|
|
396 |
== Changelog ==
|
397 |
|
398 |
|
|
|
|
|
|
|
|
|
|
|
399 |
= PixelYourSite 8.0.1 =
|
400 |
|
401 |
|
4 |
Requires at least: 3.0.1
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 8.0.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
396 |
== Changelog ==
|
397 |
|
398 |
|
399 |
+
= PixelYourSite 8.0.2 =
|
400 |
+
|
401 |
+
* Fix for a potential fatal error: PHP Fatal error: Cannot use FacebookAds\Object\ServerSide\Event as Event because the name is already in use
|
402 |
+
|
403 |
+
|
404 |
= PixelYourSite 8.0.1 =
|
405 |
|
406 |
|