Pixel Caffeine - Version 2.0.4

Version Description

  • 2018-04-12
  • Add - New option to choose a short description as description for the feed item
  • Add - New option to choose if price must be including or excluding tax
  • Fix - Changed deprecated FB API calls about product catalog. It's mandatory to upgrade Pixel Caffeine before May 8th 2018 in order to have the product catalog functionality working.
  • Fix - Invalid argument supplied for foreach PHP warning
  • Fix - Encoded & detected when a "&" symbol char is present in category or tag
  • Fix - Force to absolute URL the image link in the feed
Download this release

Release Info

Developer antoscarface
Plugin Icon 128x128 Pixel Caffeine
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

includes/admin/class-aepc-admin-view.php CHANGED
@@ -1177,6 +1177,30 @@ class AEPC_Admin_View {
1177
  return $returns;
1178
  }
1179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1180
  /**
1181
  * Returns the options for the condition field of a product feed
1182
  *
1177
  return $returns;
1178
  }
1179
 
1180
+ /**
1181
+ * Returns the options for the condition field of a product feed
1182
+ *
1183
+ * @return array
1184
+ */
1185
+ public function get_feed_description_options() {
1186
+ return array(
1187
+ 'full-description' => __( 'Full Description', 'pixel-caffeine' ),
1188
+ 'short-description' => __( 'Short Description', 'pixel-caffeine' ),
1189
+ );
1190
+ }
1191
+
1192
+ /**
1193
+ * Returns the options for the condition field of a product feed
1194
+ *
1195
+ * @return array
1196
+ */
1197
+ public function get_feed_price_options() {
1198
+ return array(
1199
+ 'price-no-tax' => __( 'Price excluding tax', 'pixel-caffeine' ),
1200
+ 'price-including-tax' => __( 'Price including tax', 'pixel-caffeine' ),
1201
+ );
1202
+ }
1203
+
1204
  /**
1205
  * Returns the options for the condition field of a product feed
1206
  *
includes/admin/class-aepc-facebook-adapter.php CHANGED
@@ -780,12 +780,18 @@ class AEPC_Facebook_Adapter {
780
  return null;
781
  }
782
 
783
- $response = $this->request( 'GET', '/' . $business_id . '/product_catalogs', array(
784
  'limit' => apply_filters( 'aepc_facebook_request_product_catalogs_limit', 100 )
785
  ) );
786
 
787
- $product_catalogs = json_decode( wp_remote_retrieve_body( $response ) );
788
- return $product_catalogs->data;
 
 
 
 
 
 
789
  }
790
 
791
  /**
@@ -984,7 +990,7 @@ class AEPC_Facebook_Adapter {
984
  throw new Exception( __( 'Unable to create a product catalog because there isn\'t any business ID associated to your Ad account.', 'pixel-caffeine' ) );
985
  }
986
 
987
- $response = $this->request( 'POST', '/' . $this->get_business_id() . '/product_catalogs', array(
988
  'name' => $name,
989
  ) );
990
 
780
  return null;
781
  }
782
 
783
+ $owned_response = $this->request( 'GET', '/' . $business_id . '/owned_product_catalogs', array(
784
  'limit' => apply_filters( 'aepc_facebook_request_product_catalogs_limit', 100 )
785
  ) );
786
 
787
+ $client_response = $this->request( 'GET', '/' . $business_id . '/client_product_catalogs', array(
788
+ 'limit' => apply_filters( 'aepc_facebook_request_product_catalogs_limit', 100 )
789
+ ) );
790
+
791
+ $owned_product_catalogs = json_decode( wp_remote_retrieve_body( $owned_response ) )->data;
792
+ $client_product_catalogs = json_decode( wp_remote_retrieve_body( $client_response ) )->data;
793
+
794
+ return array_merge( $owned_product_catalogs, $client_product_catalogs );
795
  }
796
 
797
  /**
990
  throw new Exception( __( 'Unable to create a product catalog because there isn\'t any business ID associated to your Ad account.', 'pixel-caffeine' ) );
991
  }
992
 
993
+ $response = $this->request( 'POST', '/' . $this->get_business_id() . '/owned_product_catalogs', array(
994
  'name' => $name,
995
  ) );
996
 
includes/admin/templates/general-settings.php CHANGED
@@ -66,7 +66,7 @@ $highlight_fbpixel = isset( $_GET['ref'] ) && 'fblogin' == $_GET['ref'] && $fb->
66
  <div class="form-group form-track form-horizontal">
67
  <div class="control-label">
68
  <h3 class="tit"><?php _e( 'Track Custom Fields Based Events', 'pixel-caffeine' ) ?>
69
- <a href="#_" class="btn btn-fab btn-fab-mini btn-help"></a>
70
  </h3>
71
  </div>
72
  <div class="control-wrap">
@@ -174,7 +174,10 @@ $highlight_fbpixel = isset( $_GET['ref'] ) && 'fblogin' == $_GET['ref'] && $fb->
174
 
175
  <div class="form-group ecomm-conversions">
176
  <div class="control-label">
177
- <h3 class="tit"><?php _e( 'Track this eCommerce Conversions', 'pixel-caffeine' ) ?><a href="#_" class="btn btn-fab btn-fab-mini btn-help"></a></h3>
 
 
 
178
  </div>
179
 
180
  <div class="control-wrap">
66
  <div class="form-group form-track form-horizontal">
67
  <div class="control-label">
68
  <h3 class="tit"><?php _e( 'Track Custom Fields Based Events', 'pixel-caffeine' ) ?>
69
+ <a href="#_" class="btn btn-fab btn-fab-mini btn-help" data-toggle="tooltip" data-placement="top" title="<?php _e('Automatically add the value of specific post metas you define below in the pixel that Pixel Caffeine will track.', 'pixel-caffeine') ?>"></a>
70
  </h3>
71
  </div>
72
  <div class="control-wrap">
174
 
175
  <div class="form-group ecomm-conversions">
176
  <div class="control-label">
177
+ <h3 class="tit">
178
+ <?php _e( 'Track this eCommerce Conversions', 'pixel-caffeine' ) ?>
179
+ <a href="#_" class="btn btn-fab btn-fab-mini btn-help" data-toggle="tooltip" data-placement="top" title="<?php _e('Enable the DPA event you want to track for your website. Pixel Caffeine will automatically track it when they should from the supported plugins.', 'pixel-caffeine') ?>"></a>
180
+ </h3>
181
  </div>
182
 
183
  <div class="control-wrap">
includes/admin/templates/parts/advanced-settings.php CHANGED
@@ -13,10 +13,6 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  exit; // Exit if accessed directly.
14
  }
15
 
16
- if ( ! AEPC_Admin::$api->is_logged_in() ) {
17
- return;
18
- }
19
-
20
  ?>
21
 
22
  <div class="panel panel-advanced-settings">
13
  exit; // Exit if accessed directly.
14
  }
15
 
 
 
 
 
16
  ?>
17
 
18
  <div class="panel panel-advanced-settings">
includes/admin/templates/parts/fb-connect-logged-out.php CHANGED
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
18
  <div class="control-label">
19
  <h3 class="tit">
20
  <?php _e( 'Facebook Connect', 'pixel-caffeine' ) ?>
21
- <a href="#_" class="btn btn-fab btn-help btn-fab-mini" data-toggle="tooltip" data-placement="top" title="[ Tooltip on top ]"></a>
22
  </h3>
23
  </div>
24
  <p class="text"><?php _e( 'The easiest whay to get up and running with all the advanced features. Connect your Facebook account and you\'re good to go!', 'pixel-caffeine' ) ?></p>
18
  <div class="control-label">
19
  <h3 class="tit">
20
  <?php _e( 'Facebook Connect', 'pixel-caffeine' ) ?>
21
+ <a href="#_" class="btn btn-fab btn-help btn-fab-mini" data-toggle="tooltip" data-placement="top" title="<?php _e( 'Connect your Ad account in Pixel Caffeine', 'pixel-caffeine' ) ?>"></a>
22
  </h3>
23
  </div>
24
  <p class="text"><?php _e( 'The easiest whay to get up and running with all the advanced features. Connect your Facebook account and you\'re good to go!', 'pixel-caffeine' ) ?></p>
includes/admin/templates/parts/forms/product-catalog.php CHANGED
@@ -593,6 +593,44 @@ foreach ( $selected_addons as $k => $sa ) {
593
  </div>
594
  </div>
595
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
  <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_CUSTOM_LABEL_0 ) ?>" class="form-group is-empty">
597
  <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_CUSTOM_LABEL_0 ) ?>" class="control-label">
598
  custom_label_0
593
  </div>
594
  </div>
595
 
596
+ <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_DESCRIPTION ) ?>" class="form-group is-empty">
597
+ <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_DESCRIPTION ) ?>" class="control-label">
598
+ description
599
+ </label>
600
+ <div class="control-wrap">
601
+ <select
602
+ class="form-control"
603
+ name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_DESCRIPTION ) ?>"
604
+ id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_DESCRIPTION ) ?>"
605
+ >
606
+ <?php foreach ( $page->get_feed_description_options() as $k => $v ) : ?>
607
+ <option value="<?php echo esc_attr( $k ) ?>"<?php selected($k, $page->get_feed_field_value( $product_catalog, Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_DESCRIPTION )) ?>><?php echo esc_html( $v ) ?></option>
608
+ <?php endforeach; ?>
609
+ </select>
610
+ <div class="field-helper">
611
+ </div>
612
+ </div>
613
+ </div>
614
+
615
+ <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_PRICE ) ?>" class="form-group is-empty">
616
+ <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_PRICE ) ?>" class="control-label">
617
+ price
618
+ </label>
619
+ <div class="control-wrap">
620
+ <select
621
+ class="form-control"
622
+ name="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_PRICE ) ?>"
623
+ id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_PRICE ) ?>"
624
+ >
625
+ <?php foreach ( $page->get_feed_price_options() as $k => $v ) : ?>
626
+ <option value="<?php echo esc_attr( $k ) ?>"<?php selected($k, $page->get_feed_field_value( $product_catalog, Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_PRICE )) ?>><?php echo esc_html( $v ) ?></option>
627
+ <?php endforeach; ?>
628
+ </select>
629
+ <div class="field-helper">
630
+ </div>
631
+ </div>
632
+ </div>
633
+
634
  <div id="<?php $page->feed_field_id( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_CUSTOM_LABEL_0 ) ?>" class="form-group is-empty">
635
  <label for="<?php $page->feed_field_name( Configuration::OPTION_FEED_CONFIG, Configuration::OPTION_MAP_CUSTOM_LABEL_0 ) ?>" class="control-label">
636
  custom_label_0
includes/admin/templates/parts/panels/set-facebook-pixel.php CHANGED
@@ -45,7 +45,10 @@ if ( ! defined( 'ABSPATH' ) ) {
45
  <div class="panel-body">
46
  <article class="sub-panel sub-panel-px-id form-group<?php $page->field_class( 'aepc_pixel_id', array( ! empty( $fb ) && $fb->is_logged_in() ? 'disabled' : '' ) ) ?>">
47
  <div class="control-label">
48
- <h3 class="tit"><?php _e( 'Manual Setup', 'pixel-caffeine' ) ?> <a href="#_" class="btn btn-fab btn-help btn-fab-mini"></a></h3>
 
 
 
49
  </div>
50
 
51
  <?php if ( empty( $fb ) || ! $fb->is_logged_in() ) : ?>
45
  <div class="panel-body">
46
  <article class="sub-panel sub-panel-px-id form-group<?php $page->field_class( 'aepc_pixel_id', array( ! empty( $fb ) && $fb->is_logged_in() ? 'disabled' : '' ) ) ?>">
47
  <div class="control-label">
48
+ <h3 class="tit">
49
+ <?php _e( 'Manual Setup', 'pixel-caffeine' ) ?>
50
+ <a href="#_" class="btn btn-fab btn-help btn-fab-mini"data-toggle="tooltip" data-placement="top" title="<?php _e( 'Set the Pixel ID to use in the pages manually.', 'pixel-caffeine' ) ?>"></a>
51
+ </h3>
52
  </div>
53
 
54
  <?php if ( empty( $fb ) || ! $fb->is_logged_in() ) : ?>
includes/class-aepc-addon-product-item.php CHANGED
@@ -471,7 +471,7 @@ class AEPC_Addon_Product_Item {
471
  /**
472
  * Get the price
473
  *
474
- * @return string
475
  */
476
  public function get_price() {
477
  return $this->data['price'];
@@ -480,7 +480,7 @@ class AEPC_Addon_Product_Item {
480
  /**
481
  * Set the price
482
  *
483
- * @param string $price
484
  *
485
  * @return self $this
486
  */
@@ -535,6 +535,48 @@ class AEPC_Addon_Product_Item {
535
  return $this;
536
  }
537
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
538
  /**
539
  * Get if the product needs shipping
540
  *
471
  /**
472
  * Get the price
473
  *
474
+ * @return float
475
  */
476
  public function get_price() {
477
  return $this->data['price'];
480
  /**
481
  * Set the price
482
  *
483
+ * @param float $price
484
  *
485
  * @return self $this
486
  */
535
  return $this;
536
  }
537
 
538
+ /**
539
+ * Get the tax amount
540
+ *
541
+ * @return float
542
+ */
543
+ public function get_price_tax() {
544
+ return $this->data['price_tax'];
545
+ }
546
+
547
+ /**
548
+ * Set the tax amount
549
+ *
550
+ * @param string $price_tax
551
+ *
552
+ * @return self $this
553
+ */
554
+ public function set_price_tax( $price_tax ) {
555
+ $this->data['price_tax'] = $price_tax;
556
+ return $this;
557
+ }
558
+
559
+ /**
560
+ * Get the tax amount
561
+ *
562
+ * @return float
563
+ */
564
+ public function get_sale_price_tax() {
565
+ return $this->data['sale_price_tax'];
566
+ }
567
+
568
+ /**
569
+ * Set the tax amount
570
+ *
571
+ * @param string $sale_price_tax
572
+ *
573
+ * @return self $this
574
+ */
575
+ public function set_sale_price_tax( $sale_price_tax ) {
576
+ $this->data['sale_price_tax'] = $sale_price_tax;
577
+ return $this;
578
+ }
579
+
580
  /**
581
  * Get if the product needs shipping
582
  *
includes/class-aepc-track.php CHANGED
@@ -96,6 +96,9 @@ class AEPC_Track {
96
  unset( $placeholders[ $key ] );
97
  }
98
 
 
 
 
99
  // Translate all placeholders in the params array.
100
  $event_params = json_decode( str_replace( array_keys( $placeholders ), array_values( $placeholders ), wp_json_encode( $event_params ) ), true );
101
 
@@ -291,6 +294,26 @@ class AEPC_Track {
291
  return $params;
292
  }
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  /**
295
  * Get all conversion events saved on DB
296
  */
96
  unset( $placeholders[ $key ] );
97
  }
98
 
99
+ // Resolve eventual &amp; or other HTMl entities comes back from database
100
+ $event_params = self::unescape_values( $event_params );
101
+
102
  // Translate all placeholders in the params array.
103
  $event_params = json_decode( str_replace( array_keys( $placeholders ), array_values( $placeholders ), wp_json_encode( $event_params ) ), true );
104
 
294
  return $params;
295
  }
296
 
297
+ /**
298
+ * Remove all escaped values from parameters
299
+ *
300
+ * @param string|array $value
301
+ *
302
+ * @return string|array
303
+ */
304
+ public static function unescape_values( $value ) {
305
+ if ( is_array( $value ) ) {
306
+ return array_map( [ __CLASS__, 'unescape_values' ], $value );
307
+ }
308
+
309
+ // Remove HTML entities
310
+ if ( is_string( $value ) ) {
311
+ $value = html_entity_decode( $value );
312
+ }
313
+
314
+ return $value;
315
+ }
316
+
317
  /**
318
  * Get all conversion events saved on DB
319
  */
includes/product-catalogs/class-configuration-defaults.php CHANGED
@@ -46,6 +46,8 @@ class ConfigurationDefaults {
46
  Configuration::OPTION_PRODUCTS_COUNT => 0,
47
  Configuration::OPTION_MAP_BRAND => trim( get_bloginfo('name') ),
48
  Configuration::OPTION_MAP_CONDITION => 'new',
 
 
49
  Configuration::OPTION_MAP_CUSTOM_LABEL_0 => '',
50
  Configuration::OPTION_MAP_CUSTOM_LABEL_1 => '',
51
  Configuration::OPTION_MAP_CUSTOM_LABEL_2 => '',
46
  Configuration::OPTION_PRODUCTS_COUNT => 0,
47
  Configuration::OPTION_MAP_BRAND => trim( get_bloginfo('name') ),
48
  Configuration::OPTION_MAP_CONDITION => 'new',
49
+ Configuration::OPTION_MAP_DESCRIPTION => 'full-description',
50
+ Configuration::OPTION_MAP_PRICE => 'price-no-tax',
51
  Configuration::OPTION_MAP_CUSTOM_LABEL_0 => '',
52
  Configuration::OPTION_MAP_CUSTOM_LABEL_1 => '',
53
  Configuration::OPTION_MAP_CUSTOM_LABEL_2 => '',
includes/product-catalogs/class-configuration.php CHANGED
@@ -34,6 +34,8 @@ class Configuration {
34
 
35
  const OPTION_MAP_BRAND = 'map_brand_field';
36
  const OPTION_MAP_CONDITION = 'map_condition_field';
 
 
37
  const OPTION_MAP_CUSTOM_LABEL_0 = 'map_custom_label_0_field';
38
  const OPTION_MAP_CUSTOM_LABEL_1 = 'map_custom_label_1_field';
39
  const OPTION_MAP_CUSTOM_LABEL_2 = 'map_custom_label_2_field';
34
 
35
  const OPTION_MAP_BRAND = 'map_brand_field';
36
  const OPTION_MAP_CONDITION = 'map_condition_field';
37
+ const OPTION_MAP_DESCRIPTION = 'map_description';
38
+ const OPTION_MAP_PRICE = 'map_price';
39
  const OPTION_MAP_CUSTOM_LABEL_0 = 'map_custom_label_0_field';
40
  const OPTION_MAP_CUSTOM_LABEL_1 = 'map_custom_label_1_field';
41
  const OPTION_MAP_CUSTOM_LABEL_2 = 'map_custom_label_2_field';
includes/product-catalogs/class-feed-mapper.php CHANGED
@@ -129,7 +129,13 @@ class FeedMapper {
129
  * @throws FeedException
130
  */
131
  public function get_description() {
132
- $value = apply_filters( 'aepc_feed_item_description', $this->item->get_description(), $this );
 
 
 
 
 
 
133
 
134
  if ( empty( $value ) ) {
135
  throw FeedException::mandatoryField( 'description', $this->item );
@@ -163,7 +169,16 @@ class FeedMapper {
163
  * @throws FeedException
164
  */
165
  public function get_image_url() {
166
- $image_link = set_url_scheme( $this->item->get_image_url(), array( 'http', 'https' ) );
 
 
 
 
 
 
 
 
 
167
  $value = apply_filters( 'aepc_feed_item_image_link', $image_link, $this );
168
 
169
  if ( empty( $value ) ) {
@@ -259,7 +274,14 @@ class FeedMapper {
259
  * @return string
260
  */
261
  public function get_price() {
262
- return $this->esc_price( $this->item->get_price() );
 
 
 
 
 
 
 
263
  }
264
 
265
  /**
@@ -268,7 +290,19 @@ class FeedMapper {
268
  * @return string
269
  */
270
  public function get_sale_price() {
271
- return ( $price = $this->item->get_sale_price() ) ? $this->esc_price( $price ) : null;
 
 
 
 
 
 
 
 
 
 
 
 
272
  }
273
 
274
  /**
129
  * @throws FeedException
130
  */
131
  public function get_description() {
132
+ if ( $this->configuration->get( Configuration::OPTION_MAP_DESCRIPTION ) === 'short-description' ) {
133
+ $description = $this->item->get_short_description();
134
+ } else {
135
+ $description = $this->item->get_description();
136
+ }
137
+
138
+ $value = apply_filters( 'aepc_feed_item_description', $description, $this );
139
 
140
  if ( empty( $value ) ) {
141
  throw FeedException::mandatoryField( 'description', $this->item );
169
  * @throws FeedException
170
  */
171
  public function get_image_url() {
172
+ $image_link = $this->item->get_image_url();
173
+ $image_link = set_url_scheme( $image_link );
174
+
175
+ // Force absolute
176
+ if ( preg_match( '/^\/?wp-content\/(.*)$/', $image_link, $match ) ) {
177
+ $image_link = content_url( $match[1] );
178
+ } else if ( preg_match( '/^\/([^\/].*)/', $image_link, $match ) ) {
179
+ $image_link = home_url( $match[1] );
180
+ }
181
+
182
  $value = apply_filters( 'aepc_feed_item_image_link', $image_link, $this );
183
 
184
  if ( empty( $value ) ) {
274
  * @return string
275
  */
276
  public function get_price() {
277
+ $price = $this->item->get_price();
278
+ $price_tax = $this->item->get_price_tax();
279
+
280
+ if ( $this->configuration->get( Configuration::OPTION_MAP_PRICE ) === 'price-including-tax' ) {
281
+ $price += $price_tax;
282
+ }
283
+
284
+ return $this->esc_price( $price );
285
  }
286
 
287
  /**
290
  * @return string
291
  */
292
  public function get_sale_price() {
293
+ $sale_price = $this->item->get_sale_price();
294
+
295
+ if ( $sale_price > 0 ) {
296
+ $sale_price_tax = $this->item->get_sale_price_tax();
297
+
298
+ if ( $this->configuration->get( Configuration::OPTION_MAP_PRICE ) === 'price-including-tax' ) {
299
+ $sale_price += $sale_price_tax;
300
+ }
301
+
302
+ return $this->esc_price( $sale_price );
303
+ }
304
+
305
+ return null;
306
  }
307
 
308
  /**
includes/supports/class-aepc-edd-addon-support.php CHANGED
@@ -374,6 +374,7 @@ class AEPC_Edd_Addon_Support extends AEPC_Addon_Factory implements ECommerceAddO
374
  $product_slug = $product->post_name;
375
  $product_description = $product->post_content ?: $product->post_excerpt;
376
  $product_price = ( $price_id = edd_get_default_variable_price( $product_id ) ) !== false ? edd_get_price_option_amount( $product_id, $price_id ) : $product->get_price();
 
377
 
378
  $product_item
379
  ->set_id( $product_id )
@@ -389,7 +390,9 @@ class AEPC_Edd_Addon_Support extends AEPC_Addon_Factory implements ECommerceAddO
389
  ->set_additional_image_urls( array() )
390
  ->set_currency( edd_get_currency() )
391
  ->set_price( $product_price )
 
392
  ->set_sale_price( null )
 
393
  ->set_checkout_url( $this->get_checkout_url() )
394
  ->set_if_needs_shipping( false )
395
  ->set_shipping_weight( null )
374
  $product_slug = $product->post_name;
375
  $product_description = $product->post_content ?: $product->post_excerpt;
376
  $product_price = ( $price_id = edd_get_default_variable_price( $product_id ) ) !== false ? edd_get_price_option_amount( $product_id, $price_id ) : $product->get_price();
377
+ $product_price_tax = edd_calculate_tax( $product_price );
378
 
379
  $product_item
380
  ->set_id( $product_id )
390
  ->set_additional_image_urls( array() )
391
  ->set_currency( edd_get_currency() )
392
  ->set_price( $product_price )
393
+ ->set_price_tax( $product_price_tax )
394
  ->set_sale_price( null )
395
+ ->set_sale_price_tax( null )
396
  ->set_checkout_url( $this->get_checkout_url() )
397
  ->set_if_needs_shipping( false )
398
  ->set_shipping_weight( null )
includes/supports/class-aepc-woocommerce-addon-support.php CHANGED
@@ -486,6 +486,20 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
486
  $product_additional_image_ids = array_map( 'wp_get_attachment_url', method_exists( $product, 'get_gallery_image_ids' ) ? $product->get_gallery_image_ids() : $product->get_gallery_attachment_ids() );
487
  $product_parent_id = method_exists( $product, 'get_parent_id' ) ? $product->get_parent_id() : ( isset( $product->parent->id ) ? $product->parent->id : 0 );
488
  $product_image_link = isset( $image_parts[1] ) ? $image_parts[1] : null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489
 
490
  // If variation description is empty get it from parent
491
  if ( $product_is_variation && empty( $product_description ) ) {
@@ -516,8 +530,10 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
516
  ->set_image_url( $product_image_link )
517
  ->set_additional_image_urls( array_filter( $product_additional_image_ids ) )
518
  ->set_currency( get_woocommerce_currency() )
519
- ->set_price( floatval( $product->is_type('variable') ? $product->get_price() : $product->get_regular_price() ) )
520
- ->set_sale_price( $product->get_sale_price() )
 
 
521
  ->set_checkout_url( $this->get_checkout_url() )
522
  ->set_if_needs_shipping( $product->needs_shipping() )
523
  ->set_shipping_weight( $product->get_weight() )
@@ -572,10 +588,11 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
572
  public function customize_wp_query( \WP_Query &$wp_query ) {
573
  $products_query = $this->_current_query;
574
  $product_catalog = $this->_current_query_product_catalog;
 
575
 
576
  // Add meta query manually for versions before of 3.1, when no 'stock_status' was available
577
  if ( isset( $products_query['stock_status'] ) && version_compare( WC()->version, '3.1.0', '<' ) ) {
578
- $wp_query->query_vars['meta_query'][] = array(
579
  'key' => '_stock_status',
580
  'compare' => 'IN',
581
  'value' => $products_query['stock_status']
@@ -583,26 +600,28 @@ class AEPC_Woocommerce_Addon_Support extends AEPC_Addon_Factory implements EComm
583
  }
584
 
585
  // Change compare condition in _stock_status meta query for newest WOO versions that don't allow values in a array
586
- foreach ( $wp_query->query_vars['meta_query'] as &$query ) {
587
  if ( $query['key'] === '_stock_status' && is_array( $query['value'] ) ) {
588
  $query['compare'] = 'IN';
589
  }
590
  }
591
 
592
  // Include variation items manually for 3.0.x version of Woo
593
- if ( in_array( 'variation', $products_query['type'] ) && ! is_array( $wp_query->query_vars['post_type'] ) ) {
594
- $wp_query->query_vars['post_type'] = array( 'product', 'product_variation' );
595
  }
596
 
597
  // Add feed status meta query
598
  $key = $this->get_feed_status_meta_key( $product_catalog );
599
  if ( isset( $products_query[ $key ] ) ) {
600
- $wp_query->query_vars['meta_query'][] = array(
601
  'key' => $this->get_feed_status_meta_key( $product_catalog ),
602
  'compare' => $products_query[ $key ] ? '=' : 'NOT EXISTS',
603
  'value' => $products_query[ $key ]
604
  );
605
  }
 
 
606
  }
607
 
608
  /**
486
  $product_additional_image_ids = array_map( 'wp_get_attachment_url', method_exists( $product, 'get_gallery_image_ids' ) ? $product->get_gallery_image_ids() : $product->get_gallery_attachment_ids() );
487
  $product_parent_id = method_exists( $product, 'get_parent_id' ) ? $product->get_parent_id() : ( isset( $product->parent->id ) ? $product->parent->id : 0 );
488
  $product_image_link = isset( $image_parts[1] ) ? $image_parts[1] : null;
489
+ $product_price = floatval( $product->is_type('variable') ? $product->get_price() : $product->get_regular_price() );
490
+ $product_sale_price = floatval( $product->get_sale_price() );
491
+
492
+ if ( wc_prices_include_tax() ) {
493
+ $product_price_tax = $product_price;
494
+ $product_sale_price_tax = $product_sale_price;
495
+ $product_price = wc_get_price_excluding_tax($product, ['price' => $product_price]);
496
+ $product_sale_price = wc_get_price_excluding_tax($product, ['price' => $product_sale_price]);
497
+ $product_price_tax -= $product_price;
498
+ $product_sale_price_tax -= $product_sale_price;
499
+ } else {
500
+ $product_price_tax = wc_get_price_including_tax($product, ['price' => $product_price]) - $product_price;
501
+ $product_sale_price_tax = wc_get_price_including_tax($product, ['price' => $product_sale_price]) - $product_sale_price;
502
+ }
503
 
504
  // If variation description is empty get it from parent
505
  if ( $product_is_variation && empty( $product_description ) ) {
530
  ->set_image_url( $product_image_link )
531
  ->set_additional_image_urls( array_filter( $product_additional_image_ids ) )
532
  ->set_currency( get_woocommerce_currency() )
533
+ ->set_price( $product_price )
534
+ ->set_price_tax( $product_price_tax )
535
+ ->set_sale_price( $product_sale_price )
536
+ ->set_sale_price_tax( $product_sale_price_tax )
537
  ->set_checkout_url( $this->get_checkout_url() )
538
  ->set_if_needs_shipping( $product->needs_shipping() )
539
  ->set_shipping_weight( $product->get_weight() )
588
  public function customize_wp_query( \WP_Query &$wp_query ) {
589
  $products_query = $this->_current_query;
590
  $product_catalog = $this->_current_query_product_catalog;
591
+ $meta_query = $wp_query->get('meta_query', array());
592
 
593
  // Add meta query manually for versions before of 3.1, when no 'stock_status' was available
594
  if ( isset( $products_query['stock_status'] ) && version_compare( WC()->version, '3.1.0', '<' ) ) {
595
+ $meta_query[] = array(
596
  'key' => '_stock_status',
597
  'compare' => 'IN',
598
  'value' => $products_query['stock_status']
600
  }
601
 
602
  // Change compare condition in _stock_status meta query for newest WOO versions that don't allow values in a array
603
+ foreach ( $meta_query as &$query ) {
604
  if ( $query['key'] === '_stock_status' && is_array( $query['value'] ) ) {
605
  $query['compare'] = 'IN';
606
  }
607
  }
608
 
609
  // Include variation items manually for 3.0.x version of Woo
610
+ if ( in_array( 'variation', $products_query['type'] ) && ! is_array( $wp_query->get('post_type') ) ) {
611
+ $wp_query->set('post_type', array( 'product', 'product_variation' ) );
612
  }
613
 
614
  // Add feed status meta query
615
  $key = $this->get_feed_status_meta_key( $product_catalog );
616
  if ( isset( $products_query[ $key ] ) ) {
617
+ $meta_query[] = array(
618
  'key' => $this->get_feed_status_meta_key( $product_catalog ),
619
  'compare' => $products_query[ $key ] ? '=' : 'NOT EXISTS',
620
  'value' => $products_query[ $key ]
621
  );
622
  }
623
+
624
+ $wp_query->set('meta_query', $meta_query );
625
  }
626
 
627
  /**
languages/pixel-caffeine.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Pixel Caffeine package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Pixel Caffeine 2.0.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pixel-caffeine\n"
7
- "POT-Creation-Date: 2018-03-19 14:22:03+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -136,12 +136,12 @@ msgid ""
136
  msgstr ""
137
 
138
  #: includes/admin/class-aepc-admin-ca.php:392
139
- #: includes/admin/class-aepc-admin-view.php:1262
140
  msgid "Now"
141
  msgstr ""
142
 
143
  #: includes/admin/class-aepc-admin-ca.php:394
144
- #: includes/admin/class-aepc-admin-view.php:1264
145
  #: includes/admin/templates/parts/widgets/news.php:38
146
  msgid "%s ago"
147
  msgstr ""
@@ -395,58 +395,74 @@ msgid "Product Tag"
395
  msgstr ""
396
 
397
  #: includes/admin/class-aepc-admin-view.php:1187
398
- msgid "New"
399
  msgstr ""
400
 
401
  #: includes/admin/class-aepc-admin-view.php:1188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
  msgid "Refurbished"
403
  msgstr ""
404
 
405
- #: includes/admin/class-aepc-admin-view.php:1189
406
  msgid "Used"
407
  msgstr ""
408
 
409
- #: includes/admin/class-aepc-admin-view.php:1200
410
  msgid "Thumbnail"
411
  msgstr ""
412
 
413
- #: includes/admin/class-aepc-admin-view.php:1201
414
  msgid "Medium"
415
  msgstr ""
416
 
417
- #: includes/admin/class-aepc-admin-view.php:1202
418
  msgid "Large"
419
  msgstr ""
420
 
421
- #: includes/admin/class-aepc-admin-view.php:1203
422
  msgid "Full Size"
423
  msgstr ""
424
 
425
- #: includes/admin/class-aepc-admin-view.php:1215
426
  msgid "Every Sunday"
427
  msgstr ""
428
 
429
- #: includes/admin/class-aepc-admin-view.php:1216
430
  msgid "Every Monday"
431
  msgstr ""
432
 
433
- #: includes/admin/class-aepc-admin-view.php:1217
434
  msgid "Every Tuesday"
435
  msgstr ""
436
 
437
- #: includes/admin/class-aepc-admin-view.php:1218
438
  msgid "Every Wednesday"
439
  msgstr ""
440
 
441
- #: includes/admin/class-aepc-admin-view.php:1219
442
  msgid "Every Thursday"
443
  msgstr ""
444
 
445
- #: includes/admin/class-aepc-admin-view.php:1220
446
  msgid "Every Friday"
447
  msgstr ""
448
 
449
- #: includes/admin/class-aepc-admin-view.php:1221
450
  msgid "Every Saturday"
451
  msgstr ""
452
 
@@ -705,7 +721,7 @@ msgstr ""
705
  msgid "Specified audience is too small."
706
  msgstr ""
707
 
708
- #: includes/admin/class-aepc-facebook-adapter.php:984
709
  msgid ""
710
  "Unable to create a product catalog because there isn't any business ID "
711
  "associated to your Ad account."
@@ -877,6 +893,12 @@ msgstr ""
877
  msgid "Track Custom Fields Based Events"
878
  msgstr ""
879
 
 
 
 
 
 
 
880
  #: includes/admin/templates/general-settings.php:80
881
  msgid ""
882
  "Start typing the name of the custom fields you want to track to create "
@@ -927,54 +949,60 @@ msgstr ""
927
  msgid "eCommerce plugin detected"
928
  msgstr ""
929
 
930
- #: includes/admin/templates/general-settings.php:177
931
  msgid "Track this eCommerce Conversions"
932
  msgstr ""
933
 
934
- #: includes/admin/templates/general-settings.php:190
 
 
 
 
 
 
935
  msgid "View product"
936
  msgstr ""
937
 
938
- #: includes/admin/templates/general-settings.php:203
939
  msgid "Add to cart"
940
  msgstr ""
941
 
942
- #: includes/admin/templates/general-settings.php:216
943
  msgid "View Checkout"
944
  msgstr ""
945
 
946
- #: includes/admin/templates/general-settings.php:229
947
  msgid "Add payment info"
948
  msgstr ""
949
 
950
- #: includes/admin/templates/general-settings.php:242
951
  #: includes/admin/templates/parts/forms/ca-filter.php:118
952
  msgid "Purchase"
953
  msgstr ""
954
 
955
- #: includes/admin/templates/general-settings.php:255
956
  #: includes/admin/templates/parts/forms/ca-filter.php:124
957
  msgid "Lead"
958
  msgstr ""
959
 
960
- #: includes/admin/templates/general-settings.php:268
961
  #: includes/admin/templates/parts/forms/ca-filter.php:130
962
  msgid "CompleteRegistration"
963
  msgstr ""
964
 
965
- #: includes/admin/templates/general-settings.php:278
966
  msgid "eCommerce plugin not detected"
967
  msgstr ""
968
 
969
- #: includes/admin/templates/general-settings.php:280
970
  msgid "You can still track custom conversions %shere%s"
971
  msgstr ""
972
 
973
- #: includes/admin/templates/general-settings.php:285
974
  msgid "Supported plugins"
975
  msgstr ""
976
 
977
- #: includes/admin/templates/general-settings.php:304
978
  #: includes/admin/templates/parts/modals/ca-edit.php:51
979
  #: includes/admin/templates/parts/modals/conversion-edit.php:51
980
  msgid "Save"
@@ -992,97 +1020,97 @@ msgstr ""
992
  msgid "Last 14 days"
993
  msgstr ""
994
 
995
- #: includes/admin/templates/parts/advanced-settings.php:24
996
  msgid "Advanced settings"
997
  msgstr ""
998
 
999
- #: includes/admin/templates/parts/advanced-settings.php:31
1000
  msgid "Tracking tools"
1001
  msgstr ""
1002
 
1003
- #: includes/admin/templates/parts/advanced-settings.php:59
1004
- #: includes/admin/templates/parts/advanced-settings.php:85
1005
  msgid "num"
1006
  msgstr ""
1007
 
1008
- #: includes/admin/templates/parts/advanced-settings.php:72
1009
  msgid ""
1010
  "Postpone the events fired on page load. It's useful to avoid to track "
1011
  "bouncing users that spends less time on pages."
1012
  msgstr ""
1013
 
1014
- #: includes/admin/templates/parts/advanced-settings.php:98
1015
  msgid ""
1016
  "Postpone the AdvancedEvents pixel that contains data for post ID, post "
1017
  "type, taxonomy, custom fields, so on."
1018
  msgstr ""
1019
 
1020
- #: includes/admin/templates/parts/advanced-settings.php:147
1021
  msgid "role"
1022
  msgstr ""
1023
 
1024
- #: includes/admin/templates/parts/advanced-settings.php:160
1025
  msgid ""
1026
  "Useful for those roles (such as Administrators) that don't want to track "
1027
  "pixels for themselves."
1028
  msgstr ""
1029
 
1030
- #: includes/admin/templates/parts/advanced-settings.php:173
1031
- #: includes/admin/templates/parts/advanced-settings.php:199
1032
  msgid "event"
1033
  msgstr ""
1034
 
1035
- #: includes/admin/templates/parts/advanced-settings.php:186
1036
  msgid ""
1037
  "Exclude \"value\" and \"currency\" parameters from the specified DPA "
1038
  "standard pixels."
1039
  msgstr ""
1040
 
1041
- #: includes/admin/templates/parts/advanced-settings.php:212
1042
  msgid ""
1043
  "Exclude \"content_ids\", \"content_type\" and \"content_name\" parameters "
1044
  "from the specified DPA standard pixels."
1045
  msgstr ""
1046
 
1047
- #: includes/admin/templates/parts/advanced-settings.php:220
1048
  msgid "Developers tools"
1049
  msgstr ""
1050
 
1051
- #: includes/admin/templates/parts/advanced-settings.php:228
1052
  msgid "Clear transients"
1053
  msgstr ""
1054
 
1055
- #: includes/admin/templates/parts/advanced-settings.php:229
1056
  msgid ""
1057
  "Reset all Facebook API cached to better performance. Rarely used, it is "
1058
  "useful to fix some data don't fetched from facebook."
1059
  msgstr ""
1060
 
1061
- #: includes/admin/templates/parts/advanced-settings.php:237
1062
  msgid "Enable debug mode"
1063
  msgstr ""
1064
 
1065
- #: includes/admin/templates/parts/advanced-settings.php:244
1066
  msgid ""
1067
  "You will be able to have a details dump of pixels events fired, on "
1068
  "javascript console of browser inspector."
1069
  msgstr ""
1070
 
1071
- #: includes/admin/templates/parts/advanced-settings.php:245
1072
  msgid "Note:"
1073
  msgstr ""
1074
 
1075
- #: includes/admin/templates/parts/advanced-settings.php:245
1076
  msgid ""
1077
  "by activating this mode, the pixels won't be sent to facebook, so a warning "
1078
  "is shown on Facebook Pixel Helper chrome extension."
1079
  msgstr ""
1080
 
1081
- #: includes/admin/templates/parts/advanced-settings.php:256
1082
  msgid "Reset Facebook Connection"
1083
  msgstr ""
1084
 
1085
- #: includes/admin/templates/parts/advanced-settings.php:257
1086
  msgid ""
1087
  "Reset facebook connection status when it is blocked by an error (you won't "
1088
  "lose any data)."
@@ -1102,7 +1130,7 @@ msgstr ""
1102
  #: includes/admin/templates/parts/fb-connect-logged-in.php:46
1103
  #: includes/admin/templates/parts/fb-connect-to-setup.php:41
1104
  #: includes/admin/templates/parts/modals/fb-connect-options.php:48
1105
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:72
1106
  msgid "Pixel ID"
1107
  msgstr ""
1108
 
@@ -1112,7 +1140,7 @@ msgstr ""
1112
 
1113
  #: includes/admin/templates/parts/fb-connect-logged-in.php:60
1114
  #: includes/admin/templates/parts/fb-connect-to-setup.php:54
1115
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:73
1116
  #: includes/admin/templates/parts/user-info.php:23
1117
  msgid "Disconnect"
1118
  msgstr ""
@@ -1121,6 +1149,10 @@ msgstr ""
1121
  msgid "Edit"
1122
  msgstr ""
1123
 
 
 
 
 
1124
  #: includes/admin/templates/parts/fb-connect-logged-out.php:24
1125
  msgid ""
1126
  "The easiest whay to get up and running with all the advanced features. "
@@ -1672,7 +1704,7 @@ msgid ""
1672
  "reference of a full field list: %s"
1673
  msgstr ""
1674
 
1675
- #: includes/admin/templates/parts/forms/product-catalog.php:692
1676
  msgid "Generate Feed File"
1677
  msgstr ""
1678
 
@@ -1957,29 +1989,33 @@ msgstr ""
1957
  msgid "Tracking is OFF!"
1958
  msgstr ""
1959
 
1960
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:48
1961
  msgid "Manual Setup"
1962
  msgstr ""
1963
 
1964
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:53
 
 
 
 
1965
  msgid "Warning"
1966
  msgstr ""
1967
 
1968
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:54
1969
  msgid "Only with Facebook Connect you'll have access to all the features"
1970
  msgstr ""
1971
 
1972
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:64
1973
  msgid "Insert your Pixel ID"
1974
  msgstr ""
1975
 
1976
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:78
1977
  msgid ""
1978
  "Great, You're using Facebook Connect to manage your Pixel. To change the "
1979
  "pixel being used click \"Edit\" on the bottom right of the next box!"
1980
  msgstr ""
1981
 
1982
- #: includes/admin/templates/parts/panels/set-facebook-pixel.php:103
1983
  msgid "Pixel position"
1984
  msgstr ""
1985
 
@@ -2532,48 +2568,48 @@ msgctxt "Short format of date without year"
2532
  msgid "m/d"
2533
  msgstr ""
2534
 
2535
- #: includes/admin/templates/parts/advanced-settings.php:37
2536
  msgctxt "pixel-caffeine"
2537
  msgid "Force to use product IDs even if there is a SKU defined"
2538
  msgstr ""
2539
 
2540
- #: includes/admin/templates/parts/advanced-settings.php:55
2541
  msgctxt "%1$s is an input text, the other strong tags"
2542
  msgid "Delay %2$sPageView%3$s pixel firing of %1$s seconds"
2543
  msgstr ""
2544
 
2545
- #: includes/admin/templates/parts/advanced-settings.php:81
2546
  msgctxt "%1$s is an input text, the other strong tags"
2547
  msgid ""
2548
  "Delay %2$sAdvancedEvents%3$s and %2$sCustom Conversions%3$s pixels firing "
2549
  "of %1$s seconds"
2550
  msgstr ""
2551
 
2552
- #: includes/admin/templates/parts/advanced-settings.php:143
2553
  msgctxt "%1$s is an input text, the other strong tags"
2554
  msgid "Don't fire the pixels if the user is logged in as %1$s"
2555
  msgstr ""
2556
 
2557
- #: includes/admin/templates/parts/advanced-settings.php:169
2558
  msgctxt "%1$s is an input text, the other strong tags"
2559
  msgid "Don't track \"value\" when following events are fired: %1$s"
2560
  msgstr ""
2561
 
2562
- #: includes/admin/templates/parts/advanced-settings.php:195
2563
  msgctxt "%1$s is an input text, the other strong tags"
2564
  msgid ""
2565
  "Don't track \"content_ids\", \"content_type\" and \"content_name\" when "
2566
  "following events are fired: %1$s"
2567
  msgstr ""
2568
 
2569
- #: includes/admin/templates/parts/advanced-settings.php:107
2570
  msgctxt "%1$s and %2$s are for strong tag"
2571
  msgid ""
2572
  "Do not track variable products as %1$sproduct_group%2$s in the conversion "
2573
  "events"
2574
  msgstr ""
2575
 
2576
- #: includes/admin/templates/parts/advanced-settings.php:125
2577
  msgctxt "%1$s and %2$s are for strong tag"
2578
  msgid ""
2579
  "Track %1$sshipping costs%2$s into %1$sPurchase%2$s and "
2
  # This file is distributed under the same license as the Pixel Caffeine package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Pixel Caffeine 2.0.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pixel-caffeine\n"
7
+ "POT-Creation-Date: 2018-04-12 12:51:18+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
136
  msgstr ""
137
 
138
  #: includes/admin/class-aepc-admin-ca.php:392
139
+ #: includes/admin/class-aepc-admin-view.php:1286
140
  msgid "Now"
141
  msgstr ""
142
 
143
  #: includes/admin/class-aepc-admin-ca.php:394
144
+ #: includes/admin/class-aepc-admin-view.php:1288
145
  #: includes/admin/templates/parts/widgets/news.php:38
146
  msgid "%s ago"
147
  msgstr ""
395
  msgstr ""
396
 
397
  #: includes/admin/class-aepc-admin-view.php:1187
398
+ msgid "Full Description"
399
  msgstr ""
400
 
401
  #: includes/admin/class-aepc-admin-view.php:1188
402
+ msgid "Short Description"
403
+ msgstr ""
404
+
405
+ #: includes/admin/class-aepc-admin-view.php:1199
406
+ msgid "Price excluding tax"
407
+ msgstr ""
408
+
409
+ #: includes/admin/class-aepc-admin-view.php:1200
410
+ msgid "Price including tax"
411
+ msgstr ""
412
+
413
+ #: includes/admin/class-aepc-admin-view.php:1211
414
+ msgid "New"
415
+ msgstr ""
416
+
417
+ #: includes/admin/class-aepc-admin-view.php:1212
418
  msgid "Refurbished"
419
  msgstr ""
420
 
421
+ #: includes/admin/class-aepc-admin-view.php:1213
422
  msgid "Used"
423
  msgstr ""
424
 
425
+ #: includes/admin/class-aepc-admin-view.php:1224
426
  msgid "Thumbnail"
427
  msgstr ""
428
 
429
+ #: includes/admin/class-aepc-admin-view.php:1225
430
  msgid "Medium"
431
  msgstr ""
432
 
433
+ #: includes/admin/class-aepc-admin-view.php:1226
434
  msgid "Large"
435
  msgstr ""
436
 
437
+ #: includes/admin/class-aepc-admin-view.php:1227
438
  msgid "Full Size"
439
  msgstr ""
440
 
441
+ #: includes/admin/class-aepc-admin-view.php:1239
442
  msgid "Every Sunday"
443
  msgstr ""
444
 
445
+ #: includes/admin/class-aepc-admin-view.php:1240
446
  msgid "Every Monday"
447
  msgstr ""
448
 
449
+ #: includes/admin/class-aepc-admin-view.php:1241
450
  msgid "Every Tuesday"
451
  msgstr ""
452
 
453
+ #: includes/admin/class-aepc-admin-view.php:1242
454
  msgid "Every Wednesday"
455
  msgstr ""
456
 
457
+ #: includes/admin/class-aepc-admin-view.php:1243
458
  msgid "Every Thursday"
459
  msgstr ""
460
 
461
+ #: includes/admin/class-aepc-admin-view.php:1244
462
  msgid "Every Friday"
463
  msgstr ""
464
 
465
+ #: includes/admin/class-aepc-admin-view.php:1245
466
  msgid "Every Saturday"
467
  msgstr ""
468
 
721
  msgid "Specified audience is too small."
722
  msgstr ""
723
 
724
+ #: includes/admin/class-aepc-facebook-adapter.php:990
725
  msgid ""
726
  "Unable to create a product catalog because there isn't any business ID "
727
  "associated to your Ad account."
893
  msgid "Track Custom Fields Based Events"
894
  msgstr ""
895
 
896
+ #: includes/admin/templates/general-settings.php:69
897
+ msgid ""
898
+ "Automatically add the value of specific post metas you define below in the "
899
+ "pixel that Pixel Caffeine will track."
900
+ msgstr ""
901
+
902
  #: includes/admin/templates/general-settings.php:80
903
  msgid ""
904
  "Start typing the name of the custom fields you want to track to create "
949
  msgid "eCommerce plugin detected"
950
  msgstr ""
951
 
952
+ #: includes/admin/templates/general-settings.php:178
953
  msgid "Track this eCommerce Conversions"
954
  msgstr ""
955
 
956
+ #: includes/admin/templates/general-settings.php:179
957
+ msgid ""
958
+ "Enable the DPA event you want to track for your website. Pixel Caffeine "
959
+ "will automatically track it when they should from the supported plugins."
960
+ msgstr ""
961
+
962
+ #: includes/admin/templates/general-settings.php:193
963
  msgid "View product"
964
  msgstr ""
965
 
966
+ #: includes/admin/templates/general-settings.php:206
967
  msgid "Add to cart"
968
  msgstr ""
969
 
970
+ #: includes/admin/templates/general-settings.php:219
971
  msgid "View Checkout"
972
  msgstr ""
973
 
974
+ #: includes/admin/templates/general-settings.php:232
975
  msgid "Add payment info"
976
  msgstr ""
977
 
978
+ #: includes/admin/templates/general-settings.php:245
979
  #: includes/admin/templates/parts/forms/ca-filter.php:118
980
  msgid "Purchase"
981
  msgstr ""
982
 
983
+ #: includes/admin/templates/general-settings.php:258
984
  #: includes/admin/templates/parts/forms/ca-filter.php:124
985
  msgid "Lead"
986
  msgstr ""
987
 
988
+ #: includes/admin/templates/general-settings.php:271
989
  #: includes/admin/templates/parts/forms/ca-filter.php:130
990
  msgid "CompleteRegistration"
991
  msgstr ""
992
 
993
+ #: includes/admin/templates/general-settings.php:281
994
  msgid "eCommerce plugin not detected"
995
  msgstr ""
996
 
997
+ #: includes/admin/templates/general-settings.php:283
998
  msgid "You can still track custom conversions %shere%s"
999
  msgstr ""
1000
 
1001
+ #: includes/admin/templates/general-settings.php:288
1002
  msgid "Supported plugins"
1003
  msgstr ""
1004
 
1005
+ #: includes/admin/templates/general-settings.php:307
1006
  #: includes/admin/templates/parts/modals/ca-edit.php:51
1007
  #: includes/admin/templates/parts/modals/conversion-edit.php:51
1008
  msgid "Save"
1020
  msgid "Last 14 days"
1021
  msgstr ""
1022
 
1023
+ #: includes/admin/templates/parts/advanced-settings.php:20
1024
  msgid "Advanced settings"
1025
  msgstr ""
1026
 
1027
+ #: includes/admin/templates/parts/advanced-settings.php:27
1028
  msgid "Tracking tools"
1029
  msgstr ""
1030
 
1031
+ #: includes/admin/templates/parts/advanced-settings.php:55
1032
+ #: includes/admin/templates/parts/advanced-settings.php:81
1033
  msgid "num"
1034
  msgstr ""
1035
 
1036
+ #: includes/admin/templates/parts/advanced-settings.php:68
1037
  msgid ""
1038
  "Postpone the events fired on page load. It's useful to avoid to track "
1039
  "bouncing users that spends less time on pages."
1040
  msgstr ""
1041
 
1042
+ #: includes/admin/templates/parts/advanced-settings.php:94
1043
  msgid ""
1044
  "Postpone the AdvancedEvents pixel that contains data for post ID, post "
1045
  "type, taxonomy, custom fields, so on."
1046
  msgstr ""
1047
 
1048
+ #: includes/admin/templates/parts/advanced-settings.php:143
1049
  msgid "role"
1050
  msgstr ""
1051
 
1052
+ #: includes/admin/templates/parts/advanced-settings.php:156
1053
  msgid ""
1054
  "Useful for those roles (such as Administrators) that don't want to track "
1055
  "pixels for themselves."
1056
  msgstr ""
1057
 
1058
+ #: includes/admin/templates/parts/advanced-settings.php:169
1059
+ #: includes/admin/templates/parts/advanced-settings.php:195
1060
  msgid "event"
1061
  msgstr ""
1062
 
1063
+ #: includes/admin/templates/parts/advanced-settings.php:182
1064
  msgid ""
1065
  "Exclude \"value\" and \"currency\" parameters from the specified DPA "
1066
  "standard pixels."
1067
  msgstr ""
1068
 
1069
+ #: includes/admin/templates/parts/advanced-settings.php:208
1070
  msgid ""
1071
  "Exclude \"content_ids\", \"content_type\" and \"content_name\" parameters "
1072
  "from the specified DPA standard pixels."
1073
  msgstr ""
1074
 
1075
+ #: includes/admin/templates/parts/advanced-settings.php:216
1076
  msgid "Developers tools"
1077
  msgstr ""
1078
 
1079
+ #: includes/admin/templates/parts/advanced-settings.php:224
1080
  msgid "Clear transients"
1081
  msgstr ""
1082
 
1083
+ #: includes/admin/templates/parts/advanced-settings.php:225
1084
  msgid ""
1085
  "Reset all Facebook API cached to better performance. Rarely used, it is "
1086
  "useful to fix some data don't fetched from facebook."
1087
  msgstr ""
1088
 
1089
+ #: includes/admin/templates/parts/advanced-settings.php:233
1090
  msgid "Enable debug mode"
1091
  msgstr ""
1092
 
1093
+ #: includes/admin/templates/parts/advanced-settings.php:240
1094
  msgid ""
1095
  "You will be able to have a details dump of pixels events fired, on "
1096
  "javascript console of browser inspector."
1097
  msgstr ""
1098
 
1099
+ #: includes/admin/templates/parts/advanced-settings.php:241
1100
  msgid "Note:"
1101
  msgstr ""
1102
 
1103
+ #: includes/admin/templates/parts/advanced-settings.php:241
1104
  msgid ""
1105
  "by activating this mode, the pixels won't be sent to facebook, so a warning "
1106
  "is shown on Facebook Pixel Helper chrome extension."
1107
  msgstr ""
1108
 
1109
+ #: includes/admin/templates/parts/advanced-settings.php:252
1110
  msgid "Reset Facebook Connection"
1111
  msgstr ""
1112
 
1113
+ #: includes/admin/templates/parts/advanced-settings.php:253
1114
  msgid ""
1115
  "Reset facebook connection status when it is blocked by an error (you won't "
1116
  "lose any data)."
1130
  #: includes/admin/templates/parts/fb-connect-logged-in.php:46
1131
  #: includes/admin/templates/parts/fb-connect-to-setup.php:41
1132
  #: includes/admin/templates/parts/modals/fb-connect-options.php:48
1133
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:75
1134
  msgid "Pixel ID"
1135
  msgstr ""
1136
 
1140
 
1141
  #: includes/admin/templates/parts/fb-connect-logged-in.php:60
1142
  #: includes/admin/templates/parts/fb-connect-to-setup.php:54
1143
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:76
1144
  #: includes/admin/templates/parts/user-info.php:23
1145
  msgid "Disconnect"
1146
  msgstr ""
1149
  msgid "Edit"
1150
  msgstr ""
1151
 
1152
+ #: includes/admin/templates/parts/fb-connect-logged-out.php:21
1153
+ msgid "Connect your Ad account in Pixel Caffeine"
1154
+ msgstr ""
1155
+
1156
  #: includes/admin/templates/parts/fb-connect-logged-out.php:24
1157
  msgid ""
1158
  "The easiest whay to get up and running with all the advanced features. "
1704
  "reference of a full field list: %s"
1705
  msgstr ""
1706
 
1707
+ #: includes/admin/templates/parts/forms/product-catalog.php:730
1708
  msgid "Generate Feed File"
1709
  msgstr ""
1710
 
1989
  msgid "Tracking is OFF!"
1990
  msgstr ""
1991
 
1992
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:49
1993
  msgid "Manual Setup"
1994
  msgstr ""
1995
 
1996
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:50
1997
+ msgid "Set the Pixel ID to use in the pages manually."
1998
+ msgstr ""
1999
+
2000
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:56
2001
  msgid "Warning"
2002
  msgstr ""
2003
 
2004
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:57
2005
  msgid "Only with Facebook Connect you'll have access to all the features"
2006
  msgstr ""
2007
 
2008
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:67
2009
  msgid "Insert your Pixel ID"
2010
  msgstr ""
2011
 
2012
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:81
2013
  msgid ""
2014
  "Great, You're using Facebook Connect to manage your Pixel. To change the "
2015
  "pixel being used click \"Edit\" on the bottom right of the next box!"
2016
  msgstr ""
2017
 
2018
+ #: includes/admin/templates/parts/panels/set-facebook-pixel.php:106
2019
  msgid "Pixel position"
2020
  msgstr ""
2021
 
2568
  msgid "m/d"
2569
  msgstr ""
2570
 
2571
+ #: includes/admin/templates/parts/advanced-settings.php:33
2572
  msgctxt "pixel-caffeine"
2573
  msgid "Force to use product IDs even if there is a SKU defined"
2574
  msgstr ""
2575
 
2576
+ #: includes/admin/templates/parts/advanced-settings.php:51
2577
  msgctxt "%1$s is an input text, the other strong tags"
2578
  msgid "Delay %2$sPageView%3$s pixel firing of %1$s seconds"
2579
  msgstr ""
2580
 
2581
+ #: includes/admin/templates/parts/advanced-settings.php:77
2582
  msgctxt "%1$s is an input text, the other strong tags"
2583
  msgid ""
2584
  "Delay %2$sAdvancedEvents%3$s and %2$sCustom Conversions%3$s pixels firing "
2585
  "of %1$s seconds"
2586
  msgstr ""
2587
 
2588
+ #: includes/admin/templates/parts/advanced-settings.php:139
2589
  msgctxt "%1$s is an input text, the other strong tags"
2590
  msgid "Don't fire the pixels if the user is logged in as %1$s"
2591
  msgstr ""
2592
 
2593
+ #: includes/admin/templates/parts/advanced-settings.php:165
2594
  msgctxt "%1$s is an input text, the other strong tags"
2595
  msgid "Don't track \"value\" when following events are fired: %1$s"
2596
  msgstr ""
2597
 
2598
+ #: includes/admin/templates/parts/advanced-settings.php:191
2599
  msgctxt "%1$s is an input text, the other strong tags"
2600
  msgid ""
2601
  "Don't track \"content_ids\", \"content_type\" and \"content_name\" when "
2602
  "following events are fired: %1$s"
2603
  msgstr ""
2604
 
2605
+ #: includes/admin/templates/parts/advanced-settings.php:103
2606
  msgctxt "%1$s and %2$s are for strong tag"
2607
  msgid ""
2608
  "Do not track variable products as %1$sproduct_group%2$s in the conversion "
2609
  "events"
2610
  msgstr ""
2611
 
2612
+ #: includes/admin/templates/parts/advanced-settings.php:121
2613
  msgctxt "%1$s and %2$s are for strong tag"
2614
  msgid ""
2615
  "Track %1$sshipping costs%2$s into %1$sPurchase%2$s and "
pixel-caffeine.php CHANGED
@@ -7,9 +7,9 @@
7
  * Author URI: https://adespresso.com/
8
  * Text Domain: pixel-caffeine
9
  * Domain Path: /languages
10
- * Version: 2.0.3
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 3.3.0
13
  *
14
  * @package PixelCaffeine
15
  */
@@ -24,12 +24,12 @@ if ( ! class_exists( 'PixelCaffeine' ) ) :
24
  * Main PixelCaffeine Class.
25
  *
26
  * @class PixelCaffeine
27
- * @version 2.0.3
28
  */
29
  final class PixelCaffeine {
30
 
31
  /** @var string PixelCaffeine version. */
32
- public $version = '2.0.3';
33
 
34
  /** @var PixelCaffeine The single instance of the class. */
35
  protected static $_instance = null;
7
  * Author URI: https://adespresso.com/
8
  * Text Domain: pixel-caffeine
9
  * Domain Path: /languages
10
+ * Version: 2.0.4
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 3.3.5
13
  *
14
  * @package PixelCaffeine
15
  */
24
  * Main PixelCaffeine Class.
25
  *
26
  * @class PixelCaffeine
27
+ * @version 2.0.4
28
  */
29
  final class PixelCaffeine {
30
 
31
  /** @var string PixelCaffeine version. */
32
+ public $version = '2.0.4';
33
 
34
  /** @var PixelCaffeine The single instance of the class. */
35
  protected static $_instance = null;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: facebook, facebook pixel, facebook ad, facebook insertions, custom audienc
5
  Requires at least: 4.4
6
  Requires PHP: 5.3.9
7
  Tested up to: 4.9.5
8
- Stable tag: 2.0.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -124,6 +124,14 @@ Unfortunately there isn’t any way at the moment to import custom audiences _fr
124
 
125
  == Changelog ==
126
 
 
 
 
 
 
 
 
 
127
  = 2.0.3 - 2018-03-19 =
128
  * Add - Variation ID in the mandatory field error when the item in error is variation
129
  * Add - Get variation description from the parent if it is empty
5
  Requires at least: 4.4
6
  Requires PHP: 5.3.9
7
  Tested up to: 4.9.5
8
+ Stable tag: 2.0.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
124
 
125
  == Changelog ==
126
 
127
+ = 2.0.4 - 2018-04-12
128
+ * Add - New option to choose a short description as description for the feed item
129
+ * Add - New option to choose if price must be including or excluding tax
130
+ * Fix - Changed deprecated FB API calls about product catalog. **It's mandatory to upgrade Pixel Caffeine before May 8th 2018 in order to have the product catalog functionality working.**
131
+ * Fix - Invalid argument supplied for foreach PHP warning
132
+ * Fix - Encoded &amp; detected when a "&" symbol char is present in category or tag
133
+ * Fix - Force to absolute URL the image link in the feed
134
+
135
  = 2.0.3 - 2018-03-19 =
136
  * Add - Variation ID in the mandatory field error when the item in error is variation
137
  * Add - Get variation description from the parent if it is empty
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit6880367e104b250d67e4b151040e7df2::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit1071b6f5f67d462443daf0a3c54e153f::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit6880367e104b250d67e4b151040e7df2
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit6880367e104b250d67e4b151040e7df2
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit6880367e104b250d67e4b151040e7df2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit6880367e104b250d67e4b151040e7df2', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit6880367e104b250d67e4b151040e7df2::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit1071b6f5f67d462443daf0a3c54e153f
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit1071b6f5f67d462443daf0a3c54e153f', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit1071b6f5f67d462443daf0a3c54e153f', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit1071b6f5f67d462443daf0a3c54e153f::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit6880367e104b250d67e4b151040e7df2
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
@@ -104,9 +104,9 @@ class ComposerStaticInit6880367e104b250d67e4b151040e7df2
104
  public static function getInitializer(ClassLoader $loader)
105
  {
106
  return \Closure::bind(function () use ($loader) {
107
- $loader->prefixLengthsPsr4 = ComposerStaticInit6880367e104b250d67e4b151040e7df2::$prefixLengthsPsr4;
108
- $loader->prefixDirsPsr4 = ComposerStaticInit6880367e104b250d67e4b151040e7df2::$prefixDirsPsr4;
109
- $loader->classMap = ComposerStaticInit6880367e104b250d67e4b151040e7df2::$classMap;
110
 
111
  }, null, ClassLoader::class);
112
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit1071b6f5f67d462443daf0a3c54e153f
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
104
  public static function getInitializer(ClassLoader $loader)
105
  {
106
  return \Closure::bind(function () use ($loader) {
107
+ $loader->prefixLengthsPsr4 = ComposerStaticInit1071b6f5f67d462443daf0a3c54e153f::$prefixLengthsPsr4;
108
+ $loader->prefixDirsPsr4 = ComposerStaticInit1071b6f5f67d462443daf0a3c54e153f::$prefixDirsPsr4;
109
+ $loader->classMap = ComposerStaticInit1071b6f5f67d462443daf0a3c54e153f::$classMap;
110
 
111
  }, null, ClassLoader::class);
112
  }