Version Description
15.11.2022
- Tweak: Added current_user_can checks for a few functions.
- Tweak: Added a safeguard in case too many products are requested from the server.
- Tweak: Added filter to disable the Facebook pixel in the Facebook for WooCommerce plugin, if Facebook tracking is enabled in the Pixel Manager.
- Tweak: Switched back to the previous method to attach most of the events to DOM elements, as the old method looks like to be compatible with more themes.
- Tweak: Added filter to exclude domains from tracking.
- Tweak: Updated third party libraries.
- Tweak: Include PMW version it filename of settings export file.
- Fix: Fixed an edge case where get_pmw_tracked_payment_methods would throw an error if no orders were found.
- Fix: Fixed generation of precompressed admin .js files.
Download this release
Release Info
Developer | alekv |
Plugin | Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more |
Version | 1.27.0 |
Comparing to | |
See all releases |
Code changes from version 1.26.0 to 1.27.0
- classes/admin/class-admin.php +168 -11
- classes/admin/class-ask-for-rating.php +16 -3
- classes/admin/class-debug-info.php +8 -9
- classes/admin/class-documentation.php +12 -3
- classes/admin/class-environment-check.php +26 -4
- classes/admin/class-notification-handlers.php +20 -0
- classes/admin/class-validations.php +68 -8
- classes/class-database.php +234 -0
- classes/class-deprecated-filters.php +10 -1
- classes/class-helpers.php +77 -0
- classes/class-options.php +195 -0
- classes/class-product.php +376 -0
- classes/class-shop.php +522 -0
- classes/pixels/class-pixel-manager.php +105 -65
- classes/pixels/class-pixel.php +0 -3
- classes/pixels/class-shortcodes.php +2 -3
- classes/pixels/facebook/class-facebook-pixel-manager.php +0 -2
- classes/pixels/google/class-google-analytics.php +0 -3
- classes/pixels/google/class-google-pixel-manager.php +2 -4
- classes/pixels/google/class-google.php +10 -12
- js/admin/ask-for-rating.js +5 -3
- js/admin/edit-order-page.js +28 -0
- js/admin/environment-check.js +52 -48
- js/admin/helpers.js +2 -2
- js/admin/notifications.js +5 -4
- js/admin/wpm-admin-freemius.p1.min.js.br +0 -0
- js/admin/wpm-admin-freemius.p1.min.js.gz +0 -0
- js/admin/wpm-admin-freemius.p1.min.js.map.gz +0 -0
- js/admin/wpm-admin.p1.min.js +1 -1
- js/admin/wpm-admin.p1.min.js.br +0 -0
- js/admin/wpm-admin.p1.min.js.gz +0 -0
- js/admin/wpm-admin.p1.min.js.map +1 -1
- js/admin/wpm-admin.p1.min.js.map.gz +0 -0
- js/public/wpm-public.p1.min.js +1 -1
- js/public/wpm-public.p1.min.js.br +0 -0
- js/public/wpm-public.p1.min.js.gz +0 -0
- js/public/wpm-public.p1.min.js.map +1 -1
- languages/woocommerce-google-adwords-conversion-tracking-tag.pot +275 -248
- readme.txt +17 -2
- vendor/autoload.php +15 -2
- vendor/composer/installed.json +39 -40
- vendor/composer/installed.php +17 -17
- vendor/freemius/wordpress-sdk/assets/css/admin/account.css +1 -1
- vendor/freemius/wordpress-sdk/assets/css/admin/add-ons.css +1 -2
- vendor/freemius/wordpress-sdk/assets/css/admin/affiliation.css +1 -1
- vendor/freemius/wordpress-sdk/assets/css/admin/clone-resolution.css +1 -0
- vendor/freemius/wordpress-sdk/assets/css/admin/common.css +1 -2
- vendor/freemius/wordpress-sdk/assets/css/admin/connect.css +1 -1
- vendor/freemius/wordpress-sdk/assets/css/admin/debug.css +1 -1
- vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css +1 -2
- vendor/freemius/wordpress-sdk/assets/css/admin/gdpr-optin-notice.css +1 -1
- vendor/freemius/wordpress-sdk/assets/css/admin/optout.css +1 -0
- vendor/freemius/wordpress-sdk/assets/css/customizer.css +1 -1
- vendor/freemius/wordpress-sdk/config.php +5 -5
- vendor/freemius/wordpress-sdk/includes/class-freemius-abstract.php +4 -63
- vendor/freemius/wordpress-sdk/includes/class-freemius.php +1731 -861
classes/admin/class-admin.php
CHANGED
@@ -5,7 +5,6 @@ namespace WCPM\Classes\Admin;
|
|
5 |
|
6 |
use WCPM\Classes\Helpers ;
|
7 |
use WCPM\Classes\Pixels\Google\Google ;
|
8 |
-
use WCPM\Classes\Pixels\Trait_Shop ;
|
9 |
use WP_Post ;
|
10 |
|
11 |
if ( !defined( 'ABSPATH' ) ) {
|
@@ -15,7 +14,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
15 |
|
16 |
class Admin
|
17 |
{
|
18 |
-
use Trait_Shop ;
|
19 |
public $ip ;
|
20 |
protected $text_domain ;
|
21 |
protected $options ;
|
@@ -100,11 +98,13 @@ class Admin
|
|
100 |
return "\n\t\tfunction ( response ) {\n\n let\n isTrial = (null != response.purchase.trial_ends),\n isSubscription = (null != response.purchase.initial_amount),\n total = isTrial ? 0 : (isSubscription ? response.purchase.initial_amount : response.purchase.gross).toString(),\n productName = 'Pixel Manager for WooCommerce',\n // storeUrl = 'https://sweetcode.com',\n storeName = 'SweetCode';\n \n window.dataLayer = window.dataLayer || [];\n\n function gtag() {\n dataLayer.push(arguments);\n }\n \n gtag('js', new Date()); \n \n gtag('config', 'UA-39746956-10', {'anonymize_ip': true});\n gtag('config', 'G-2QE000DX8D');\n gtag('config', 'AW-406204436');\n \n gtag('event', 'purchase', {\n 'send_to':['UA-39746956-10', 'G-2QE000DX8D'],\n 'transaction_id':response.purchase.id.toString(),\n 'currency': response.purchase.currency.toUpperCase(),\n 'discount':0,\n 'items':[{\n 'id':response.purchase.plan_id.toString(),\n 'quantity':1,\n 'price':total,\n 'name':productName,\n 'category': 'Plugin',\n }],\n 'affiliation': storeName,\n 'value':response.purchase.initial_amount.toString()\n });\n \n gtag('event', 'conversion', {\n 'send_to': 'AW-406204436/XrUYCK3J8YoCEJTg2MEB',\n 'value': response.purchase.initial_amount.toString(),\n 'currency': response.purchase.currency.toUpperCase(),\n 'transaction_id': response.purchase.id.toString()\n });\n \n !function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '257839909406661');\n fbq('track', 'PageView');\n \n fbq('track', 'Purchase', {\n currency: 'USD',\n value: total\n });\n \n var _dcq = _dcq || [];\n\t\t\tvar _dcs = _dcs || {};\n\t\t\t_dcs.account = '5594556';\n\t\n\t\t\t(function() {\n\t\t\t\tvar dc = document.createElement('script');\n\t\t\t\tdc.type = 'text/javascript'; dc.async = true;\n\t\t\t\tdc.src = '//tag.getdrip.com/5594556.js';\n\t\t\t\tvar s = document.getElementsByTagName('script')[0];\n\t\t\t\ts.parentNode.insertBefore(dc, s);\n\t\t\t})();\n\t\t\t\n\t\t\twindow._dcq.push([\n\t\t\t\t'track',\n\t\t\t\t'Placed an order',\n\t\t\t]);\n\t\t\t\n\t\t\twindow._dcq.push([\n\t\t\t\t'track',\n\t\t\t\t'purchase',\n\t\t\t\t{\n\t\t\t\t\tvalue: total * 100,\n\t\t\t\t\tcurrency_code: response.purchase.currency.toUpperCase(),\n\t\t\t\t}\n\t\t\t]);\n \n }";
|
101 |
}
|
102 |
|
|
|
103 |
public function fs_inject_additional_scripts( $html )
|
104 |
{
|
105 |
return '<script async src="https://www.googletagmanager.com/gtag/js?id=UA-39746956-10"></script>' . $html;
|
106 |
}
|
107 |
|
|
|
108 |
public function wpm_admin_css( $hook_suffix )
|
109 |
{
|
110 |
// Only output the css on PMW pages and the order page
|
@@ -166,7 +166,7 @@ class Admin
|
|
166 |
//
|
167 |
wp_enqueue_script(
|
168 |
'pmw-edit-order',
|
169 |
-
WPM_PLUGIN_DIR_PATH . 'js/admin/edit-order.js',
|
170 |
[ 'jquery' ],
|
171 |
WPM_CURRENT_VERSION,
|
172 |
false
|
@@ -418,6 +418,7 @@ class Admin
|
|
418 |
|
419 |
if ( wpm_fs()->is__premium_only() || $this->pro_version_demo_active() ) {
|
420 |
$this->add_section_advanced_subsection_facebook( $section_ids );
|
|
|
421 |
$this->add_section_advanced_subsection_cookie_consent_mgmt( $section_ids );
|
422 |
}
|
423 |
|
@@ -780,8 +781,8 @@ class Admin
|
|
780 |
// add field for the Facebook CAPI user transparency send additional client identifiers
|
781 |
add_settings_field(
|
782 |
'wpm_setting_facebook_capi_user_transparency_send_additional_client_identifiers',
|
783 |
-
esc_html__( 'Meta (Facebook)
|
784 |
-
[ $this, '
|
785 |
'wpm_plugin_options_page',
|
786 |
$section_ids['settings_name']
|
787 |
);
|
@@ -799,6 +800,47 @@ class Admin
|
|
799 |
}
|
800 |
}
|
801 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
802 |
public function add_section_beta()
|
803 |
{
|
804 |
$section_ids = [
|
@@ -1279,7 +1321,7 @@ class Admin
|
|
1279 |
<td>=</td>
|
1280 |
<td>
|
1281 |
<?php
|
1282 |
-
$percent =
|
1283 |
|
1284 |
if ( $order_count_total > 0 ) {
|
1285 |
esc_html_e( $percent . '%' );
|
@@ -1424,7 +1466,9 @@ class Admin
|
|
1424 |
<button
|
1425 |
id="debug-info-button"
|
1426 |
type="button"
|
1427 |
-
onclick="wpm.saveSettingsToDisk(
|
|
|
|
|
1428 |
><?php
|
1429 |
esc_html_e( 'Export to disk', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
1430 |
?></button>
|
@@ -2705,7 +2749,7 @@ class Admin
|
|
2705 |
|
2706 |
}
|
2707 |
|
2708 |
-
public function
|
2709 |
{
|
2710 |
// adding the hidden input is a hack to make WordPress save the option with the value zero,
|
2711 |
// instead of not saving it and remove that array key entirely
|
@@ -2725,12 +2769,12 @@ class Admin
|
|
2725 |
?>
|
2726 |
/>
|
2727 |
<?php
|
2728 |
-
esc_html_e( '
|
2729 |
?>
|
2730 |
</label>
|
2731 |
<?php
|
2732 |
$this->get_status_icon( $this->options['facebook']['capi']['user_transparency']['send_additional_client_identifiers'], $this->options['facebook']['pixel_id'], true );
|
2733 |
-
$this->get_documentation_html_by_key( '
|
2734 |
$this->html_pro_feature();
|
2735 |
|
2736 |
if ( $this->options['facebook']['capi']['user_transparency']['send_additional_client_identifiers'] && !$this->options['facebook']['pixel_id'] ) {
|
@@ -2776,6 +2820,110 @@ class Admin
|
|
2776 |
|
2777 |
}
|
2778 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2779 |
public function wpm_setting_html_order_duplication_prevention()
|
2780 |
{
|
2781 |
// adding the hidden input is a hack to make WordPress save the option with the value zero,
|
@@ -3367,7 +3515,7 @@ class Admin
|
|
3367 |
|
3368 |
if ( !Validations::is_google_analytics_4_property_id( $input['google']['analytics']['ga4']['data_api']['property_id'] ) ) {
|
3369 |
$input['google']['analytics']['ga4']['data_api']['property_id'] = ( isset( $this->options['google']['analytics']['ga4']['data_api']['property_id'] ) ? $this->options['google']['analytics']['ga4']['data_api']['property_id'] : '' );
|
3370 |
-
add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-property-id', esc_html__( 'You have entered an invalid
|
3371 |
}
|
3372 |
|
3373 |
}
|
@@ -3487,6 +3635,15 @@ class Admin
|
|
3487 |
add_settings_error( 'wgact_plugin_options', 'invalid-tiktok-pixel-id', esc_html__( 'You have entered an invalid TikTok pixel ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
|
3488 |
}
|
3489 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3490 |
}
|
3491 |
// validate Hotjar site ID
|
3492 |
if ( isset( $input['hotjar']['site_id'] ) ) {
|
5 |
|
6 |
use WCPM\Classes\Helpers ;
|
7 |
use WCPM\Classes\Pixels\Google\Google ;
|
|
|
8 |
use WP_Post ;
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
|
15 |
class Admin
|
16 |
{
|
|
|
17 |
public $ip ;
|
18 |
protected $text_domain ;
|
19 |
protected $options ;
|
98 |
return "\n\t\tfunction ( response ) {\n\n let\n isTrial = (null != response.purchase.trial_ends),\n isSubscription = (null != response.purchase.initial_amount),\n total = isTrial ? 0 : (isSubscription ? response.purchase.initial_amount : response.purchase.gross).toString(),\n productName = 'Pixel Manager for WooCommerce',\n // storeUrl = 'https://sweetcode.com',\n storeName = 'SweetCode';\n \n window.dataLayer = window.dataLayer || [];\n\n function gtag() {\n dataLayer.push(arguments);\n }\n \n gtag('js', new Date()); \n \n gtag('config', 'UA-39746956-10', {'anonymize_ip': true});\n gtag('config', 'G-2QE000DX8D');\n gtag('config', 'AW-406204436');\n \n gtag('event', 'purchase', {\n 'send_to':['UA-39746956-10', 'G-2QE000DX8D'],\n 'transaction_id':response.purchase.id.toString(),\n 'currency': response.purchase.currency.toUpperCase(),\n 'discount':0,\n 'items':[{\n 'id':response.purchase.plan_id.toString(),\n 'quantity':1,\n 'price':total,\n 'name':productName,\n 'category': 'Plugin',\n }],\n 'affiliation': storeName,\n 'value':response.purchase.initial_amount.toString()\n });\n \n gtag('event', 'conversion', {\n 'send_to': 'AW-406204436/XrUYCK3J8YoCEJTg2MEB',\n 'value': response.purchase.initial_amount.toString(),\n 'currency': response.purchase.currency.toUpperCase(),\n 'transaction_id': response.purchase.id.toString()\n });\n \n !function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '257839909406661');\n fbq('track', 'PageView');\n \n fbq('track', 'Purchase', {\n currency: 'USD',\n value: total\n });\n \n var _dcq = _dcq || [];\n\t\t\tvar _dcs = _dcs || {};\n\t\t\t_dcs.account = '5594556';\n\t\n\t\t\t(function() {\n\t\t\t\tvar dc = document.createElement('script');\n\t\t\t\tdc.type = 'text/javascript'; dc.async = true;\n\t\t\t\tdc.src = '//tag.getdrip.com/5594556.js';\n\t\t\t\tvar s = document.getElementsByTagName('script')[0];\n\t\t\t\ts.parentNode.insertBefore(dc, s);\n\t\t\t})();\n\t\t\t\n\t\t\twindow._dcq.push([\n\t\t\t\t'track',\n\t\t\t\t'Placed an order',\n\t\t\t]);\n\t\t\t\n\t\t\twindow._dcq.push([\n\t\t\t\t'track',\n\t\t\t\t'purchase',\n\t\t\t\t{\n\t\t\t\t\tvalue: total * 100,\n\t\t\t\t\tcurrency_code: response.purchase.currency.toUpperCase(),\n\t\t\t\t}\n\t\t\t]);\n \n }";
|
99 |
}
|
100 |
|
101 |
+
// phpcs:disable
|
102 |
public function fs_inject_additional_scripts( $html )
|
103 |
{
|
104 |
return '<script async src="https://www.googletagmanager.com/gtag/js?id=UA-39746956-10"></script>' . $html;
|
105 |
}
|
106 |
|
107 |
+
// phpcs:enable
|
108 |
public function wpm_admin_css( $hook_suffix )
|
109 |
{
|
110 |
// Only output the css on PMW pages and the order page
|
166 |
//
|
167 |
wp_enqueue_script(
|
168 |
'pmw-edit-order',
|
169 |
+
WPM_PLUGIN_DIR_PATH . 'js/admin/edit-order-page.js',
|
170 |
[ 'jquery' ],
|
171 |
WPM_CURRENT_VERSION,
|
172 |
false
|
418 |
|
419 |
if ( wpm_fs()->is__premium_only() || $this->pro_version_demo_active() ) {
|
420 |
$this->add_section_advanced_subsection_facebook( $section_ids );
|
421 |
+
$this->add_section_advanced_subsection_tiktok( $section_ids );
|
422 |
$this->add_section_advanced_subsection_cookie_consent_mgmt( $section_ids );
|
423 |
}
|
424 |
|
781 |
// add field for the Facebook CAPI user transparency send additional client identifiers
|
782 |
add_settings_field(
|
783 |
'wpm_setting_facebook_capi_user_transparency_send_additional_client_identifiers',
|
784 |
+
esc_html__( 'Meta (Facebook): Advanced Matching', 'woocommerce-google-adwords-conversion-tracking-tag' ),
|
785 |
+
[ $this, 'pmw_setting_facebook_advanced_matching' ],
|
786 |
'wpm_plugin_options_page',
|
787 |
$section_ids['settings_name']
|
788 |
);
|
800 |
}
|
801 |
}
|
802 |
|
803 |
+
public function add_section_advanced_subsection_tiktok( $section_ids )
|
804 |
+
{
|
805 |
+
$sub_section_ids = [
|
806 |
+
'title' => 'TikTok',
|
807 |
+
'slug' => 'tiktok',
|
808 |
+
];
|
809 |
+
add_settings_field(
|
810 |
+
'wpm_plugin_subsection_' . $sub_section_ids['slug'] . '_opening_div',
|
811 |
+
esc_html__( $sub_section_ids['title'], 'woocommerce-google-adwords-conversion-tracking-tag' ),
|
812 |
+
function () use( $section_ids, $sub_section_ids ) {
|
813 |
+
$this->wpm_subsection_generic_opening_div_html( $section_ids, $sub_section_ids );
|
814 |
+
},
|
815 |
+
'wpm_plugin_options_page',
|
816 |
+
$section_ids['settings_name']
|
817 |
+
);
|
818 |
+
// Add field for the TikTok Events API token
|
819 |
+
add_settings_field(
|
820 |
+
'pmw_setting_tiktok_eapi_token',
|
821 |
+
esc_html__( 'TikTok Events API: token', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
|
822 |
+
[ $this, 'pmw_setting_html_tiktok_eapi_token' ],
|
823 |
+
'wpm_plugin_options_page',
|
824 |
+
$section_ids['settings_name']
|
825 |
+
);
|
826 |
+
// add field for the TikTok EAPI user transparency process anonymous hits
|
827 |
+
add_settings_field(
|
828 |
+
'pmw_setting_tiktok_eapi_user_transparency_process_anonymous_hits',
|
829 |
+
esc_html__( 'TikTok Events API: process anonymous hits', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
|
830 |
+
[ $this, 'pmw_setting_tiktok_eapi_process_anonymous_hits' ],
|
831 |
+
'wpm_plugin_options_page',
|
832 |
+
$section_ids['settings_name']
|
833 |
+
);
|
834 |
+
// add field for the TikTok Advanced Matching
|
835 |
+
add_settings_field(
|
836 |
+
'pmw_setting_tiktok_eapi_user_transparency_advanced_matching',
|
837 |
+
esc_html__( 'TikTok: Advanced Matching', 'woocommerce-google-adwords-conversion-tracking-tag' ) . $this->html_beta(),
|
838 |
+
[ $this, 'pmw_setting_tiktok_advanced_matching' ],
|
839 |
+
'wpm_plugin_options_page',
|
840 |
+
$section_ids['settings_name']
|
841 |
+
);
|
842 |
+
}
|
843 |
+
|
844 |
public function add_section_beta()
|
845 |
{
|
846 |
$section_ids = [
|
1321 |
<td>=</td>
|
1322 |
<td>
|
1323 |
<?php
|
1324 |
+
$percent = Helpers::get_percentage( $order_count_measured, $order_count_total );
|
1325 |
|
1326 |
if ( $order_count_total > 0 ) {
|
1327 |
esc_html_e( $percent . '%' );
|
1466 |
<button
|
1467 |
id="debug-info-button"
|
1468 |
type="button"
|
1469 |
+
onclick="wpm.saveSettingsToDisk('<?php
|
1470 |
+
esc_html_e( WPM_CURRENT_VERSION );
|
1471 |
+
?>')"
|
1472 |
><?php
|
1473 |
esc_html_e( 'Export to disk', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
1474 |
?></button>
|
2749 |
|
2750 |
}
|
2751 |
|
2752 |
+
public function pmw_setting_facebook_advanced_matching()
|
2753 |
{
|
2754 |
// adding the hidden input is a hack to make WordPress save the option with the value zero,
|
2755 |
// instead of not saving it and remove that array key entirely
|
2769 |
?>
|
2770 |
/>
|
2771 |
<?php
|
2772 |
+
esc_html_e( 'Send events with additional visitor identifiers, such as email and phone number, if available.', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
2773 |
?>
|
2774 |
</label>
|
2775 |
<?php
|
2776 |
$this->get_status_icon( $this->options['facebook']['capi']['user_transparency']['send_additional_client_identifiers'], $this->options['facebook']['pixel_id'], true );
|
2777 |
+
$this->get_documentation_html_by_key( 'facebook_advanced_matching' );
|
2778 |
$this->html_pro_feature();
|
2779 |
|
2780 |
if ( $this->options['facebook']['capi']['user_transparency']['send_additional_client_identifiers'] && !$this->options['facebook']['pixel_id'] ) {
|
2820 |
|
2821 |
}
|
2822 |
|
2823 |
+
public function pmw_setting_html_tiktok_eapi_token()
|
2824 |
+
{
|
2825 |
+
?>
|
2826 |
+
<textarea id='pmw_setting_tiktok_eapi_token'
|
2827 |
+
name='wgact_plugin_options[tiktok][eapi][token]'
|
2828 |
+
cols='60'
|
2829 |
+
rows='1'
|
2830 |
+
<?php
|
2831 |
+
esc_html_e( $this->disable_if_demo() );
|
2832 |
+
?>
|
2833 |
+
><?php
|
2834 |
+
esc_html_e( $this->options['tiktok']['eapi']['token'] );
|
2835 |
+
?></textarea>
|
2836 |
+
<?php
|
2837 |
+
$this->get_status_icon( $this->options['tiktok']['eapi']['token'], $this->options['tiktok']['pixel_id'] );
|
2838 |
+
$this->get_documentation_html_by_key( 'tiktok_eapi_token' );
|
2839 |
+
$this->html_pro_feature();
|
2840 |
+
|
2841 |
+
if ( !$this->options['tiktok']['pixel_id'] ) {
|
2842 |
+
?>
|
2843 |
+
<br><span class="dashicons dashicons-info"></span>
|
2844 |
+
<?php
|
2845 |
+
esc_html_e( 'You need to activate the TikTok pixel', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
2846 |
+
?>
|
2847 |
+
<?php
|
2848 |
+
}
|
2849 |
+
|
2850 |
+
// echo $this->get_documentation_html('/wgact/?utm_source=woocommerce-plugin&utm_medium=documentation-link&utm_campaign=pixel-manager-for-woocommerce-docs&utm_content=google-ads-conversion-id#/pixels/google-ads?id=configure-the-plugin');
|
2851 |
+
// esc_html_e('The conversion ID looks similar to this:', 'woocommerce-google-adwords-conversion-tracking-tag');
|
2852 |
+
// echo ' <i>123456789</i>';
|
2853 |
+
}
|
2854 |
+
|
2855 |
+
public function pmw_setting_tiktok_eapi_process_anonymous_hits()
|
2856 |
+
{
|
2857 |
+
// adding the hidden input is a hack to make WordPress save the option with the value zero,
|
2858 |
+
// instead of not saving it and remove that array key entirely
|
2859 |
+
// https://stackoverflow.com/a/1992745/4688612
|
2860 |
+
?>
|
2861 |
+
<label>
|
2862 |
+
<input type='hidden' value='0'
|
2863 |
+
name='wgact_plugin_options[tiktok][eapi][process_anonymous_hits]'>
|
2864 |
+
<input type='checkbox' id='pmw_setting_tiktok_eapi_process_anonymous_hits'
|
2865 |
+
name='wgact_plugin_options[tiktok][eapi][process_anonymous_hits]'
|
2866 |
+
value='1'
|
2867 |
+
<?php
|
2868 |
+
checked( $this->options['tiktok']['eapi']['process_anonymous_hits'] );
|
2869 |
+
?>
|
2870 |
+
<?php
|
2871 |
+
esc_html_e( $this->disable_if_demo() );
|
2872 |
+
?>
|
2873 |
+
/>
|
2874 |
+
<?php
|
2875 |
+
esc_html_e( 'Send Events API hits for anonymous visitors who likely have blocked the TikTok pixel.', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
2876 |
+
?>
|
2877 |
+
</label>
|
2878 |
+
<?php
|
2879 |
+
$this->get_status_icon( $this->options['tiktok']['eapi']['process_anonymous_hits'], $this->options['tiktok']['pixel_id'], true );
|
2880 |
+
$this->get_documentation_html_by_key( 'tiktok_eapi_process_anonymous_hits' );
|
2881 |
+
$this->html_pro_feature();
|
2882 |
+
|
2883 |
+
if ( $this->options['tiktok']['eapi']['process_anonymous_hits'] && !$this->options['tiktok']['pixel_id'] ) {
|
2884 |
+
echo '<p></p><span class="dashicons dashicons-info"></span>' ;
|
2885 |
+
esc_html_e( 'You need to activate the TikTok pixel', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
2886 |
+
echo '</p><br>' ;
|
2887 |
+
}
|
2888 |
+
|
2889 |
+
}
|
2890 |
+
|
2891 |
+
public function pmw_setting_tiktok_advanced_matching()
|
2892 |
+
{
|
2893 |
+
// adding the hidden input is a hack to make WordPress save the option with the value zero,
|
2894 |
+
// instead of not saving it and remove that array key entirely
|
2895 |
+
// https://stackoverflow.com/a/1992745/4688612
|
2896 |
+
?>
|
2897 |
+
<label>
|
2898 |
+
<input type='hidden' value='0'
|
2899 |
+
name='wgact_plugin_options[tiktok][advanced_matching]'>
|
2900 |
+
<input type='checkbox' id='pmw_setting_tiktok_advanced_matching'
|
2901 |
+
name='wgact_plugin_options[tiktok][advanced_matching]'
|
2902 |
+
value='1'
|
2903 |
+
<?php
|
2904 |
+
checked( $this->options['tiktok']['advanced_matching'] );
|
2905 |
+
?>
|
2906 |
+
<?php
|
2907 |
+
esc_html_e( $this->disable_if_demo() );
|
2908 |
+
?>
|
2909 |
+
/>
|
2910 |
+
<?php
|
2911 |
+
esc_html_e( 'Send events with additional visitor identifiers, such as email and phone number, if available.', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
2912 |
+
?>
|
2913 |
+
</label>
|
2914 |
+
<?php
|
2915 |
+
$this->get_status_icon( $this->options['tiktok']['advanced_matching'], $this->options['tiktok']['pixel_id'], true );
|
2916 |
+
$this->get_documentation_html_by_key( 'tiktok_advanced_matching' );
|
2917 |
+
$this->html_pro_feature();
|
2918 |
+
|
2919 |
+
if ( $this->options['tiktok']['advanced_matching'] && !$this->options['tiktok']['pixel_id'] ) {
|
2920 |
+
echo '<p></p><span class="dashicons dashicons-info"></span>' ;
|
2921 |
+
esc_html_e( 'You need to activate the TikTok pixel', 'woocommerce-google-adwords-conversion-tracking-tag' );
|
2922 |
+
echo '</p><br>' ;
|
2923 |
+
}
|
2924 |
+
|
2925 |
+
}
|
2926 |
+
|
2927 |
public function wpm_setting_html_order_duplication_prevention()
|
2928 |
{
|
2929 |
// adding the hidden input is a hack to make WordPress save the option with the value zero,
|
3515 |
|
3516 |
if ( !Validations::is_google_analytics_4_property_id( $input['google']['analytics']['ga4']['data_api']['property_id'] ) ) {
|
3517 |
$input['google']['analytics']['ga4']['data_api']['property_id'] = ( isset( $this->options['google']['analytics']['ga4']['data_api']['property_id'] ) ? $this->options['google']['analytics']['ga4']['data_api']['property_id'] : '' );
|
3518 |
+
add_settings_error( 'wgact_plugin_options', 'invalid-google-analytics-4-property-id', esc_html__( 'You have entered an invalid GA4 property ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
|
3519 |
}
|
3520 |
|
3521 |
}
|
3635 |
add_settings_error( 'wgact_plugin_options', 'invalid-tiktok-pixel-id', esc_html__( 'You have entered an invalid TikTok pixel ID.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
|
3636 |
}
|
3637 |
|
3638 |
+
}
|
3639 |
+
// Validate TikTok Events API access token
|
3640 |
+
if ( isset( $input['tiktok']['eapi']['token'] ) ) {
|
3641 |
+
|
3642 |
+
if ( !Validations::is_tiktok_eapi_access_token( $input['tiktok']['eapi']['token'] ) ) {
|
3643 |
+
$input['tiktok']['eapi']['token'] = ( isset( $this->options['tiktok']['eapi']['token'] ) ? $this->options['tiktok']['eapi']['token'] : '' );
|
3644 |
+
add_settings_error( 'wgact_plugin_options', 'invalid-tiktok-eapi-access-token', esc_html__( 'You have entered an invalid TikTok Events API access token.', 'woocommerce-google-adwords-conversion-tracking-tag' ) );
|
3645 |
+
}
|
3646 |
+
|
3647 |
}
|
3648 |
// validate Hotjar site ID
|
3649 |
if ( isset( $input['hotjar']['site_id'] ) ) {
|
classes/admin/class-ask-for-rating.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
5 |
use WCPM\Classes\Helpers;
|
6 |
-
use WCPM\Classes\Pixels\Trait_Shop;
|
7 |
|
8 |
if (!defined('ABSPATH')) {
|
9 |
exit; // Exit if accessed directly
|
@@ -11,8 +10,6 @@ if (!defined('ABSPATH')) {
|
|
11 |
|
12 |
class Ask_For_Rating {
|
13 |
|
14 |
-
use Trait_Shop;
|
15 |
-
|
16 |
private $option_name = WPM_DB_RATINGS;
|
17 |
|
18 |
private static $instance;
|
@@ -47,13 +44,29 @@ class Ask_For_Rating {
|
|
47 |
WPM_CURRENT_VERSION,
|
48 |
true
|
49 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
// server side php ajax handler for the admin rating notice
|
53 |
public function ajax_rating_notice_handler() {
|
54 |
|
|
|
|
|
|
|
|
|
55 |
$_post = Helpers::get_input_vars(INPUT_POST);
|
56 |
|
|
|
|
|
|
|
|
|
|
|
57 |
$set = $_post['set'];
|
58 |
|
59 |
$options = get_option($this->option_name);
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
5 |
use WCPM\Classes\Helpers;
|
|
|
6 |
|
7 |
if (!defined('ABSPATH')) {
|
8 |
exit; // Exit if accessed directly
|
10 |
|
11 |
class Ask_For_Rating {
|
12 |
|
|
|
|
|
13 |
private $option_name = WPM_DB_RATINGS;
|
14 |
|
15 |
private static $instance;
|
44 |
WPM_CURRENT_VERSION,
|
45 |
true
|
46 |
);
|
47 |
+
|
48 |
+
wp_localize_script(
|
49 |
+
'wpm-ask-for-rating',
|
50 |
+
'ajax_var', [
|
51 |
+
'url' => admin_url('admin-ajax.php'),
|
52 |
+
'nonce' => wp_create_nonce('ajax-nonce')
|
53 |
+
]);
|
54 |
}
|
55 |
|
56 |
// server side php ajax handler for the admin rating notice
|
57 |
public function ajax_rating_notice_handler() {
|
58 |
|
59 |
+
if (!current_user_can('manage_options')) {
|
60 |
+
wp_die();
|
61 |
+
}
|
62 |
+
|
63 |
$_post = Helpers::get_input_vars(INPUT_POST);
|
64 |
|
65 |
+
// Verify nonce
|
66 |
+
if (!isset($_post['nonce']) || !wp_verify_nonce($_post['nonce'], 'ajax-nonce')) {
|
67 |
+
wp_die();
|
68 |
+
}
|
69 |
+
|
70 |
$set = $_post['set'];
|
71 |
|
72 |
$options = get_option($this->option_name);
|
classes/admin/class-debug-info.php
CHANGED
@@ -4,7 +4,7 @@ namespace WCPM\Classes\Admin;
|
|
4 |
|
5 |
use Automattic\WooCommerce\Utilities\OrderUtil ;
|
6 |
use WCPM\Classes\Pixels\Pixel_Manager ;
|
7 |
-
use WCPM\Classes\
|
8 |
use WP_Query ;
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
@@ -14,7 +14,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
14 |
|
15 |
class Debug_Info
|
16 |
{
|
17 |
-
use Trait_Shop ;
|
18 |
protected $options ;
|
19 |
private static $instance ;
|
20 |
public static function get_instance()
|
@@ -248,7 +247,7 @@ class Debug_Info
|
|
248 |
$html .= ' ';
|
249 |
$html .= str_pad( $analysis['order_count_measured'], 3 ) . ' of ';
|
250 |
$html .= str_pad( $analysis['order_count_total'], 3 ) . ' = ';
|
251 |
-
$html .= str_pad(
|
252 |
$html .= 'for ' . $analysis['gateway_id'];
|
253 |
$html .= PHP_EOL;
|
254 |
}
|
@@ -275,7 +274,7 @@ class Debug_Info
|
|
275 |
$html .= PHP_EOL;
|
276 |
}
|
277 |
$html .= ' ' . str_pad( $order_count_measured, 4 ) . ' of ' . str_pad( $order_count_total, 4 ) . ' = ';
|
278 |
-
$html .=
|
279 |
$html .= PHP_EOL;
|
280 |
return $html;
|
281 |
}
|
@@ -291,7 +290,7 @@ class Debug_Info
|
|
291 |
public function generate_gateway_analysis_array()
|
292 |
{
|
293 |
$analysis = [];
|
294 |
-
if (
|
295 |
$this->generate_pmw_tracked_payment_methods();
|
296 |
}
|
297 |
foreach ( $this->get_pmw_tracked_payment_methods() as $gateway ) {
|
@@ -302,7 +301,7 @@ class Debug_Info
|
|
302 |
'gateway_id' => $gateway,
|
303 |
'order_count_total' => count( $gateway_orders ),
|
304 |
'order_count_measured' => $this->get_count_of_measured_orders( $gateway_orders ),
|
305 |
-
'percentage' => floor(
|
306 |
];
|
307 |
}
|
308 |
set_transient( 'pmw_tracking_accuracy_analysis', $analysis, MONTH_IN_SECONDS );
|
@@ -356,7 +355,7 @@ class Debug_Info
|
|
356 |
}
|
357 |
// Calculate percentage for each gateway
|
358 |
foreach ( $analysis as $gateway_id => $gateway_analysis ) {
|
359 |
-
$analysis[$gateway_id]['percentage'] = floor(
|
360 |
}
|
361 |
// Sort analysis by order_count_total descending
|
362 |
usort( $analysis, function ( $a, $b ) {
|
@@ -577,13 +576,13 @@ class Debug_Info
|
|
577 |
] ) );
|
578 |
}
|
579 |
|
580 |
-
// Get
|
581 |
private function get_pmw_tracked_payment_methods()
|
582 |
{
|
583 |
if ( get_transient( 'pmw_tracked_payment_methods' ) ) {
|
584 |
return get_transient( 'pmw_tracked_payment_methods' );
|
585 |
}
|
586 |
-
return
|
587 |
}
|
588 |
|
589 |
private function generate_pmw_tracked_payment_methods()
|
4 |
|
5 |
use Automattic\WooCommerce\Utilities\OrderUtil ;
|
6 |
use WCPM\Classes\Pixels\Pixel_Manager ;
|
7 |
+
use WCPM\Classes\Helpers ;
|
8 |
use WP_Query ;
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
14 |
|
15 |
class Debug_Info
|
16 |
{
|
|
|
17 |
protected $options ;
|
18 |
private static $instance ;
|
19 |
public static function get_instance()
|
247 |
$html .= ' ';
|
248 |
$html .= str_pad( $analysis['order_count_measured'], 3 ) . ' of ';
|
249 |
$html .= str_pad( $analysis['order_count_total'], 3 ) . ' = ';
|
250 |
+
$html .= str_pad( Helpers::get_percentage( $analysis['order_count_measured'], $analysis['order_count_total'] ) . '%', 5 );
|
251 |
$html .= 'for ' . $analysis['gateway_id'];
|
252 |
$html .= PHP_EOL;
|
253 |
}
|
274 |
$html .= PHP_EOL;
|
275 |
}
|
276 |
$html .= ' ' . str_pad( $order_count_measured, 4 ) . ' of ' . str_pad( $order_count_total, 4 ) . ' = ';
|
277 |
+
$html .= Helpers::get_percentage( $order_count_measured, $order_count_total ) . '%' . str_pad( '', 6 ) . 'total';
|
278 |
$html .= PHP_EOL;
|
279 |
return $html;
|
280 |
}
|
290 |
public function generate_gateway_analysis_array()
|
291 |
{
|
292 |
$analysis = [];
|
293 |
+
if ( empty($this->get_pmw_tracked_payment_methods()) ) {
|
294 |
$this->generate_pmw_tracked_payment_methods();
|
295 |
}
|
296 |
foreach ( $this->get_pmw_tracked_payment_methods() as $gateway ) {
|
301 |
'gateway_id' => $gateway,
|
302 |
'order_count_total' => count( $gateway_orders ),
|
303 |
'order_count_measured' => $this->get_count_of_measured_orders( $gateway_orders ),
|
304 |
+
'percentage' => floor( Helpers::get_percentage( $this->get_count_of_measured_orders( $gateway_orders ), count( $gateway_orders ) ) ),
|
305 |
];
|
306 |
}
|
307 |
set_transient( 'pmw_tracking_accuracy_analysis', $analysis, MONTH_IN_SECONDS );
|
355 |
}
|
356 |
// Calculate percentage for each gateway
|
357 |
foreach ( $analysis as $gateway_id => $gateway_analysis ) {
|
358 |
+
$analysis[$gateway_id]['percentage'] = floor( Helpers::get_percentage( $gateway_analysis['order_count_measured'], $gateway_analysis['order_count_total'] ) );
|
359 |
}
|
360 |
// Sort analysis by order_count_total descending
|
361 |
usort( $analysis, function ( $a, $b ) {
|
576 |
] ) );
|
577 |
}
|
578 |
|
579 |
+
// Get payment methods that have been used on all orders directly from database
|
580 |
private function get_pmw_tracked_payment_methods()
|
581 |
{
|
582 |
if ( get_transient( 'pmw_tracked_payment_methods' ) ) {
|
583 |
return get_transient( 'pmw_tracked_payment_methods' );
|
584 |
}
|
585 |
+
return [];
|
586 |
}
|
587 |
|
588 |
private function generate_pmw_tracked_payment_methods()
|
classes/admin/class-documentation.php
CHANGED
@@ -77,6 +77,15 @@ class Documentation {
|
|
77 |
'tiktok_pixel_id' => [
|
78 |
'default' => '/docs/wpm/plugin-configuration/tiktok',
|
79 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/tiktok/'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
'hotjar_site_id' => [
|
81 |
'default' => '/docs/wpm/plugin-configuration/hotjar#hotjar-site-id',
|
82 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/hotjar/#section-1'],
|
@@ -113,9 +122,9 @@ class Documentation {
|
|
113 |
'facebook_capi_user_transparency_process_anonymous_hits' => [
|
114 |
'default' => '/docs/wpm/plugin-configuration/meta#user-transparency-settings',
|
115 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-5'],
|
116 |
-
'
|
117 |
-
'default' => '/docs/wpm/plugin-configuration/meta#
|
118 |
-
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-
|
119 |
'facebook_microdata' => [
|
120 |
'default' => '/docs/wpm/plugin-configuration/meta#microdata-tags-for-catalogues',
|
121 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-8'],
|
77 |
'tiktok_pixel_id' => [
|
78 |
'default' => '/docs/wpm/plugin-configuration/tiktok',
|
79 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/tiktok/'],
|
80 |
+
'tiktok_advanced_matching' => [
|
81 |
+
'default' => '/docs/wpm/plugin-configuration/tiktok#tiktok-advanced-matching',
|
82 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/tiktok/#tiktok-advanced-matching'],
|
83 |
+
'tiktok_eapi_token' => [
|
84 |
+
'default' => '/docs/wpm/plugin-configuration/tiktok#access-token',
|
85 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/tiktok/#access-token'],
|
86 |
+
'tiktok_eapi_process_anonymous_hits' => [
|
87 |
+
'default' => '/docs/wpm/plugin-configuration/tiktok#process-anonymous-hits',
|
88 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/tiktok/#process-anonymous-hits'],
|
89 |
'hotjar_site_id' => [
|
90 |
'default' => '/docs/wpm/plugin-configuration/hotjar#hotjar-site-id',
|
91 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/hotjar/#section-1'],
|
122 |
'facebook_capi_user_transparency_process_anonymous_hits' => [
|
123 |
'default' => '/docs/wpm/plugin-configuration/meta#user-transparency-settings',
|
124 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-5'],
|
125 |
+
'facebook_advanced_matching' => [
|
126 |
+
'default' => '/docs/wpm/plugin-configuration/meta#meta-facebook-advanced-matching',
|
127 |
+
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-8'],
|
128 |
'facebook_microdata' => [
|
129 |
'default' => '/docs/wpm/plugin-configuration/meta#microdata-tags-for-catalogues',
|
130 |
'wcm' => '/document/pixel-manager-pro-for-woocommerce/pmw-plugin-configuration/facebook/#section-8'],
|
classes/admin/class-environment-check.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
5 |
use WCPM\Classes\Helpers;
|
6 |
-
use WCPM\Classes\
|
7 |
|
8 |
if (!defined('ABSPATH')) {
|
9 |
exit; // Exit if accessed directly
|
@@ -11,8 +11,6 @@ if (!defined('ABSPATH')) {
|
|
11 |
|
12 |
class Environment_Check {
|
13 |
|
14 |
-
use Trait_Shop;
|
15 |
-
|
16 |
private $order_redirect = null;
|
17 |
private $options;
|
18 |
private $wpm_ist_order_received_page;
|
@@ -88,6 +86,13 @@ class Environment_Check {
|
|
88 |
WPM_CURRENT_VERSION,
|
89 |
false
|
90 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
93 |
public function run_incompatible_plugins_checks() {
|
@@ -399,8 +404,17 @@ class Environment_Check {
|
|
399 |
|
400 |
public function ajax_environment_check_handler() {
|
401 |
|
|
|
|
|
|
|
|
|
402 |
$_post = Helpers::get_input_vars(INPUT_POST);
|
403 |
|
|
|
|
|
|
|
|
|
|
|
404 |
if (isset($_post['set'])) {
|
405 |
|
406 |
$set = $_post['set'];
|
@@ -1029,6 +1043,14 @@ class Environment_Check {
|
|
1029 |
add_filter('woocommerce_gla_disable_gtag_tracking', '__return_true');
|
1030 |
}
|
1031 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1032 |
/**
|
1033 |
* WooCommerce Gutenberg Blocks Google Analytics Tracking
|
1034 |
*
|
@@ -1533,7 +1555,7 @@ class Environment_Check {
|
|
1533 |
}
|
1534 |
|
1535 |
// Get value from WC or db
|
1536 |
-
$this->wpm_ist_order_received_page = is_order_received_page() ||
|
1537 |
return $this->wpm_ist_order_received_page;
|
1538 |
}
|
1539 |
}
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
5 |
use WCPM\Classes\Helpers;
|
6 |
+
use WCPM\Classes\Shop;
|
7 |
|
8 |
if (!defined('ABSPATH')) {
|
9 |
exit; // Exit if accessed directly
|
11 |
|
12 |
class Environment_Check {
|
13 |
|
|
|
|
|
14 |
private $order_redirect = null;
|
15 |
private $options;
|
16 |
private $wpm_ist_order_received_page;
|
86 |
WPM_CURRENT_VERSION,
|
87 |
false
|
88 |
);
|
89 |
+
|
90 |
+
wp_localize_script(
|
91 |
+
'wpm-notification',
|
92 |
+
'ajax_var', [
|
93 |
+
'url' => admin_url('admin-ajax.php'),
|
94 |
+
'nonce' => wp_create_nonce('ajax-nonce')
|
95 |
+
]);
|
96 |
}
|
97 |
|
98 |
public function run_incompatible_plugins_checks() {
|
404 |
|
405 |
public function ajax_environment_check_handler() {
|
406 |
|
407 |
+
if (!current_user_can('manage_options')) {
|
408 |
+
wp_die();
|
409 |
+
}
|
410 |
+
|
411 |
$_post = Helpers::get_input_vars(INPUT_POST);
|
412 |
|
413 |
+
// Verify nonce
|
414 |
+
if (!isset($_post['nonce']) || !wp_verify_nonce($_post['nonce'], 'ajax-nonce')) {
|
415 |
+
wp_die();
|
416 |
+
}
|
417 |
+
|
418 |
if (isset($_post['set'])) {
|
419 |
|
420 |
$set = $_post['set'];
|
1043 |
add_filter('woocommerce_gla_disable_gtag_tracking', '__return_true');
|
1044 |
}
|
1045 |
|
1046 |
+
/**
|
1047 |
+
* Facebook for WooCommerce
|
1048 |
+
*/
|
1049 |
+
|
1050 |
+
if ($this->is_pmw_facebook_active()) {
|
1051 |
+
add_filter('facebook_for_woocommerce_integration_pixel_enabled', '__return_false');
|
1052 |
+
}
|
1053 |
+
|
1054 |
/**
|
1055 |
* WooCommerce Gutenberg Blocks Google Analytics Tracking
|
1056 |
*
|
1555 |
}
|
1556 |
|
1557 |
// Get value from WC or db
|
1558 |
+
$this->wpm_ist_order_received_page = is_order_received_page() || Shop::is_valid_order_key_in_url();
|
1559 |
return $this->wpm_ist_order_received_page;
|
1560 |
}
|
1561 |
}
|
classes/admin/class-notification-handlers.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
|
|
|
|
5 |
if (!defined('ABSPATH')) {
|
6 |
exit; // Exit if accessed directly
|
7 |
}
|
@@ -34,10 +36,28 @@ class Notification_Handlers {
|
|
34 |
WPM_CURRENT_VERSION,
|
35 |
true
|
36 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
public function dismiss_payment_gateway_notification() {
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
error_log('dismiss_payment_gateway_notification');
|
42 |
|
43 |
|
2 |
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
5 |
+
use WCPM\Classes\Helpers;
|
6 |
+
|
7 |
if (!defined('ABSPATH')) {
|
8 |
exit; // Exit if accessed directly
|
9 |
}
|
36 |
WPM_CURRENT_VERSION,
|
37 |
true
|
38 |
);
|
39 |
+
|
40 |
+
wp_localize_script(
|
41 |
+
'pmw-admin-notifications',
|
42 |
+
'ajax_var', [
|
43 |
+
'url' => admin_url('admin-ajax.php'),
|
44 |
+
'nonce' => wp_create_nonce('ajax-nonce')
|
45 |
+
]);
|
46 |
}
|
47 |
|
48 |
public function dismiss_payment_gateway_notification() {
|
49 |
|
50 |
+
if (!current_user_can('manage_options')) {
|
51 |
+
wp_die();
|
52 |
+
}
|
53 |
+
|
54 |
+
$_post = Helpers::get_input_vars(INPUT_POST);
|
55 |
+
|
56 |
+
// Verify nonce
|
57 |
+
if (!isset($_post['nonce']) || !wp_verify_nonce($_post['nonce'], 'ajax-nonce')) {
|
58 |
+
wp_die();
|
59 |
+
}
|
60 |
+
|
61 |
error_log('dismiss_payment_gateway_notification');
|
62 |
|
63 |
|
classes/admin/class-validations.php
CHANGED
@@ -2,20 +2,70 @@
|
|
2 |
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
|
|
5 |
use WCPM\Classes\Helpers;
|
6 |
|
7 |
class Validations {
|
8 |
|
9 |
public static function validate_imported_options( $options ) {
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
}
|
|
|
|
|
17 |
}
|
18 |
|
|
|
19 |
public static function validate_ga4_data_api_credentials( $credentials ) {
|
20 |
|
21 |
// If $credentials is an empty array (thus the default empty value), return true
|
@@ -257,15 +307,25 @@ class Validations {
|
|
257 |
return self::validate_with_regex($re, $string);
|
258 |
}
|
259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
public static function validate_with_regex( $re, $string ) {
|
261 |
|
262 |
-
//
|
263 |
if (preg_match($re, $string)) {
|
264 |
return true;
|
265 |
-
} else {
|
266 |
-
return false;
|
267 |
}
|
268 |
|
|
|
|
|
269 |
// preg_match_all($re, $string, $matches, PREG_SET_ORDER, 0);
|
270 |
//
|
271 |
// if (isset($matches[0])) {
|
2 |
|
3 |
namespace WCPM\Classes\Admin;
|
4 |
|
5 |
+
use WCPM\Classes\Default_Options;
|
6 |
use WCPM\Classes\Helpers;
|
7 |
|
8 |
class Validations {
|
9 |
|
10 |
public static function validate_imported_options( $options ) {
|
11 |
|
12 |
+
$options_to_check = [
|
13 |
+
'google' => [
|
14 |
+
'ads' => [
|
15 |
+
'conversion_id' => '',
|
16 |
+
'conversion_label' => '',
|
17 |
+
],
|
18 |
+
'analytics' => [
|
19 |
+
'universal' => [
|
20 |
+
'property_id' => '',
|
21 |
+
],
|
22 |
+
'ga4' => [
|
23 |
+
'measurement_id' => '',
|
24 |
+
],
|
25 |
+
'link_attribution' => false,
|
26 |
+
],
|
27 |
+
'optimize' => [
|
28 |
+
'container_id' => '',
|
29 |
+
],
|
30 |
+
'consent_mode' => [
|
31 |
+
'active' => false,
|
32 |
+
'regions' => [],
|
33 |
+
],
|
34 |
+
'user_id' => false,
|
35 |
+
],
|
36 |
+
'facebook' => [
|
37 |
+
'pixel_id' => '',
|
38 |
+
],
|
39 |
+
'shop' => [
|
40 |
+
'order_total_logic' => 0,
|
41 |
+
],
|
42 |
+
'general' => [
|
43 |
+
'variations_output' => true,
|
44 |
+
],
|
45 |
+
'db_version' => WPM_DB_VERSION,
|
46 |
+
];
|
47 |
+
|
48 |
+
return self::do_all_keys_exist_recursive($options_to_check, $options);
|
49 |
+
}
|
50 |
+
|
51 |
+
private static function do_all_keys_exist_recursive( $partial_array, $full_array ) {
|
52 |
+
|
53 |
+
foreach ($partial_array as $key => $value) {
|
54 |
+
if (!array_key_exists($key, $full_array)) {
|
55 |
+
error_log('key not found: ' . $key);
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
if (is_array($value)) {
|
59 |
+
if (!self::do_all_keys_exist_recursive($value, $full_array[$key])) {
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
}
|
63 |
}
|
64 |
+
|
65 |
+
return true;
|
66 |
}
|
67 |
|
68 |
+
|
69 |
public static function validate_ga4_data_api_credentials( $credentials ) {
|
70 |
|
71 |
// If $credentials is an empty array (thus the default empty value), return true
|
307 |
return self::validate_with_regex($re, $string);
|
308 |
}
|
309 |
|
310 |
+
public static function is_tiktok_eapi_access_token( $string ) {
|
311 |
+
if (empty($string)) {
|
312 |
+
return true;
|
313 |
+
}
|
314 |
+
|
315 |
+
$re = '/^[\da-z]{30,50}$/m';
|
316 |
+
|
317 |
+
return self::validate_with_regex($re, $string);
|
318 |
+
}
|
319 |
+
|
320 |
public static function validate_with_regex( $re, $string ) {
|
321 |
|
322 |
+
// Validate if string matches the regex $re
|
323 |
if (preg_match($re, $string)) {
|
324 |
return true;
|
|
|
|
|
325 |
}
|
326 |
|
327 |
+
return false;
|
328 |
+
|
329 |
// preg_match_all($re, $string, $matches, PREG_SET_ORDER, 0);
|
330 |
//
|
331 |
// if (isset($matches[0])) {
|
classes/class-database.php
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Database functions
|
4 |
+
*/
|
5 |
+
|
6 |
+
// TODO Move Facebook Advanced Matching down to to ['facebook']['advanced_matching']
|
7 |
+
// TODO Move Facebook Send Anonymous Hits down one level to ['facebook']['capi']['process_anonymous_hits']
|
8 |
+
|
9 |
+
// TODO Strategy for saving backup versions:
|
10 |
+
// 1. Save version with version and timestamp ['db_version']['timestamp']
|
11 |
+
// On downgrade maybe take the latest version before the downgrade version from the backup
|
12 |
+
// Give the user the option to restore other timestamps of the same running version (if there are more than one)
|
13 |
+
// When upgrading again up to the newer version, either run the updater, or take the backup version for the higher version
|
14 |
+
// On downgrade, run pre install hook to save the current version as backup
|
15 |
+
|
16 |
+
namespace WCPM\Classes;
|
17 |
+
|
18 |
+
if (!defined('ABSPATH')) {
|
19 |
+
exit; // Exit if accessed directly
|
20 |
+
}
|
21 |
+
|
22 |
+
class Database {
|
23 |
+
|
24 |
+
private static $options_backup_name = 'wgact_options_backup';
|
25 |
+
|
26 |
+
public static function run_options_db_upgrade() {
|
27 |
+
|
28 |
+
$mysql_db_version = self::get_mysql_db_version();
|
29 |
+
|
30 |
+
// determine version and run version specific upgrade function
|
31 |
+
// check if options db version zero by looking if the old entries are still there.
|
32 |
+
if ('0' === $mysql_db_version) {
|
33 |
+
self::up_from_zero_to_1();
|
34 |
+
}
|
35 |
+
|
36 |
+
if (version_compare(2, $mysql_db_version, '>')) {
|
37 |
+
self::up_from_1_to_2();
|
38 |
+
}
|
39 |
+
|
40 |
+
if (version_compare(3, $mysql_db_version, '>')) {
|
41 |
+
self::up_from_2_to_3();
|
42 |
+
}
|
43 |
+
|
44 |
+
// TODO implement in Q1 2023
|
45 |
+
// if (version_compare(4, $mysql_db_version, '>')) {
|
46 |
+
// self::up_from_3_to_4();
|
47 |
+
// }
|
48 |
+
|
49 |
+
if (version_compare(WPM_DB_VERSION, $mysql_db_version, '<')) {
|
50 |
+
self::downgrade_db();
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
private static function downgrade_db() {
|
55 |
+
|
56 |
+
self::save_options_backup();
|
57 |
+
|
58 |
+
// Get the latest backup for version WPM_DB_VERSION
|
59 |
+
$options_backup = get_option(self::$options_backup_name);
|
60 |
+
|
61 |
+
// Run this if on a downgrade there is no backup of the options for the version of this plugin.
|
62 |
+
if (!isset($options_backup[WPM_DB_VERSION])) {
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Merge default options of this PMW version with the options from the db which are of a higher version during a downgrade.
|
66 |
+
* This way we can downgrade to a db version which has less options than the version in the db and avoid errors.
|
67 |
+
*/
|
68 |
+
$new_options = Options::update_with_defaults(Options::get_options(), Options::get_default_options());
|
69 |
+
$new_options['db_version'] = WPM_DB_VERSION;
|
70 |
+
|
71 |
+
update_option(WPM_DB_OPTIONS_NAME, $new_options);
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
|
75 |
+
// Run this if on a downgrade there is a backup of the options for this plugin version that has no timestamp yet.
|
76 |
+
if (is_string($options_backup[WPM_DB_VERSION])) {
|
77 |
+
|
78 |
+
$new_options = $options_backup[WPM_DB_VERSION];
|
79 |
+
update_option(WPM_DB_OPTIONS_NAME, $new_options);
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
|
83 |
+
// Run this if there is a backup of the options for this plugin version and has a timestamp.
|
84 |
+
// Then take the version with the latest timestamp.
|
85 |
+
if (is_array($options_backup[WPM_DB_VERSION])) {
|
86 |
+
|
87 |
+
// $options_backup[WPM_DB_VERSION] is an array of backups for the same version.
|
88 |
+
// Each key is a timestamp.
|
89 |
+
// Get the latest timestamp
|
90 |
+
$latest_timestamp = max(array_keys($options_backup[WPM_DB_VERSION]));
|
91 |
+
$new_options = $options_backup[WPM_DB_VERSION][$latest_timestamp];
|
92 |
+
update_option(WPM_DB_OPTIONS_NAME, $new_options);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
private static function up_from_zero_to_1() {
|
97 |
+
|
98 |
+
$option_name_old_1 = 'wgact_plugin_options_1';
|
99 |
+
$option_name_old_2 = 'wgact_plugin_options_2';
|
100 |
+
|
101 |
+
// db version place options into new array
|
102 |
+
$options = [
|
103 |
+
'conversion_id' => self::get_option_value_v1($option_name_old_1),
|
104 |
+
'conversion_label' => self::get_option_value_v1($option_name_old_2),
|
105 |
+
];
|
106 |
+
|
107 |
+
// store new option array into the options table
|
108 |
+
update_option(WPM_DB_OPTIONS_NAME, $options);
|
109 |
+
|
110 |
+
// delete old options
|
111 |
+
// only on single site
|
112 |
+
// we will run the multisite deletion only during uninstall
|
113 |
+
delete_option($option_name_old_1);
|
114 |
+
delete_option($option_name_old_2);
|
115 |
+
}
|
116 |
+
|
117 |
+
private function up_from_1_to_2() {
|
118 |
+
|
119 |
+
self::save_options_backup('1');
|
120 |
+
|
121 |
+
$options_old = get_option(WPM_DB_OPTIONS_NAME);
|
122 |
+
|
123 |
+
$options_new = [
|
124 |
+
'gads' => [
|
125 |
+
'conversion_id' => $options_old['conversion_id'],
|
126 |
+
'conversion_label' => $options_old['conversion_label'],
|
127 |
+
'order_total_logic' => $options_old['order_total_logic'],
|
128 |
+
'add_cart_data' => $options_old['add_cart_data'],
|
129 |
+
'aw_merchant_id' => $options_old['aw_merchant_id'],
|
130 |
+
'product_identifier' => $options_old['product_identifier'],
|
131 |
+
],
|
132 |
+
'gtag' => [
|
133 |
+
'deactivation' => $options_old['gtag_deactivation'],
|
134 |
+
],
|
135 |
+
'db_version' => '2',
|
136 |
+
];
|
137 |
+
|
138 |
+
update_option(WPM_DB_OPTIONS_NAME, $options_new);
|
139 |
+
}
|
140 |
+
|
141 |
+
private function up_from_2_to_3() {
|
142 |
+
|
143 |
+
self::save_options_backup('2');
|
144 |
+
|
145 |
+
$options_old = get_option(WPM_DB_OPTIONS_NAME);
|
146 |
+
|
147 |
+
$options_new = $options_old;
|
148 |
+
|
149 |
+
$options_new['shop']['order_total_logic'] = $options_old['gads']['order_total_logic'];
|
150 |
+
|
151 |
+
$options_new['google']['ads'] = $options_old['gads'];
|
152 |
+
$options_new['google']['gtag'] = $options_old['gtag'];
|
153 |
+
|
154 |
+
|
155 |
+
unset($options_new['google']['ads']['order_total_logic']);
|
156 |
+
unset($options_new['gads']);
|
157 |
+
unset($options_new['gtag']);
|
158 |
+
unset($options_new['google']['ads']['google_business_vertical']);
|
159 |
+
|
160 |
+
$options_new['google']['ads']['google_business_vertical'] = 0;
|
161 |
+
|
162 |
+
$options_new['db_version'] = '3';
|
163 |
+
|
164 |
+
update_option(WPM_DB_OPTIONS_NAME, $options_new);
|
165 |
+
}
|
166 |
+
|
167 |
+
private function up_from_3_to_4() {
|
168 |
+
|
169 |
+
error_log('db up_from_3_to_4');
|
170 |
+
|
171 |
+
self::save_options_backup('3');
|
172 |
+
|
173 |
+
$options_old = get_option(WPM_DB_OPTIONS_NAME);
|
174 |
+
|
175 |
+
$options_new = $options_old;
|
176 |
+
|
177 |
+
$options_new['facebook']['advanced_matching'] = $options_old['facebook']['capi']['user_transparency']['send_additional_client_identifiers'];
|
178 |
+
$options_new['facebook']['capi']['process_anonymous_hits'] = $options_old['facebook']['capi']['user_transparency']['process_anonymous_hits'];
|
179 |
+
|
180 |
+
unset($options_new['facebook']['capi']['user_transparency']['send_additional_client_identifiers']);
|
181 |
+
unset($options_new['facebook']['capi']['user_transparency']['process_anonymous_hits']);
|
182 |
+
|
183 |
+
$options_new['db_version'] = '4';
|
184 |
+
|
185 |
+
update_option(WPM_DB_OPTIONS_NAME, $options_new);
|
186 |
+
}
|
187 |
+
|
188 |
+
private static function get_mysql_db_version() {
|
189 |
+
|
190 |
+
$options = get_option(WPM_DB_OPTIONS_NAME);
|
191 |
+
|
192 |
+
// error_log(print_r($options,true));
|
193 |
+
|
194 |
+
if (( get_option('wgact_plugin_options_1') ) || ( get_option('wgact_plugin_options_2') )) {
|
195 |
+
return '0';
|
196 |
+
} elseif (array_key_exists('conversion_id', $options)) {
|
197 |
+
return '1';
|
198 |
+
} else {
|
199 |
+
return $options['db_version'];
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
protected static function get_option_value_v1( $option_name ) {
|
204 |
+
|
205 |
+
if (!get_option($option_name)) {
|
206 |
+
$option_value = '';
|
207 |
+
} else {
|
208 |
+
$option = get_option($option_name);
|
209 |
+
$option_value = $option['text_string'];
|
210 |
+
}
|
211 |
+
|
212 |
+
return $option_value;
|
213 |
+
}
|
214 |
+
|
215 |
+
public static function save_options_backup( $version = null ) {
|
216 |
+
|
217 |
+
if (is_null($version)) {
|
218 |
+
$version = Options::get_db_version();
|
219 |
+
}
|
220 |
+
|
221 |
+
$options_backup = get_option(self::$options_backup_name);
|
222 |
+
|
223 |
+
// Upgrade from old method for saving versions to new one that also saves the timestamp.
|
224 |
+
if (isset($options_backup[$version]) && is_string($options_backup[$version])) {
|
225 |
+
$settings = $options_backup[$version];
|
226 |
+
$options_backup[$version] = [];
|
227 |
+
$options_backup[$version][time()] = $settings;
|
228 |
+
}
|
229 |
+
|
230 |
+
$options_backup[$version][time()] = Options::get_options();
|
231 |
+
|
232 |
+
update_option(self::$options_backup_name, $options_backup, false);
|
233 |
+
}
|
234 |
+
}
|
classes/class-deprecated-filters.php
CHANGED
@@ -14,7 +14,16 @@ class Deprecated_Filters {
|
|
14 |
|
15 |
public static function load_deprecated_filters() {
|
16 |
|
17 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
}
|
20 |
}
|
14 |
|
15 |
public static function load_deprecated_filters() {
|
16 |
|
17 |
+
// Choose what purchase event name has to be emitted, as TikTok has a choice of those
|
18 |
+
// "CompletePayment" seems to be the one that is used to optimize catalog sales
|
19 |
+
// "Purchase" seems also to work as per TikTok Pixel Helper
|
20 |
+
apply_filters_deprecated(
|
21 |
+
'wpm_tiktok_purchase_event_name',
|
22 |
+
['CompletePayment'],
|
23 |
+
'1.25.1',
|
24 |
+
null,
|
25 |
+
'This filter has been deprecated without replacement'
|
26 |
+
);
|
27 |
|
28 |
}
|
29 |
}
|
classes/class-helpers.php
CHANGED
@@ -2,6 +2,11 @@
|
|
2 |
|
3 |
namespace WCPM\Classes;
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
if (!defined('ABSPATH')) {
|
6 |
exit; // Exit if accessed directly
|
7 |
}
|
@@ -102,4 +107,76 @@ class Helpers {
|
|
102 |
public static function clean_product_name_for_output( $name ) {
|
103 |
return html_entity_decode($name, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
2 |
|
3 |
namespace WCPM\Classes;
|
4 |
|
5 |
+
use libphonenumber\NumberParseException;
|
6 |
+
use libphonenumber\PhoneNumberFormat;
|
7 |
+
use libphonenumber\PhoneNumberUtil;
|
8 |
+
use WC_Geolocation;
|
9 |
+
|
10 |
if (!defined('ABSPATH')) {
|
11 |
exit; // Exit if accessed directly
|
12 |
}
|
107 |
public static function clean_product_name_for_output( $name ) {
|
108 |
return html_entity_decode($name, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
109 |
}
|
110 |
+
|
111 |
+
public static function get_e164_formatted_phone_number( $number, $country ) {
|
112 |
+
|
113 |
+
try {
|
114 |
+
$phone_util = PhoneNumberUtil::getInstance();
|
115 |
+
$number_parsed = $phone_util->parse($number, $country);
|
116 |
+
return $phone_util->format($number_parsed, PhoneNumberFormat::E164);
|
117 |
+
} catch (NumberParseException $e) {
|
118 |
+
error_log($e);
|
119 |
+
return $number;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
public static function is_localhost() {
|
124 |
+
|
125 |
+
// If the IP is local, return true, else false
|
126 |
+
// https://stackoverflow.com/a/13818647/4688612
|
127 |
+
|
128 |
+
return !filter_var(
|
129 |
+
WC_Geolocation::get_ip_address(),
|
130 |
+
FILTER_VALIDATE_IP,
|
131 |
+
FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
+
public static function get_user_ip() {
|
136 |
+
|
137 |
+
if (self::is_localhost()) {
|
138 |
+
$ip = WC_Geolocation::get_external_ip_address();
|
139 |
+
} else {
|
140 |
+
$ip = WC_Geolocation::get_ip_address();
|
141 |
+
}
|
142 |
+
|
143 |
+
// only set the IP if it is a public address
|
144 |
+
$ip = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
|
145 |
+
|
146 |
+
// Remove the IPv6 to IPv4 mapping in case the IP contains one
|
147 |
+
// and return the IP plain public IPv4 or IPv6 IP
|
148 |
+
// https://en.wikipedia.org/wiki/IPv6_address
|
149 |
+
return str_replace('::ffff:', '', $ip);
|
150 |
+
}
|
151 |
+
|
152 |
+
public static function get_visitor_country() {
|
153 |
+
|
154 |
+
$location = WC_Geolocation::geolocate_ip(self::get_user_ip());
|
155 |
+
|
156 |
+
return $location['country'];
|
157 |
+
}
|
158 |
+
|
159 |
+
// https://stackoverflow.com/a/60199374/4688612
|
160 |
+
public static function is_iframe() {
|
161 |
+
if (isset($_SERVER['HTTP_SEC_FETCH_DEST']) && 'iframe' === $_SERVER['HTTP_SEC_FETCH_DEST']) {
|
162 |
+
return true;
|
163 |
+
} else {
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
public static function get_percentage( $counter, $denominator ) {
|
169 |
+
return $denominator > 0 ? round($counter / $denominator * 100) : 0;
|
170 |
+
}
|
171 |
+
|
172 |
+
public static function get_user_country_code( $user ) {
|
173 |
+
|
174 |
+
// If the country code is set on the user, return it
|
175 |
+
if (isset($user->billing_country)) {
|
176 |
+
return $user->billing_country;
|
177 |
+
}
|
178 |
+
|
179 |
+
// Geolocate the user IP and return the country code
|
180 |
+
return self::get_visitor_country();
|
181 |
+
}
|
182 |
}
|
classes/class-options.php
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Options class
|
4 |
+
* https://stackoverflow.com/a/55658771/4688612
|
5 |
+
*/
|
6 |
+
|
7 |
+
namespace WCPM\Classes;
|
8 |
+
|
9 |
+
if (!defined('ABSPATH')) {
|
10 |
+
exit; // Exit if accessed directly
|
11 |
+
}
|
12 |
+
|
13 |
+
class Options {
|
14 |
+
|
15 |
+
private static $options;
|
16 |
+
private static $options_obj;
|
17 |
+
|
18 |
+
private static $did_init = false;
|
19 |
+
|
20 |
+
private static function init() {
|
21 |
+
if (!self::$did_init) {
|
22 |
+
self::$did_init = true;
|
23 |
+
|
24 |
+
self::$options = get_option(WPM_DB_OPTIONS_NAME);
|
25 |
+
self::$options_obj = Helpers::get_options_object(self::$options);
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
private function __construct() {
|
30 |
+
// Do nothing
|
31 |
+
}
|
32 |
+
|
33 |
+
public static function get_options() {
|
34 |
+
self::init();
|
35 |
+
|
36 |
+
return self::$options;
|
37 |
+
}
|
38 |
+
|
39 |
+
public static function get_options_obj() {
|
40 |
+
self::init();
|
41 |
+
|
42 |
+
return self::$options_obj;
|
43 |
+
}
|
44 |
+
|
45 |
+
public static function get_db_version() {
|
46 |
+
self::init();
|
47 |
+
|
48 |
+
return self::$options_obj->db_version;
|
49 |
+
}
|
50 |
+
|
51 |
+
// get the default options
|
52 |
+
public static function get_default_options() {
|
53 |
+
|
54 |
+
// default options settings
|
55 |
+
return [
|
56 |
+
'google' => [
|
57 |
+
'ads' => [
|
58 |
+
'conversion_id' => '',
|
59 |
+
'conversion_label' => '',
|
60 |
+
'aw_merchant_id' => '',
|
61 |
+
'product_identifier' => 0,
|
62 |
+
'google_business_vertical' => 0,
|
63 |
+
'dynamic_remarketing' => false,
|
64 |
+
'phone_conversion_number' => '',
|
65 |
+
'phone_conversion_label' => '',
|
66 |
+
'enhanced_conversions' => false,
|
67 |
+
'conversion_adjustments' => [
|
68 |
+
'conversion_name' => '',
|
69 |
+
],
|
70 |
+
],
|
71 |
+
'analytics' => [
|
72 |
+
'universal' => [
|
73 |
+
'property_id' => '',
|
74 |
+
],
|
75 |
+
'ga4' => [
|
76 |
+
'measurement_id' => '',
|
77 |
+
'api_secret' => '',
|
78 |
+
'data_api' => [
|
79 |
+
'property_id' => '',
|
80 |
+
'credentials' => [],
|
81 |
+
],
|
82 |
+
],
|
83 |
+
'link_attribution' => false,
|
84 |
+
],
|
85 |
+
'optimize' => [
|
86 |
+
'container_id' => '',
|
87 |
+
],
|
88 |
+
'consent_mode' => [
|
89 |
+
'active' => false,
|
90 |
+
'regions' => [],
|
91 |
+
],
|
92 |
+
'user_id' => false,
|
93 |
+
],
|
94 |
+
'facebook' => [
|
95 |
+
'pixel_id' => '',
|
96 |
+
'microdata' => false,
|
97 |
+
'capi' => [
|
98 |
+
'token' => '',
|
99 |
+
'test_event_code' => '',
|
100 |
+
'user_transparency' => [
|
101 |
+
'process_anonymous_hits' => false,
|
102 |
+
'send_additional_client_identifiers' => false,
|
103 |
+
]
|
104 |
+
]
|
105 |
+
],
|
106 |
+
'bing' => [
|
107 |
+
'uet_tag_id' => ''
|
108 |
+
],
|
109 |
+
'twitter' => [
|
110 |
+
'pixel_id' => ''
|
111 |
+
],
|
112 |
+
'pinterest' => [
|
113 |
+
'pixel_id' => '',
|
114 |
+
'enhanced_match' => false,
|
115 |
+
],
|
116 |
+
'snapchat' => [
|
117 |
+
'pixel_id' => ''
|
118 |
+
],
|
119 |
+
'tiktok' => [
|
120 |
+
'pixel_id' => '',
|
121 |
+
'advanced_matching' => false,
|
122 |
+
'eapi' => [
|
123 |
+
'token' => '',
|
124 |
+
'process_anonymous_hits' => false,
|
125 |
+
],
|
126 |
+
],
|
127 |
+
'hotjar' => [
|
128 |
+
'site_id' => ''
|
129 |
+
],
|
130 |
+
'shop' => [
|
131 |
+
'order_total_logic' => 0,
|
132 |
+
'cookie_consent_mgmt' => [
|
133 |
+
'explicit_consent' => false,
|
134 |
+
],
|
135 |
+
'order_deduplication' => true,
|
136 |
+
'disable_tracking_for' => [],
|
137 |
+
'order_list_info' => true,
|
138 |
+
],
|
139 |
+
'general' => [
|
140 |
+
'variations_output' => true,
|
141 |
+
'maximum_compatibility_mode' => false,
|
142 |
+
'pro_version_demo' => false,
|
143 |
+
'scroll_tracker_thresholds' => [],
|
144 |
+
],
|
145 |
+
'db_version' => WPM_DB_VERSION,
|
146 |
+
];
|
147 |
+
}
|
148 |
+
|
149 |
+
public static function update_with_defaults( $target_array, $default_array ) {
|
150 |
+
|
151 |
+
// error_log(print_r($target_array, true));
|
152 |
+
|
153 |
+
// Walk through every key in the default array
|
154 |
+
foreach ($default_array as $default_key => $default_value) {
|
155 |
+
|
156 |
+
// If the target key doesn't exist yet
|
157 |
+
// copy all default values,
|
158 |
+
// including the subtree if one exists,
|
159 |
+
// into the target array.
|
160 |
+
if (!isset($target_array[$default_key])) {
|
161 |
+
$target_array[$default_key] = $default_value;
|
162 |
+
|
163 |
+
// We only want to keep going down the tree
|
164 |
+
// if the array contains more settings in an associative array,
|
165 |
+
// otherwise we keep the settings of what's in the target array.
|
166 |
+
} elseif (self::is_associative_array($default_value)) {
|
167 |
+
|
168 |
+
$target_array[$default_key] = self::update_with_defaults($target_array[$default_key], $default_value);
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
// error_log(print_r($target_array, true));
|
173 |
+
return $target_array;
|
174 |
+
}
|
175 |
+
|
176 |
+
protected static function does_contain_nested_arrays( $array ) {
|
177 |
+
|
178 |
+
foreach ($array as $key) {
|
179 |
+
if (is_array($key)) {
|
180 |
+
return true;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
|
187 |
+
protected static function is_associative_array( $array ) {
|
188 |
+
|
189 |
+
if (is_array($array)) {
|
190 |
+
return ( array_values($array) !== $array );
|
191 |
+
} else {
|
192 |
+
return false;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
classes/class-product.php
ADDED
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WCPM\Classes;
|
4 |
+
|
5 |
+
use WCPM\Classes\Admin\Environment_Check;
|
6 |
+
use WCPM\Classes\Pixels\Google\Google;
|
7 |
+
|
8 |
+
if (!defined('ABSPATH')) {
|
9 |
+
exit; // Exit if accessed directly
|
10 |
+
}
|
11 |
+
|
12 |
+
class Product {
|
13 |
+
|
14 |
+
public static function get_order_item_ids( $order, $pixel_name ) {
|
15 |
+
|
16 |
+
$order_items = self::wpm_get_order_items($order);
|
17 |
+
$order_items_array = [];
|
18 |
+
|
19 |
+
foreach ((array) $order_items as $order_item) {
|
20 |
+
|
21 |
+
$product_id = self::get_variation_or_product_id($order_item->get_data(), Options::get_options_obj()->general->variations_output);
|
22 |
+
|
23 |
+
$product = wc_get_product($product_id);
|
24 |
+
|
25 |
+
// only continue if WC retrieves a valid product
|
26 |
+
if (is_object($product)) {
|
27 |
+
|
28 |
+
$dyn_r_ids = self::get_dyn_r_ids($product);
|
29 |
+
$product_id_compiled = $dyn_r_ids[self::get_dyn_r_id_type($pixel_name)];
|
30 |
+
$order_items_array[] = $product_id_compiled;
|
31 |
+
} else {
|
32 |
+
|
33 |
+
self::log_problematic_product_id($product_id);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
return $order_items_array;
|
38 |
+
}
|
39 |
+
|
40 |
+
public static function wpm_get_order_items( $order ) {
|
41 |
+
|
42 |
+
$order_items = apply_filters_deprecated('wooptpm_order_items', [$order->get_items(), $order], '1.13.0', 'wpm_order_items');
|
43 |
+
|
44 |
+
// Give option to filter order items
|
45 |
+
// then return
|
46 |
+
return apply_filters('wpm_order_items', $order_items, $order);
|
47 |
+
}
|
48 |
+
|
49 |
+
public static function get_variation_or_product_id( $item, $variations_output = true ) {
|
50 |
+
|
51 |
+
if (true === filter_var($variations_output, FILTER_VALIDATE_BOOLEAN) && !empty($item['variation_id'])) {
|
52 |
+
return $item['variation_id'];
|
53 |
+
}
|
54 |
+
|
55 |
+
return $item['product_id'];
|
56 |
+
}
|
57 |
+
|
58 |
+
public static function get_dyn_r_ids( $product ) {
|
59 |
+
|
60 |
+
$dyn_r_ids = [
|
61 |
+
'post_id' => (string) $product->get_id(),
|
62 |
+
'sku' => (string) $product->get_sku() ? $product->get_sku() : $product->get_id(),
|
63 |
+
'gpf' => 'woocommerce_gpf_' . $product->get_id(),
|
64 |
+
'gla' => 'gla_' . $product->get_id(),
|
65 |
+
];
|
66 |
+
|
67 |
+
// if you want to add a custom dyn_r_id for each product
|
68 |
+
$dyn_r_ids = apply_filters_deprecated('wooptpm_product_ids', [$dyn_r_ids, $product], '1.13.0', 'wpm_product_ids');
|
69 |
+
return apply_filters('wpm_product_ids', $dyn_r_ids, $product);
|
70 |
+
}
|
71 |
+
|
72 |
+
public static function get_dyn_r_id_type( $pixel_name ) {
|
73 |
+
|
74 |
+
$dyn_r_id_type = '';
|
75 |
+
|
76 |
+
if (0 == Options::get_options_obj()->google->ads->product_identifier) {
|
77 |
+
$dyn_r_id_type = 'post_id';
|
78 |
+
} elseif (1 == Options::get_options_obj()->google->ads->product_identifier) {
|
79 |
+
$dyn_r_id_type = 'gpf';
|
80 |
+
} elseif (2 == Options::get_options_obj()->google->ads->product_identifier) {
|
81 |
+
$dyn_r_id_type = 'sku';
|
82 |
+
} elseif (3 == Options::get_options_obj()->google->ads->product_identifier) {
|
83 |
+
$dyn_r_id_type = 'gla';
|
84 |
+
}
|
85 |
+
|
86 |
+
// If you want to change the dyn_r_id type programmatically
|
87 |
+
$dyn_r_id_type = apply_filters_deprecated('wooptpm_product_id_type_for_' . $pixel_name, [$dyn_r_id_type], '1.13.0', 'wpm_product_id_type_for_');
|
88 |
+
$dyn_r_id_type = apply_filters('wpm_product_id_type_for_' . $pixel_name, $dyn_r_id_type);
|
89 |
+
|
90 |
+
return $dyn_r_id_type;
|
91 |
+
}
|
92 |
+
|
93 |
+
public static function log_problematic_product_id( $product_id = 0 ) {
|
94 |
+
|
95 |
+
wc_get_logger()->debug(
|
96 |
+
'WooCommerce detects the page ID ' . $product_id . ' as product, but when invoked by wc_get_product( ' . $product_id . ' ) it returns no product object',
|
97 |
+
['source' => 'wpm']
|
98 |
+
);
|
99 |
+
}
|
100 |
+
|
101 |
+
public static function get_product_details_for_datalayer( $product ) {
|
102 |
+
|
103 |
+
global $woocommerce_wpml;
|
104 |
+
|
105 |
+
$dyn_r_ids = self::get_dyn_r_ids($product);
|
106 |
+
|
107 |
+
// Output the product prices with tax as default
|
108 |
+
// otherwise, output the prices without tax
|
109 |
+
$use_price_with_tax = self::pmw_output_product_prices_with_tax();
|
110 |
+
|
111 |
+
if (Environment_Check::get_instance()->is_wpml_woocommerce_multi_currency_active()) {
|
112 |
+
// https://github.com/wp-premium/woocommerce-multilingual/blob/134e1a789622341e8de7690b955b25ea8d8f7cfc/inc/currencies/class-wcml-multi-currency-prices.php#L158
|
113 |
+
$price = $woocommerce_wpml->multi_currency->prices->get_product_price_in_currency($product->get_id(), get_woocommerce_currency());
|
114 |
+
|
115 |
+
if ($use_price_with_tax) {
|
116 |
+
|
117 |
+
if (floatval(wc_get_price_excluding_tax($product)) !== 0.0) {
|
118 |
+
$price = ( $price / wc_get_price_excluding_tax($product) ) * wc_get_price_including_tax($product);
|
119 |
+
} else {
|
120 |
+
$price = 0;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
} else {
|
124 |
+
// https://stackoverflow.com/a/37231033/4688612
|
125 |
+
if ($use_price_with_tax) {
|
126 |
+
$price = wc_get_price_including_tax($product);
|
127 |
+
} else {
|
128 |
+
$price = wc_get_price_excluding_tax($product);
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
$product_details = [
|
133 |
+
'id' => (string) $product->get_id(),
|
134 |
+
'sku' => (string) $product->get_sku(),
|
135 |
+
'price' => (float) wc_format_decimal($price, 2),
|
136 |
+
'brand' => self::get_brand_name($product->get_id()),
|
137 |
+
'quantity' => 1,
|
138 |
+
'dyn_r_ids' => $dyn_r_ids,
|
139 |
+
'isVariable' => $product->get_type() === 'variable',
|
140 |
+
];
|
141 |
+
|
142 |
+
if ($product->get_type() === 'variation') { // In case the product is a variation
|
143 |
+
|
144 |
+
$parent_product = wc_get_product($product->get_parent_id());
|
145 |
+
|
146 |
+
if ($parent_product) {
|
147 |
+
|
148 |
+
$product_details['name'] = Helpers::clean_product_name_for_output($parent_product->get_name());
|
149 |
+
$product_details['parentId_dyn_r_ids'] = self::get_dyn_r_ids($parent_product);
|
150 |
+
$product_details['parentId'] = $parent_product->get_id();
|
151 |
+
$product_details['brand'] = self::get_brand_name($parent_product->get_id());
|
152 |
+
} else {
|
153 |
+
|
154 |
+
wc_get_logger()->debug('Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', ['source' => 'wpm']);
|
155 |
+
}
|
156 |
+
|
157 |
+
$product_details['variant'] = self::get_formatted_variant_text($product);
|
158 |
+
$product_details['category'] = self::get_product_category($product->get_parent_id());
|
159 |
+
$product_details['isVariation'] = true;
|
160 |
+
} else { // It's not a variation, so get the fields for a regular product
|
161 |
+
|
162 |
+
$product_details['name'] = Helpers::clean_product_name_for_output((string) $product->get_name());
|
163 |
+
$product_details['category'] = self::get_product_category($product->get_id());
|
164 |
+
$product_details['isVariation'] = false;
|
165 |
+
}
|
166 |
+
|
167 |
+
return $product_details;
|
168 |
+
}
|
169 |
+
|
170 |
+
public static function pmw_output_product_prices_with_tax() {
|
171 |
+
|
172 |
+
// Output the product prices with tax as default
|
173 |
+
// otherwise, output the prices without tax
|
174 |
+
return apply_filters('pmw_output_product_prices_with_tax', true);
|
175 |
+
}
|
176 |
+
|
177 |
+
// https://stackoverflow.com/a/56278308/4688612
|
178 |
+
// https://stackoverflow.com/a/39034036/4688612
|
179 |
+
public static function get_brand_name( $product_id ) {
|
180 |
+
|
181 |
+
$brand_taxonomy = 'pa_brand';
|
182 |
+
|
183 |
+
if (Environment_Check::get_instance()->is_yith_wc_brands_active()) {
|
184 |
+
$brand_taxonomy = 'yith_product_brand';
|
185 |
+
} elseif (Environment_Check::get_instance()->is_woocommerce_brands_active()) {
|
186 |
+
$brand_taxonomy = 'product_brand';
|
187 |
+
}
|
188 |
+
|
189 |
+
$brand_taxonomy = apply_filters_deprecated('wooptpm_custom_brand_taxonomy', [$brand_taxonomy], '1.13.0', 'wpm_custom_brand_taxonomy');
|
190 |
+
|
191 |
+
// Use custom brand_taxonomy
|
192 |
+
$brand_taxonomy = apply_filters('wpm_custom_brand_taxonomy', $brand_taxonomy);
|
193 |
+
|
194 |
+
if (self::get_brand_by_taxonomy($product_id, $brand_taxonomy)) {
|
195 |
+
return self::get_brand_by_taxonomy($product_id, $brand_taxonomy);
|
196 |
+
} elseif (self::get_brand_by_taxonomy($product_id, 'pa_' . $brand_taxonomy)) {
|
197 |
+
return self::get_brand_by_taxonomy($product_id, 'pa_' . $brand_taxonomy);
|
198 |
+
} else {
|
199 |
+
return '';
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
public static function get_brand_by_taxonomy( $product_id, $taxonomy ) {
|
204 |
+
|
205 |
+
if (taxonomy_exists($taxonomy)) {
|
206 |
+
$brand_names = wp_get_post_terms($product_id, $taxonomy, ['fields' => 'names']);
|
207 |
+
return reset($brand_names);
|
208 |
+
} else {
|
209 |
+
return '';
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
public static function get_formatted_variant_text( $product ) {
|
214 |
+
|
215 |
+
$variant_text_array = [];
|
216 |
+
|
217 |
+
$attributes = $product->get_attributes();
|
218 |
+
if ($attributes) {
|
219 |
+
foreach ($attributes as $key => $value) {
|
220 |
+
|
221 |
+
$key_name = str_replace('pa_', '', $key);
|
222 |
+
$variant_text_array[] = ucfirst($key_name) . ': ' . strtolower($value);
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
return implode(' | ', $variant_text_array);
|
227 |
+
}
|
228 |
+
|
229 |
+
// get an array with all product categories
|
230 |
+
public static function get_product_category( $product_id ) {
|
231 |
+
|
232 |
+
/**
|
233 |
+
* On some installs the categories don't sync down to the variations.
|
234 |
+
* Therefore, we get the categories from the parent product.
|
235 |
+
*/
|
236 |
+
if ('variation' === wc_get_product($product_id)->get_type()) {
|
237 |
+
$product_id = wc_get_product($product_id)->get_parent_id();
|
238 |
+
}
|
239 |
+
|
240 |
+
$prod_cats = get_the_terms($product_id, 'product_cat');
|
241 |
+
$prod_cats_output = [];
|
242 |
+
|
243 |
+
// only continue with the loop if one or more product categories have been set for the product
|
244 |
+
if (!empty($prod_cats)) {
|
245 |
+
|
246 |
+
foreach ((array) $prod_cats as $key) {
|
247 |
+
$prod_cats_output[] = $key->name;
|
248 |
+
}
|
249 |
+
|
250 |
+
// apply filter to the $prod_cats_output array
|
251 |
+
$prod_cats_output = apply_filters_deprecated('wgact_filter', [$prod_cats_output], '1.10.2', '', 'This filter has been deprecated without replacement.');
|
252 |
+
}
|
253 |
+
|
254 |
+
return $prod_cats_output;
|
255 |
+
}
|
256 |
+
|
257 |
+
|
258 |
+
public static function is_variable_product_by_id( $product_id ) {
|
259 |
+
|
260 |
+
$product = wc_get_product($product_id);
|
261 |
+
|
262 |
+
return $product->get_type() === 'variable';
|
263 |
+
}
|
264 |
+
|
265 |
+
public static function get_compiled_product_id( $product_id, $product_sku, $options, $channel = '' ) {
|
266 |
+
|
267 |
+
// depending on setting use product IDs or SKUs
|
268 |
+
if (0 == Options::get_options_obj()->google->ads->product_identifier || 'ga_ua' === $channel || 'ga_4' === $channel) {
|
269 |
+
return (string) $product_id;
|
270 |
+
} else {
|
271 |
+
if (1 == Options::get_options_obj()->google->ads->product_identifier) {
|
272 |
+
return (string) 'woocommerce_gpf_' . $product_id;
|
273 |
+
} else {
|
274 |
+
if ($product_sku) {
|
275 |
+
return (string) $product_sku;
|
276 |
+
} else {
|
277 |
+
return (string) $product_id;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
public static function log_problematic_product( $product ) {
|
284 |
+
|
285 |
+
wc_get_logger()->debug(
|
286 |
+
'WooCommerce detects the following product as product , but when invoked by wc_get_product( ' . $product->get_id() . ' ) it returns no product object',
|
287 |
+
['source' => 'wpm']
|
288 |
+
);
|
289 |
+
}
|
290 |
+
|
291 |
+
public static function get_front_end_order_items( $order ) {
|
292 |
+
|
293 |
+
$order_items = self::wpm_get_order_items($order);
|
294 |
+
$order_items_formatted = [];
|
295 |
+
|
296 |
+
foreach ((array) $order_items as $order_item) {
|
297 |
+
|
298 |
+
$order_item_data = $order_item->get_data();
|
299 |
+
|
300 |
+
$product = $order_item->get_product();
|
301 |
+
|
302 |
+
if (!is_object($product)) {
|
303 |
+
|
304 |
+
wc_get_logger()->debug('get_order_item_data received an order item which is not a valid product: ' . $order_item->get_id(), ['source' => 'wpm']);
|
305 |
+
return [];
|
306 |
+
}
|
307 |
+
|
308 |
+
$order_items_formatted[$order_item_data['product_id']] = [
|
309 |
+
'id' => $order_item_data['product_id'],
|
310 |
+
'variation_id' => $order_item_data['variation_id'],
|
311 |
+
'name' => $order_item_data['name'],
|
312 |
+
'quantity' => $order_item_data['quantity'],
|
313 |
+
'price' => ( new Google(Options::get_options()) )->wpm_get_order_item_price($order_item),
|
314 |
+
'subtotal' => (float) wc_format_decimal($order_item_data['subtotal'], 2),
|
315 |
+
'subtotal_tax' => (float) wc_format_decimal($order_item_data['subtotal_tax'], 2),
|
316 |
+
'total' => (float) wc_format_decimal($order_item_data['total'], 2),
|
317 |
+
'total_tax' => (float) wc_format_decimal($order_item_data['total_tax'], 2),
|
318 |
+
];
|
319 |
+
}
|
320 |
+
|
321 |
+
return $order_items_formatted;
|
322 |
+
}
|
323 |
+
|
324 |
+
public static function buffer_get_product_data_layer_script( $product, $set_position = true, $meta_tag = false ) {
|
325 |
+
|
326 |
+
ob_start();
|
327 |
+
|
328 |
+
self::get_product_data_layer_script($product, $set_position = true, $meta_tag = false);
|
329 |
+
|
330 |
+
return ob_get_clean();
|
331 |
+
}
|
332 |
+
|
333 |
+
public static function get_product_data_layer_script( $product, $set_position = true, $meta_tag = false ) {
|
334 |
+
|
335 |
+
if (!is_object($product)) {
|
336 |
+
wc_get_logger()->debug('get_product_data_layer_script received an invalid product', ['source' => 'wpm']);
|
337 |
+
return '';
|
338 |
+
}
|
339 |
+
|
340 |
+
$data = self::get_product_details_for_datalayer($product);
|
341 |
+
|
342 |
+
// If placed in <head> it must be a <meta> tag else, it can be an <input> tag
|
343 |
+
// Added name and content to meta in order to pass W3 validation test at https://validator.w3.org/nu/
|
344 |
+
$tag = $meta_tag ? "meta name='wpm-dataLayer-meta' content='" . $product->get_id() . "'" : "input type='hidden'";
|
345 |
+
|
346 |
+
self::get_product_data_layer_script_html_part_1($tag, $product, $data, $set_position, $meta_tag);
|
347 |
+
}
|
348 |
+
|
349 |
+
public static function get_product_data_layer_script_html_part_1( $tag, $product, $data, $set_position, $meta_tag ) {
|
350 |
+
|
351 |
+
if ($meta_tag) {
|
352 |
+
?>
|
353 |
+
<meta name="pm-dataLayer-meta" content="<?php esc_html_e($product->get_id()); ?>" class="wpmProductId"
|
354 |
+
data-id="<?php esc_html_e($product->get_id()); ?>">
|
355 |
+
<?php
|
356 |
+
} else {
|
357 |
+
?>
|
358 |
+
<input type="hidden" class="wpmProductId" data-id="<?php esc_html_e($product->get_id()); ?>">
|
359 |
+
<?php
|
360 |
+
}
|
361 |
+
|
362 |
+
?>
|
363 |
+
<script>
|
364 |
+
(window.wpmDataLayer = window.wpmDataLayer || {}).products = window.wpmDataLayer.products || {}
|
365 |
+
window.wpmDataLayer.products[<?php esc_html_e($product->get_id()); ?>] = <?php echo wp_json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); ?>;
|
366 |
+
<?php $set_position ? self::get_product_data_layer_script_html_part_2($product) : ''; ?>
|
367 |
+
</script>
|
368 |
+
<?php
|
369 |
+
}
|
370 |
+
|
371 |
+
public static function get_product_data_layer_script_html_part_2( $product ) {
|
372 |
+
?>
|
373 |
+
window.wpmDataLayer.products[<?php esc_html_e($product->get_id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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WCPM\Classes;
|
4 |
+
|
5 |
+
use WCPM\Classes\Admin\Documentation ;
|
6 |
+
use WCPM\Classes\Admin\Environment_Check ;
|
7 |
+
|
8 |
+
if ( !defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
// Exit if accessed directly
|
11 |
+
}
|
12 |
+
|
13 |
+
class Shop
|
14 |
+
{
|
15 |
+
private static $clv_orders_by_billing_email ;
|
16 |
+
public static function track_user( $user_id = null )
|
17 |
+
{
|
18 |
+
$user = null;
|
19 |
+
|
20 |
+
if ( 0 === $user_id ) {
|
21 |
+
// If anonymous visitor then track
|
22 |
+
return true;
|
23 |
+
} elseif ( $user_id && 0 <= $user_id ) {
|
24 |
+
// If user ID is known, get the user
|
25 |
+
$user = get_user_by( 'id', $user_id );
|
26 |
+
} elseif ( null === $user_id && is_user_logged_in() ) {
|
27 |
+
// If user id is not given, but the user is logged in, get the user
|
28 |
+
$user = wp_get_current_user();
|
29 |
+
}
|
30 |
+
|
31 |
+
// Find out if the user has a role that is restricted from tracking
|
32 |
+
if ( $user ) {
|
33 |
+
foreach ( $user->roles as $role ) {
|
34 |
+
if ( in_array( $role, Options::get_options_obj()->shop->disable_tracking_for, true ) ) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
return true;
|
40 |
+
}
|
41 |
+
|
42 |
+
public static function do_not_track_user( $user_id )
|
43 |
+
{
|
44 |
+
return !self::track_user( $user_id );
|
45 |
+
}
|
46 |
+
|
47 |
+
public static function wpm_get_order_user_id( $order )
|
48 |
+
{
|
49 |
+
|
50 |
+
if ( $order->meta_exists( '_wpm_customer_user' ) ) {
|
51 |
+
return (int) $order->get_meta( '_wpm_customer_user', true );
|
52 |
+
} else {
|
53 |
+
return (int) $order->get_meta( '_customer_user', true );
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
public static function wpm_get_order_total( $order )
|
59 |
+
{
|
60 |
+
$order_total = $order->get_total();
|
61 |
+
|
62 |
+
if ( in_array( Options::get_options_obj()->shop->order_total_logic, [ '0', 'order_subtotal' ], true ) ) {
|
63 |
+
$order_total = $order->get_subtotal() - $order->get_total_discount();
|
64 |
+
} elseif ( in_array( Options::get_options_obj()->shop->order_total_logic, [ '1', 'order_total' ], true ) ) {
|
65 |
+
$order_total = $order->get_total();
|
66 |
+
} elseif ( in_array( Options::get_options_obj()->shop->order_total_logic, [ '2', 'order_profit_margin' ], true ) ) {
|
67 |
+
$order_total = Profit_Margin::get_order_profit_margin( $order );
|
68 |
+
}
|
69 |
+
|
70 |
+
// deprecated filters to adjust the order value
|
71 |
+
$order_total = apply_filters_deprecated(
|
72 |
+
'wgact_conversion_value_filter',
|
73 |
+
[ $order_total, $order ],
|
74 |
+
'1.10.2',
|
75 |
+
'wooptpm_conversion_value_filter'
|
76 |
+
);
|
77 |
+
$order_total = apply_filters_deprecated(
|
78 |
+
'wooptpm_conversion_value_filter',
|
79 |
+
[ $order_total, $order ],
|
80 |
+
'1.13.0',
|
81 |
+
'wpm_conversion_value_filter'
|
82 |
+
);
|
83 |
+
// filter to adjust the order value
|
84 |
+
$order_total = apply_filters( 'wpm_conversion_value_filter', $order_total, $order );
|
85 |
+
return wc_format_decimal( (double) $order_total, 2 );
|
86 |
+
}
|
87 |
+
|
88 |
+
public static function is_backend_manual_order( $order )
|
89 |
+
{
|
90 |
+
// Only continue if this is a back-end order
|
91 |
+
|
92 |
+
if ( $order->meta_exists( '_created_via' ) && 'admin' === $order->get_meta( '_created_via', true ) ) {
|
93 |
+
return true;
|
94 |
+
} else {
|
95 |
+
return false;
|
96 |
+
}
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
public static function conversion_pixels_already_fired_html()
|
101 |
+
{
|
102 |
+
?>
|
103 |
+
|
104 |
+
<!-- ----------------------------------------------------------------------------------------------------
|
105 |
+
The conversion pixels have not been fired. Possible reasons:
|
106 |
+
- The user role has been disabled for tracking.
|
107 |
+
- The order payment has failed.
|
108 |
+
- The pixels have already been fired. To prevent double counting, the pixels are only fired once.
|
109 |
+
|
110 |
+
If you want to test the order you have two options:
|
111 |
+
- Turn off order duplication prevention in the advanced settings
|
112 |
+
- Add the '&nodedupe' parameter to the order confirmation URL like this:
|
113 |
+
https://example.test/checkout/order-received/123/?key=wc_order_123abc&nodedupe
|
114 |
+
|
115 |
+
More info on testing: <?php
|
116 |
+
esc_html_e( Documentation::get_link( 'test_order' ) );
|
117 |
+
?>
|
118 |
+
|
119 |
+
----------------------------------------------------------------------------------------------------
|
120 |
+
-->
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
|
124 |
+
public static function is_nodedupe_parameter_set()
|
125 |
+
{
|
126 |
+
$_get = Helpers::get_input_vars( INPUT_GET );
|
127 |
+
|
128 |
+
if ( isset( $_get['nodedupe'] ) ) {
|
129 |
+
return true;
|
130 |
+
} else {
|
131 |
+
return false;
|
132 |
+
}
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
public static function has_conversion_pixel_already_fired( $order )
|
137 |
+
{
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
|
141 |
+
public static function is_order_confirmation_allowed_status( $order )
|
142 |
+
{
|
143 |
+
if ( $order->has_status( 'failed' ) || $order->has_status( 'cancelled' ) || $order->has_status( 'refunded' ) ) {
|
144 |
+
return false;
|
145 |
+
}
|
146 |
+
return true;
|
147 |
+
}
|
148 |
+
|
149 |
+
public static function is_order_confirmation_not_allowed_status( $order )
|
150 |
+
{
|
151 |
+
return !self::is_order_confirmation_allowed_status( $order );
|
152 |
+
}
|
153 |
+
|
154 |
+
public static function can_order_confirmation_be_processed( $order )
|
155 |
+
{
|
156 |
+
$conversion_prevention = false;
|
157 |
+
$conversion_prevention = apply_filters_deprecated(
|
158 |
+
'wgact_conversion_prevention',
|
159 |
+
[ $conversion_prevention, $order ],
|
160 |
+
'1.10.2',
|
161 |
+
'wooptpm_conversion_prevention'
|
162 |
+
);
|
163 |
+
$conversion_prevention = apply_filters_deprecated(
|
164 |
+
'wooptpm_conversion_prevention',
|
165 |
+
[ $conversion_prevention, $order ],
|
166 |
+
'1.13.0',
|
167 |
+
'wpm_conversion_prevention'
|
168 |
+
);
|
169 |
+
$conversion_prevention = apply_filters( 'wpm_conversion_prevention', $conversion_prevention, $order );
|
170 |
+
|
171 |
+
if ( self::is_nodedupe_parameter_set() || self::is_order_confirmation_allowed_status( $order ) && self::track_user() && false === $conversion_prevention && (!Options::get_options_obj()->shop->order_deduplication || self::has_conversion_pixel_already_fired( $order ) !== true) ) {
|
172 |
+
return true;
|
173 |
+
} else {
|
174 |
+
return false;
|
175 |
+
}
|
176 |
+
|
177 |
+
}
|
178 |
+
|
179 |
+
public static function is_browser_on_shop()
|
180 |
+
{
|
181 |
+
$_server = Helpers::get_input_vars( INPUT_SERVER );
|
182 |
+
// error_log(print_r($_server, true));
|
183 |
+
// error_log(print_r($_server['HTTP_HOST'], true));
|
184 |
+
// error_log('get_site_url(): ' . parse_url(get_site_url(), PHP_URL_HOST));
|
185 |
+
// error_log('parse url https://www.exampel.com : ' . parse_url('https://www.exampel.com', PHP_URL_HOST));
|
186 |
+
// Servers like Siteground don't seem to always provide $_server['HTTP_HOST']
|
187 |
+
// In that case we need to pretend that we're on the same server
|
188 |
+
if ( !isset( $_server['HTTP_HOST'] ) ) {
|
189 |
+
return true;
|
190 |
+
}
|
191 |
+
|
192 |
+
if ( wp_parse_url( get_site_url(), PHP_URL_HOST ) === $_server['HTTP_HOST'] ) {
|
193 |
+
return true;
|
194 |
+
} else {
|
195 |
+
return false;
|
196 |
+
}
|
197 |
+
|
198 |
+
}
|
199 |
+
|
200 |
+
public static function was_order_created_while_wpm_premium_was_active( $order )
|
201 |
+
{
|
202 |
+
|
203 |
+
if ( $order->meta_exists( '_wpm_premium_active' ) ) {
|
204 |
+
return true;
|
205 |
+
} else {
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
public static function was_order_created_while_wpm_was_active( $order )
|
212 |
+
{
|
213 |
+
|
214 |
+
if ( $order->meta_exists( '_wpm_process_through_wpm' ) ) {
|
215 |
+
return true;
|
216 |
+
} else {
|
217 |
+
return false;
|
218 |
+
}
|
219 |
+
|
220 |
+
}
|
221 |
+
|
222 |
+
public static function is_backend_subscription_renewal_order( $order )
|
223 |
+
{
|
224 |
+
// Only continue if this is a back-end order
|
225 |
+
|
226 |
+
if ( $order->meta_exists( '_created_via' ) && 'subscription' === $order->get_meta( '_created_via', true ) ) {
|
227 |
+
return true;
|
228 |
+
} else {
|
229 |
+
return false;
|
230 |
+
}
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
// https://wordpress.stackexchange.com/a/95440/68337
|
235 |
+
// https://wordpress.stackexchange.com/a/31435/68337
|
236 |
+
// https://developer.wordpress.org/reference/functions/get_the_title/
|
237 |
+
// https://codex.wordpress.org/Data_Validation#Output_Sanitation
|
238 |
+
// https://developer.wordpress.org/reference/functions/wp_specialchars_decode/
|
239 |
+
public static function wpm_get_the_title( $post = 0 )
|
240 |
+
{
|
241 |
+
$post = get_post( $post );
|
242 |
+
$title = ( isset( $post->post_title ) ? $post->post_title : '' );
|
243 |
+
return wp_specialchars_decode( $title );
|
244 |
+
}
|
245 |
+
|
246 |
+
public static function get_all_order_ids()
|
247 |
+
{
|
248 |
+
return wc_get_orders( [
|
249 |
+
'post_status' => wc_get_is_paid_statuses(),
|
250 |
+
'limit' => -1,
|
251 |
+
'return' => 'ids',
|
252 |
+
] );
|
253 |
+
}
|
254 |
+
|
255 |
+
public static function get_count_of_all_order_ids()
|
256 |
+
{
|
257 |
+
return count( self::get_all_order_ids() );
|
258 |
+
}
|
259 |
+
|
260 |
+
public static function get_all_order_ids_by_billing_email( $billing_email )
|
261 |
+
{
|
262 |
+
return wc_get_orders( [
|
263 |
+
'billing_email' => sanitize_email( $billing_email ),
|
264 |
+
'post_status' => wc_get_is_paid_statuses(),
|
265 |
+
'limit' => -1,
|
266 |
+
'return' => 'ids',
|
267 |
+
] );
|
268 |
+
}
|
269 |
+
|
270 |
+
public static function get_count_of_order_ids_by_billing_email( $billing_email )
|
271 |
+
{
|
272 |
+
return count( self::get_all_order_ids_by_billing_email( $billing_email ) );
|
273 |
+
}
|
274 |
+
|
275 |
+
public static function can_clv_query_be_run( $billing_email )
|
276 |
+
{
|
277 |
+
// Abort if is not a valid email
|
278 |
+
if ( !Helpers::is_email( $billing_email ) ) {
|
279 |
+
return false;
|
280 |
+
}
|
281 |
+
// Abort if memory_limit is too low
|
282 |
+
if ( !Environment_Check::get_instance()->is_memory_limit_higher_than( '100M' ) ) {
|
283 |
+
return false;
|
284 |
+
}
|
285 |
+
// Abort if customer has too many orders
|
286 |
+
if ( self::get_count_of_order_ids_by_billing_email( $billing_email ) > 1000 ) {
|
287 |
+
return false;
|
288 |
+
}
|
289 |
+
// Abort if the wc_get_orders query doesn't properly accept the 'billing_email' parameter
|
290 |
+
if ( self::get_count_of_all_order_ids() === self::get_count_of_order_ids_by_billing_email( $billing_email ) ) {
|
291 |
+
return false;
|
292 |
+
}
|
293 |
+
return true;
|
294 |
+
}
|
295 |
+
|
296 |
+
public static function get_all_paid_orders_by_billing_email( $billing_email )
|
297 |
+
{
|
298 |
+
|
299 |
+
if ( self::$clv_orders_by_billing_email ) {
|
300 |
+
return self::$clv_orders_by_billing_email;
|
301 |
+
} else {
|
302 |
+
$orders = wc_get_orders( [
|
303 |
+
'billing_email' => sanitize_email( $billing_email ),
|
304 |
+
'post_status' => wc_get_is_paid_statuses(),
|
305 |
+
'limit' => -1,
|
306 |
+
] );
|
307 |
+
self::$clv_orders_by_billing_email = $orders;
|
308 |
+
return $orders;
|
309 |
+
}
|
310 |
+
|
311 |
+
}
|
312 |
+
|
313 |
+
public static function get_clv_value_filtered_by_billing_email( $billing_email )
|
314 |
+
{
|
315 |
+
$orders = self::get_all_paid_orders_by_billing_email( $billing_email );
|
316 |
+
$value = 0;
|
317 |
+
foreach ( $orders as $order ) {
|
318 |
+
$value += (double) self::wpm_get_order_total( $order );
|
319 |
+
}
|
320 |
+
return wc_format_decimal( $value, 2 );
|
321 |
+
}
|
322 |
+
|
323 |
+
// https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query
|
324 |
+
// https://github.com/woocommerce/woocommerce/blob/5d7f6acbcb387f1d51d51305bf949d07fa3c4b08/includes/data-stores/class-wc-customer-data-store.php#L401
|
325 |
+
public static function get_clv_order_total_by_billing_email( $billing_email )
|
326 |
+
{
|
327 |
+
$orders = self::get_all_paid_orders_by_billing_email( $billing_email );
|
328 |
+
$value = 0;
|
329 |
+
foreach ( $orders as $order ) {
|
330 |
+
$value += $order->get_total();
|
331 |
+
}
|
332 |
+
return wc_format_decimal( $value, 2 );
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Don't count in the current order
|
337 |
+
* https://stackoverflow.com/a/46216073/4688612
|
338 |
+
* https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query#description
|
339 |
+
*/
|
340 |
+
public static function is_existing_customer( $order )
|
341 |
+
{
|
342 |
+
$query_arguments = [
|
343 |
+
'return' => 'ids',
|
344 |
+
'exclude' => [ $order->get_id() ],
|
345 |
+
'post_status' => wc_get_is_paid_statuses(),
|
346 |
+
'limit' => 1,
|
347 |
+
];
|
348 |
+
|
349 |
+
if ( is_user_logged_in() ) {
|
350 |
+
$current_user = wp_get_current_user();
|
351 |
+
$query_arguments['customer'] = sanitize_email( $current_user->user_email );
|
352 |
+
} else {
|
353 |
+
$query_arguments['billing_email'] = sanitize_email( $order->get_billing_email() );
|
354 |
+
}
|
355 |
+
|
356 |
+
$orders = wc_get_orders( $query_arguments );
|
357 |
+
return count( $orders ) > 0;
|
358 |
+
}
|
359 |
+
|
360 |
+
public static function is_new_customer( $order )
|
361 |
+
{
|
362 |
+
return !self::is_existing_customer( $order );
|
363 |
+
}
|
364 |
+
|
365 |
+
public static function woocommerce_3_and_above()
|
366 |
+
{
|
367 |
+
global $woocommerce ;
|
368 |
+
|
369 |
+
if ( version_compare( $woocommerce->version, 3.0, '>=' ) ) {
|
370 |
+
return true;
|
371 |
+
} else {
|
372 |
+
return false;
|
373 |
+
}
|
374 |
+
|
375 |
+
}
|
376 |
+
|
377 |
+
public static function get_order_currency( $order )
|
378 |
+
{
|
379 |
+
// use the right function to get the currency depending on the WooCommerce version
|
380 |
+
return ( self::woocommerce_3_and_above() ? $order->get_currency() : $order->get_order_currency() );
|
381 |
+
}
|
382 |
+
|
383 |
+
public static function get_order_with_url_order_key()
|
384 |
+
{
|
385 |
+
$_get = Helpers::get_input_vars( INPUT_GET );
|
386 |
+
// key is for WooCommerce
|
387 |
+
// wcf-key is for CartFlows
|
388 |
+
|
389 |
+
if ( isset( $_get['key'] ) || isset( $_get['wcf-key'] ) ) {
|
390 |
+
|
391 |
+
if ( isset( $_get['key'] ) ) {
|
392 |
+
$order_key = $_get['key'];
|
393 |
+
// for WooCommerce keys
|
394 |
+
} else {
|
395 |
+
$order_key = $_get['wcf-key'];
|
396 |
+
// for CartFlows keys
|
397 |
+
}
|
398 |
+
|
399 |
+
wc_get_logger()->debug( 'URL order key: ' . $order_key, [
|
400 |
+
'source' => 'wpm',
|
401 |
+
] );
|
402 |
+
return wc_get_order( wc_get_order_id_by_order_key( $order_key ) );
|
403 |
+
} else {
|
404 |
+
wc_get_logger()->debug( 'WooCommerce couldn\'t retrieve the order ID from order key in the URL', [
|
405 |
+
'source' => 'wpm',
|
406 |
+
] );
|
407 |
+
return false;
|
408 |
+
}
|
409 |
+
|
410 |
+
}
|
411 |
+
|
412 |
+
public static function get_order_from_query_vars()
|
413 |
+
{
|
414 |
+
global $wp ;
|
415 |
+
if ( !isset( $wp->query_vars['order-received'] ) ) {
|
416 |
+
return false;
|
417 |
+
}
|
418 |
+
$order_id = absint( $wp->query_vars['order-received'] );
|
419 |
+
|
420 |
+
if ( $order_id && 0 != $order_id && wc_get_order( $order_id ) ) {
|
421 |
+
return wc_get_order( $order_id );
|
422 |
+
} else {
|
423 |
+
wc_get_logger()->debug( 'WooCommerce couldn\'t retrieve the order ID from $wp->query_vars[\'order-received\']', [
|
424 |
+
'source' => 'wpm',
|
425 |
+
] );
|
426 |
+
wc_get_logger()->debug( print_r( $wp->query_vars, true ), [
|
427 |
+
'source' => 'wpm',
|
428 |
+
] );
|
429 |
+
return false;
|
430 |
+
}
|
431 |
+
|
432 |
+
}
|
433 |
+
|
434 |
+
public static function is_valid_order_key_in_url()
|
435 |
+
{
|
436 |
+
$_get = Helpers::get_input_vars( INPUT_GET );
|
437 |
+
$order_key = null;
|
438 |
+
// key is for WooCommerce
|
439 |
+
// wcf-key is for CartFlows
|
440 |
+
|
441 |
+
if ( isset( $_get['key'] ) ) {
|
442 |
+
$order_key = $_get['key'];
|
443 |
+
// for WooCommerce
|
444 |
+
} elseif ( isset( $_get['wcf-key'] ) ) {
|
445 |
+
$order_key = $_get['wcf-key'];
|
446 |
+
// for CartFlows
|
447 |
+
}
|
448 |
+
|
449 |
+
|
450 |
+
if ( $order_key && wc_get_order_id_by_order_key( $order_key ) ) {
|
451 |
+
return true;
|
452 |
+
} else {
|
453 |
+
return false;
|
454 |
+
}
|
455 |
+
|
456 |
+
}
|
457 |
+
|
458 |
+
public static function add_parent_category_id( $category, $list_suffix )
|
459 |
+
{
|
460 |
+
|
461 |
+
if ( $category->parent > 0 ) {
|
462 |
+
$parent_category = get_term_by( 'id', $category->parent, 'product_cat' );
|
463 |
+
$list_suffix = '.' . $parent_category->slug . $list_suffix;
|
464 |
+
$list_suffix = self::add_parent_category_id( $parent_category, $list_suffix );
|
465 |
+
}
|
466 |
+
|
467 |
+
return $list_suffix;
|
468 |
+
}
|
469 |
+
|
470 |
+
public static function get_list_id_suffix()
|
471 |
+
{
|
472 |
+
$list_suffix = '';
|
473 |
+
|
474 |
+
if ( is_product_category() ) {
|
475 |
+
$category = get_queried_object();
|
476 |
+
$list_suffix = '.' . $category->slug;
|
477 |
+
$list_suffix = self::add_parent_category_id( $category, $list_suffix );
|
478 |
+
} else {
|
479 |
+
|
480 |
+
if ( is_product_tag() ) {
|
481 |
+
$tag = get_queried_object();
|
482 |
+
$list_suffix = '.' . $tag->slug;
|
483 |
+
}
|
484 |
+
|
485 |
+
}
|
486 |
+
|
487 |
+
return $list_suffix;
|
488 |
+
}
|
489 |
+
|
490 |
+
public static function add_parent_category_name( $category, $list_suffix )
|
491 |
+
{
|
492 |
+
|
493 |
+
if ( $category->parent > 0 ) {
|
494 |
+
$parent_category = get_term_by( 'id', $category->parent, 'product_cat' );
|
495 |
+
$list_suffix = ' | ' . wp_specialchars_decode( $parent_category->name ) . $list_suffix;
|
496 |
+
$list_suffix = self::add_parent_category_name( $parent_category, $list_suffix );
|
497 |
+
}
|
498 |
+
|
499 |
+
return $list_suffix;
|
500 |
+
}
|
501 |
+
|
502 |
+
public static function get_list_name_suffix()
|
503 |
+
{
|
504 |
+
$list_suffix = '';
|
505 |
+
|
506 |
+
if ( is_product_category() ) {
|
507 |
+
$category = get_queried_object();
|
508 |
+
$list_suffix = ' | ' . wp_specialchars_decode( $category->name );
|
509 |
+
$list_suffix = self::add_parent_category_name( $category, $list_suffix );
|
510 |
+
} else {
|
511 |
+
|
512 |
+
if ( is_product_tag() ) {
|
513 |
+
$tag = get_queried_object();
|
514 |
+
$list_suffix = ' | ' . wp_specialchars_decode( $tag->name );
|
515 |
+
}
|
516 |
+
|
517 |
+
}
|
518 |
+
|
519 |
+
return $list_suffix;
|
520 |
+
}
|
521 |
+
|
522 |
+
}
|
classes/pixels/class-pixel-manager.php
CHANGED
@@ -6,8 +6,11 @@ use WCPM\Classes\Admin\Environment_Check ;
|
|
6 |
use WCPM\Classes\Admin\Validations ;
|
7 |
use WCPM\Classes\Data\GA4_Data_API ;
|
8 |
use WCPM\Classes\Helpers ;
|
|
|
|
|
9 |
use WCPM\Classes\Http\Facebook_CAPI ;
|
10 |
use WCPM\Classes\Http\Google_MP ;
|
|
|
11 |
use WCPM\Classes\Pixels\Facebook\Facebook_Microdata ;
|
12 |
use WCPM\Classes\Pixels\Facebook\Facebook_Pixel_Manager ;
|
13 |
use WCPM\Classes\Pixels\Google\Google ;
|
@@ -20,8 +23,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
20 |
|
21 |
class Pixel_Manager
|
22 |
{
|
23 |
-
use Trait_Product ;
|
24 |
-
use Trait_Shop ;
|
25 |
protected $options ;
|
26 |
protected $options_obj ;
|
27 |
protected $cart ;
|
@@ -90,13 +91,16 @@ class Pixel_Manager
|
|
90 |
if ( $this->facebook_active ) {
|
91 |
new Facebook_Pixel_Manager( $this->options );
|
92 |
}
|
|
|
|
|
|
|
93 |
add_action( 'wp_head', function () {
|
94 |
$this->inject_wpm_closing();
|
95 |
} );
|
96 |
/**
|
97 |
* Front-end script section
|
98 |
*/
|
99 |
-
if (
|
100 |
add_action( 'wp_enqueue_scripts', [ $this, 'wpm_front_end_scripts' ] );
|
101 |
}
|
102 |
add_action( 'wp_ajax_pmw_get_cart_items', [ $this, 'ajax_pmw_get_cart_items' ] );
|
@@ -241,6 +245,9 @@ class Pixel_Manager
|
|
241 |
|
242 |
public function register_rest_routes()
|
243 |
{
|
|
|
|
|
|
|
244 |
register_rest_route( $this->rest_namespace, '/test/', [
|
245 |
'methods' => 'POST',
|
246 |
'callback' => function () {
|
@@ -250,6 +257,9 @@ class Pixel_Manager
|
|
250 |
return true;
|
251 |
},
|
252 |
] );
|
|
|
|
|
|
|
253 |
register_rest_route( $this->rest_namespace, '/test/', [
|
254 |
'methods' => 'GET',
|
255 |
'callback' => function () {
|
@@ -266,11 +276,17 @@ class Pixel_Manager
|
|
266 |
return current_user_can( 'manage_options' );
|
267 |
},
|
268 |
] );
|
|
|
|
|
|
|
|
|
269 |
register_rest_route( $this->rest_namespace, '/products/', [
|
270 |
'methods' => 'POST',
|
271 |
'callback' => function ( $request ) {
|
272 |
$request_decoded = $request->get_json_params();
|
273 |
$product_ids = Helpers::generic_sanitization( $request_decoded['productIds'] );
|
|
|
|
|
274 |
|
275 |
if ( !$product_ids ) {
|
276 |
wp_send_json_error( 'No product ids provided' );
|
@@ -299,6 +315,10 @@ class Pixel_Manager
|
|
299 |
'methods' => 'POST',
|
300 |
'callback' => function ( $request ) {
|
301 |
$data = $request->get_json_params();
|
|
|
|
|
|
|
|
|
302 |
$order_id = filter_var( $data['order_id'], FILTER_SANITIZE_NUMBER_INT );
|
303 |
$source = filter_var( $data['source'], FILTER_SANITIZE_STRING );
|
304 |
|
@@ -327,7 +347,7 @@ class Pixel_Manager
|
|
327 |
$adjusted_value = $order_total - $refunded_amount;
|
328 |
// Calculate the new order value considering the order total logic that has been applied by the user
|
329 |
$adjusted_value_percentage = $adjusted_value / $order_total;
|
330 |
-
$adjusted_value =
|
331 |
return wc_format_decimal( $adjusted_value, 2 );
|
332 |
}
|
333 |
|
@@ -362,7 +382,7 @@ class Pixel_Manager
|
|
362 |
if ( $order->get_status() === 'failed' || $order->get_status() === 'cancelled' || $order->get_status() === 'refunded' || $order->get_status() === 'on-hold' || $order->get_status() === 'pending' ) {
|
363 |
return false;
|
364 |
}
|
365 |
-
if (
|
366 |
return false;
|
367 |
}
|
368 |
return true;
|
@@ -381,10 +401,18 @@ class Pixel_Manager
|
|
381 |
if ( isset( $data['facebook'] ) ) {
|
382 |
( new Facebook_CAPI( $this->options ) )->send_facebook_capi_event( $data['facebook'] );
|
383 |
}
|
|
|
|
|
|
|
|
|
384 |
}
|
385 |
|
386 |
public function wpm_save_imported_settings( $request )
|
387 |
{
|
|
|
|
|
|
|
|
|
388 |
$options = $request->get_params();
|
389 |
// Sanitize nested array $options
|
390 |
$options = Helpers::generic_sanitization( $options );
|
@@ -411,7 +439,7 @@ class Pixel_Manager
|
|
411 |
|
412 |
if ( is_cart() || is_checkout() ) {
|
413 |
if ( $this->options_obj->facebook->pixel_id && $this->options_obj->facebook->capi->token ) {
|
414 |
-
( new Facebook_CAPI( $this->options ) )->
|
415 |
}
|
416 |
if ( $this->google->is_google_analytics_active() ) {
|
417 |
( new Google_MP( $this->options ) )->wpm_google_analytics_set_session_data();
|
@@ -494,7 +522,7 @@ class Pixel_Manager
|
|
494 |
$product = wc_get_product( get_the_id() );
|
495 |
|
496 |
if ( is_object( $product ) ) {
|
497 |
-
|
498 |
} else {
|
499 |
wc_get_logger()->debug( 'woocommerce_inject_product_data_on_product_page provided no product on a product page: .' . get_the_id(), [
|
500 |
'source' => 'wpm',
|
@@ -506,9 +534,9 @@ class Pixel_Manager
|
|
506 |
$product = wc_get_product( $product_id );
|
507 |
|
508 |
if ( is_object( $product ) ) {
|
509 |
-
|
510 |
} else {
|
511 |
-
|
512 |
}
|
513 |
|
514 |
}
|
@@ -526,9 +554,9 @@ class Pixel_Manager
|
|
526 |
$variable_product = wc_get_product( $variation['variation_id'] );
|
527 |
|
528 |
if ( is_object( $variable_product ) ) {
|
529 |
-
|
530 |
} else {
|
531 |
-
|
532 |
}
|
533 |
|
534 |
}
|
@@ -542,13 +570,13 @@ class Pixel_Manager
|
|
542 |
public function action_woocommerce_after_shop_loop_item()
|
543 |
{
|
544 |
global $product ;
|
545 |
-
|
546 |
}
|
547 |
|
548 |
// product views generated by a gutenberg block instead of a shortcode
|
549 |
public function wc_add_data_to_gutenberg_block( $html, $data, $product )
|
550 |
{
|
551 |
-
return $html .
|
552 |
}
|
553 |
|
554 |
public function wpm_wp_footer()
|
@@ -585,7 +613,7 @@ class Pixel_Manager
|
|
585 |
$data = [
|
586 |
'cart' => (object) [],
|
587 |
'cart_item_keys' => (object) [],
|
588 |
-
'orderDeduplication' => $this->options['shop']['order_deduplication'] &&
|
589 |
'position' => 1,
|
590 |
'viewItemListTrigger' => $this->view_item_list_trigger_settings(),
|
591 |
'version' => [
|
@@ -656,7 +684,7 @@ class Pixel_Manager
|
|
656 |
'conversionIds' => (object) $this->google->get_google_ads_conversion_ids(),
|
657 |
'dynamic_remarketing' => [
|
658 |
'status' => (bool) $this->options_obj->google->ads->dynamic_remarketing,
|
659 |
-
'id_type' =>
|
660 |
'send_events_with_parent_ids' => apply_filters( 'wpm_send_events_with_parent_ids', apply_filters_deprecated(
|
661 |
'wooptpm_send_events_with_parent_ids',
|
662 |
[ true ],
|
@@ -699,7 +727,7 @@ class Pixel_Manager
|
|
699 |
return [
|
700 |
'uet_tag_id' => $this->options_obj->bing->uet_tag_id,
|
701 |
'dynamic_remarketing' => [
|
702 |
-
'id_type' =>
|
703 |
],
|
704 |
];
|
705 |
}
|
@@ -709,9 +737,10 @@ class Pixel_Manager
|
|
709 |
$data = [
|
710 |
'pixel_id' => $this->options_obj->facebook->pixel_id,
|
711 |
'dynamic_remarketing' => [
|
712 |
-
'id_type' =>
|
713 |
],
|
714 |
'capi' => (bool) $this->options_obj->facebook->capi->token,
|
|
|
715 |
'exclusion_patterns' => apply_filters( 'pmw_facebook_tracking_exclusion_patterns', [] ),
|
716 |
];
|
717 |
if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() && is_product() && $this->options_obj->facebook->microdata ) {
|
@@ -732,7 +761,7 @@ class Pixel_Manager
|
|
732 |
$data = [
|
733 |
'pixel_id' => $this->options_obj->pinterest->pixel_id,
|
734 |
'dynamic_remarketing' => [
|
735 |
-
'id_type' =>
|
736 |
],
|
737 |
'enhanced_match_email' => $this->get_user_email(),
|
738 |
];
|
@@ -759,7 +788,7 @@ class Pixel_Manager
|
|
759 |
return [
|
760 |
'pixel_id' => $this->options_obj->snapchat->pixel_id,
|
761 |
'dynamic_remarketing' => [
|
762 |
-
'id_type' =>
|
763 |
],
|
764 |
];
|
765 |
}
|
@@ -769,15 +798,10 @@ class Pixel_Manager
|
|
769 |
return [
|
770 |
'pixel_id' => $this->options_obj->tiktok->pixel_id,
|
771 |
'dynamic_remarketing' => [
|
772 |
-
'id_type' =>
|
773 |
],
|
774 |
-
'
|
775 |
-
'
|
776 |
-
[ 'CompletePayment' ],
|
777 |
-
'1.25.1',
|
778 |
-
null,
|
779 |
-
'This filter has been deprecated without replacement'
|
780 |
-
),
|
781 |
];
|
782 |
}
|
783 |
|
@@ -786,7 +810,7 @@ class Pixel_Manager
|
|
786 |
return [
|
787 |
'pixel_id' => $this->options_obj->twitter->pixel_id,
|
788 |
'dynamic_remarketing' => [
|
789 |
-
'id_type' =>
|
790 |
],
|
791 |
];
|
792 |
}
|
@@ -799,7 +823,7 @@ class Pixel_Manager
|
|
799 |
if ( !$this->pmw_get_current_order() ) {
|
800 |
return array_merge( $data, [] );
|
801 |
}
|
802 |
-
if (
|
803 |
return array_merge( $data, [] );
|
804 |
}
|
805 |
return array_merge( $data, $this->get_order_data( $this->pmw_get_current_order() ) );
|
@@ -814,27 +838,27 @@ class Pixel_Manager
|
|
814 |
'id' => (int) $order->get_id(),
|
815 |
'number' => (string) $order->get_order_number(),
|
816 |
'affiliation' => (string) get_bloginfo( 'name' ),
|
817 |
-
'currency' => (string)
|
818 |
-
'value_filtered' => (double)
|
819 |
'value_regular' => (double) $order->get_total(),
|
820 |
'discount' => (double) $order->get_total_discount(),
|
821 |
'tax' => (double) $order->get_total_tax(),
|
822 |
'shipping' => (double) $order->get_shipping_total(),
|
823 |
'coupon' => implode( ',', $order->get_coupon_codes() ),
|
824 |
'aw_merchant_id' => ( (int) $this->options['google']['ads']['aw_merchant_id'] ? (int) $this->options['google']['ads']['aw_merchant_id'] : '' ),
|
825 |
-
'aw_feed_country' => (string)
|
826 |
'aw_feed_language' => (string) $this->google->get_gmc_language(),
|
827 |
-
'new_customer' =>
|
828 |
-
'quantity' => (int) count(
|
829 |
-
'items' =>
|
830 |
'customer_id' => $order->get_customer_id(),
|
831 |
'user_id' => $order->get_user_id(),
|
832 |
];
|
833 |
// Process customer lifetime value
|
834 |
|
835 |
-
if (
|
836 |
-
$data['order']['clv_order_total'] =
|
837 |
-
$data['order']['clv_order_value_filtered'] =
|
838 |
}
|
839 |
|
840 |
// set em (email)
|
@@ -843,7 +867,7 @@ class Pixel_Manager
|
|
843 |
|
844 |
if ( $order->get_billing_phone() ) {
|
845 |
$phone = $order->get_billing_phone();
|
846 |
-
$phone =
|
847 |
$data['order']['billing_phone'] = $phone;
|
848 |
}
|
849 |
|
@@ -909,6 +933,14 @@ class Pixel_Manager
|
|
909 |
if ( isset( $current_user->billing_phone ) ) {
|
910 |
$data['plain']['phone'] = trim( $current_user->billing_phone );
|
911 |
$data['facebook']['phone'] = str_replace( '+', '', trim( strtolower( $current_user->billing_phone ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
}
|
913 |
|
914 |
|
@@ -943,7 +975,7 @@ class Pixel_Manager
|
|
943 |
protected function get_order_products( $order )
|
944 |
{
|
945 |
$order_products = [];
|
946 |
-
foreach ( (array)
|
947 |
$order_item_data = $order_item->get_data();
|
948 |
if ( 0 !== $order_item_data['variation_id'] ) {
|
949 |
// add variation
|
@@ -959,7 +991,7 @@ class Pixel_Manager
|
|
959 |
$product = wc_get_product( $product_id );
|
960 |
|
961 |
if ( !is_object( $product ) ) {
|
962 |
-
|
963 |
return [];
|
964 |
}
|
965 |
|
@@ -967,15 +999,15 @@ class Pixel_Manager
|
|
967 |
'product_id' => $product->get_id(),
|
968 |
'name' => $product->get_name(),
|
969 |
'type' => $product->get_type(),
|
970 |
-
'dyn_r_ids' =>
|
971 |
-
'brand' => (string)
|
972 |
-
'category' => (array)
|
973 |
-
'variant_name' => ( (string) ($product->get_type() === 'variation') ?
|
974 |
];
|
975 |
|
976 |
if ( $product->get_type() === 'variation' ) {
|
977 |
$parent_product = wc_get_product( $product->get_parent_id() );
|
978 |
-
$data['brand'] =
|
979 |
}
|
980 |
|
981 |
return $data;
|
@@ -1016,7 +1048,7 @@ class Pixel_Manager
|
|
1016 |
private function increase_conversion_count_for_ratings( $order )
|
1017 |
{
|
1018 |
|
1019 |
-
if (
|
1020 |
$ratings = get_option( WPM_DB_RATINGS );
|
1021 |
if ( !isset( $ratings['conversions_count'] ) ) {
|
1022 |
$ratings['conversions_count'] = 0;
|
@@ -1024,7 +1056,7 @@ class Pixel_Manager
|
|
1024 |
$ratings['conversions_count'] = $ratings['conversions_count'] + 1;
|
1025 |
update_option( WPM_DB_RATINGS, $ratings );
|
1026 |
} else {
|
1027 |
-
|
1028 |
}
|
1029 |
|
1030 |
}
|
@@ -1038,7 +1070,7 @@ class Pixel_Manager
|
|
1038 |
$product = wc_get_product( $value['data']->get_id() );
|
1039 |
|
1040 |
if ( !is_object( $product ) ) {
|
1041 |
-
|
1042 |
continue;
|
1043 |
}
|
1044 |
|
@@ -1048,9 +1080,9 @@ class Pixel_Manager
|
|
1048 |
];
|
1049 |
$data['cart'][$product->get_id()] = [
|
1050 |
'id' => (string) $product->get_id(),
|
1051 |
-
'dyn_r_ids' =>
|
1052 |
'name' => $product->get_name(),
|
1053 |
-
'brand' =>
|
1054 |
'quantity' => (int) $value['quantity'],
|
1055 |
'price' => (double) $product->get_price(),
|
1056 |
'isVariation' => false,
|
@@ -1062,8 +1094,8 @@ class Pixel_Manager
|
|
1062 |
if ( $parent_product ) {
|
1063 |
$data['cart'][$product->get_id()]['name'] = $parent_product->get_name();
|
1064 |
$data['cart'][$product->get_id()]['parentId'] = (string) $parent_product->get_id();
|
1065 |
-
$data['cart'][$product->get_id()]['parentId_dyn_r_ids'] =
|
1066 |
-
$data['cart'][$product->get_id()]['brand'] =
|
1067 |
} else {
|
1068 |
wc_get_logger()->debug( 'Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', [
|
1069 |
'source' => 'wpm',
|
@@ -1071,7 +1103,7 @@ class Pixel_Manager
|
|
1071 |
}
|
1072 |
|
1073 |
$data['cart'][$product->get_id()]['isVariation'] = true;
|
1074 |
-
$data['cart'][$product->get_id()]['category'] =
|
1075 |
$variant_text_array = [];
|
1076 |
$attributes = $product->get_attributes();
|
1077 |
if ( $attributes ) {
|
@@ -1084,7 +1116,7 @@ class Pixel_Manager
|
|
1084 |
$data['cart_item_keys'][$cart_item]['parentId'] = (string) $product->get_parent_id();
|
1085 |
$data['cart_item_keys'][$cart_item]['isVariation'] = true;
|
1086 |
} else {
|
1087 |
-
$data['cart'][$product->get_id()]['category'] =
|
1088 |
}
|
1089 |
|
1090 |
}
|
@@ -1095,6 +1127,8 @@ class Pixel_Manager
|
|
1095 |
{
|
1096 |
$_post = Helpers::get_input_vars( INPUT_POST );
|
1097 |
$product_ids = explode( ',', $_post['productIds'] );
|
|
|
|
|
1098 |
|
1099 |
if ( !$product_ids ) {
|
1100 |
wp_send_json_error();
|
@@ -1121,7 +1155,7 @@ class Pixel_Manager
|
|
1121 |
continue;
|
1122 |
}
|
1123 |
|
1124 |
-
$products[$product_id] =
|
1125 |
}
|
1126 |
return $products;
|
1127 |
}
|
@@ -1129,6 +1163,10 @@ class Pixel_Manager
|
|
1129 |
public function ajax_purchase_pixels_fired_handler()
|
1130 |
{
|
1131 |
$_post = Helpers::get_input_vars( INPUT_POST );
|
|
|
|
|
|
|
|
|
1132 |
|
1133 |
if ( isset( $_post['order_id'] ) && isset( $_post['source'] ) ) {
|
1134 |
$this->save_conversion_pixels_fired_status( $_post['order_id'], $_post['source'] );
|
@@ -1180,6 +1218,7 @@ class Pixel_Manager
|
|
1180 |
[
|
1181 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
1182 |
'root' => esc_url_raw( rest_url() ),
|
|
|
1183 |
]
|
1184 |
);
|
1185 |
}
|
@@ -1210,12 +1249,12 @@ class Pixel_Manager
|
|
1210 |
$data = [];
|
1211 |
|
1212 |
if ( is_product_category() ) {
|
1213 |
-
$data['list_name'] = 'Product Category' .
|
1214 |
-
$data['list_id'] = 'product_category' .
|
1215 |
$data['page_type'] = 'product_category';
|
1216 |
} elseif ( is_product_tag() ) {
|
1217 |
-
$data['list_name'] = 'Product Tag' .
|
1218 |
-
$data['list_id'] = 'product_tag' .
|
1219 |
$data['page_type'] = 'product_tag';
|
1220 |
} elseif ( is_search() ) {
|
1221 |
$data['list_name'] = 'Product Search';
|
@@ -1226,7 +1265,7 @@ class Pixel_Manager
|
|
1226 |
$data['list_id'] = 'product_shop_page_number_' . $this->get_page_number();
|
1227 |
$data['page_type'] = 'product_shop';
|
1228 |
} elseif ( is_product() ) {
|
1229 |
-
$data['list_name'] = 'Product | ' .
|
1230 |
$data['list_id'] = 'product_' . sanitize_title( get_the_title() );
|
1231 |
$data['page_type'] = 'product';
|
1232 |
$product = wc_get_product();
|
@@ -1248,7 +1287,7 @@ class Pixel_Manager
|
|
1248 |
$data['list_id'] = 'checkout';
|
1249 |
$data['page_type'] = 'checkout';
|
1250 |
} elseif ( is_page() ) {
|
1251 |
-
$data['list_name'] = 'Page | ' .
|
1252 |
$data['list_id'] = 'page_' . sanitize_title( get_the_title() );
|
1253 |
$data['page_type'] = 'page';
|
1254 |
} elseif ( is_home() ) {
|
@@ -1256,7 +1295,7 @@ class Pixel_Manager
|
|
1256 |
$data['list_id'] = 'blog_home';
|
1257 |
$data['page_type'] = 'blog_post';
|
1258 |
} elseif ( 'post' === get_post_type() ) {
|
1259 |
-
$data['list_name'] = 'Blog Post | ' .
|
1260 |
$data['list_id'] = 'blog_post_' . sanitize_title( get_the_title() );
|
1261 |
$data['page_type'] = 'blog_post';
|
1262 |
} else {
|
@@ -1301,6 +1340,7 @@ class Pixel_Manager
|
|
1301 |
'userLoggedIn' => is_user_logged_in(),
|
1302 |
'scrollTrackingThresholds' => $this->options_obj->general->scroll_tracker_thresholds,
|
1303 |
'pageId' => get_the_ID(),
|
|
|
1304 |
];
|
1305 |
}
|
1306 |
|
@@ -1333,9 +1373,9 @@ class Pixel_Manager
|
|
1333 |
// https://stackoverflow.com/a/49616130/4688612
|
1334 |
protected function get_order_from_order_received_page()
|
1335 |
{
|
1336 |
-
$order =
|
1337 |
if ( !$order ) {
|
1338 |
-
$order =
|
1339 |
}
|
1340 |
return $order;
|
1341 |
}
|
6 |
use WCPM\Classes\Admin\Validations ;
|
7 |
use WCPM\Classes\Data\GA4_Data_API ;
|
8 |
use WCPM\Classes\Helpers ;
|
9 |
+
use WCPM\Classes\Shop ;
|
10 |
+
use WCPM\Classes\Product ;
|
11 |
use WCPM\Classes\Http\Facebook_CAPI ;
|
12 |
use WCPM\Classes\Http\Google_MP ;
|
13 |
+
use WCPM\Classes\Http\TikTok_EAPI ;
|
14 |
use WCPM\Classes\Pixels\Facebook\Facebook_Microdata ;
|
15 |
use WCPM\Classes\Pixels\Facebook\Facebook_Pixel_Manager ;
|
16 |
use WCPM\Classes\Pixels\Google\Google ;
|
23 |
|
24 |
class Pixel_Manager
|
25 |
{
|
|
|
|
|
26 |
protected $options ;
|
27 |
protected $options_obj ;
|
28 |
protected $cart ;
|
91 |
if ( $this->facebook_active ) {
|
92 |
new Facebook_Pixel_Manager( $this->options );
|
93 |
}
|
94 |
+
if ( wpm_fs()->is__premium_only() && $this->is_tiktok_eapi_active__premium_only() ) {
|
95 |
+
TikTok_EAPI::get_instance();
|
96 |
+
}
|
97 |
add_action( 'wp_head', function () {
|
98 |
$this->inject_wpm_closing();
|
99 |
} );
|
100 |
/**
|
101 |
* Front-end script section
|
102 |
*/
|
103 |
+
if ( Shop::track_user() ) {
|
104 |
add_action( 'wp_enqueue_scripts', [ $this, 'wpm_front_end_scripts' ] );
|
105 |
}
|
106 |
add_action( 'wp_ajax_pmw_get_cart_items', [ $this, 'ajax_pmw_get_cart_items' ] );
|
245 |
|
246 |
public function register_rest_routes()
|
247 |
{
|
248 |
+
/**
|
249 |
+
* Testing endpoint which helps to verify if the REST API is working
|
250 |
+
*/
|
251 |
register_rest_route( $this->rest_namespace, '/test/', [
|
252 |
'methods' => 'POST',
|
253 |
'callback' => function () {
|
257 |
return true;
|
258 |
},
|
259 |
] );
|
260 |
+
/**
|
261 |
+
* Testing endpoint which helps to verify if the REST API is working
|
262 |
+
*/
|
263 |
register_rest_route( $this->rest_namespace, '/test/', [
|
264 |
'methods' => 'GET',
|
265 |
'callback' => function () {
|
276 |
return current_user_can( 'manage_options' );
|
277 |
},
|
278 |
] );
|
279 |
+
/**
|
280 |
+
* No nonce verification required as we only request public data
|
281 |
+
* from the server.
|
282 |
+
*/
|
283 |
register_rest_route( $this->rest_namespace, '/products/', [
|
284 |
'methods' => 'POST',
|
285 |
'callback' => function ( $request ) {
|
286 |
$request_decoded = $request->get_json_params();
|
287 |
$product_ids = Helpers::generic_sanitization( $request_decoded['productIds'] );
|
288 |
+
// Prevent server overload if too many products are requested
|
289 |
+
$product_ids = ( count( $product_ids ) > 50 ? array_slice( $product_ids, 0, 50 ) : $product_ids );
|
290 |
|
291 |
if ( !$product_ids ) {
|
292 |
wp_send_json_error( 'No product ids provided' );
|
315 |
'methods' => 'POST',
|
316 |
'callback' => function ( $request ) {
|
317 |
$data = $request->get_json_params();
|
318 |
+
// Verify nonce
|
319 |
+
if ( !wp_verify_nonce( $data['nonce'] ) ) {
|
320 |
+
wp_send_json_error( 'Invalid nonce' );
|
321 |
+
}
|
322 |
$order_id = filter_var( $data['order_id'], FILTER_SANITIZE_NUMBER_INT );
|
323 |
$source = filter_var( $data['source'], FILTER_SANITIZE_STRING );
|
324 |
|
347 |
$adjusted_value = $order_total - $refunded_amount;
|
348 |
// Calculate the new order value considering the order total logic that has been applied by the user
|
349 |
$adjusted_value_percentage = $adjusted_value / $order_total;
|
350 |
+
$adjusted_value = Shop::wpm_get_order_total( $order ) * $adjusted_value_percentage;
|
351 |
return wc_format_decimal( $adjusted_value, 2 );
|
352 |
}
|
353 |
|
382 |
if ( $order->get_status() === 'failed' || $order->get_status() === 'cancelled' || $order->get_status() === 'refunded' || $order->get_status() === 'on-hold' || $order->get_status() === 'pending' ) {
|
383 |
return false;
|
384 |
}
|
385 |
+
if ( Shop::has_conversion_pixel_already_fired( $order ) ) {
|
386 |
return false;
|
387 |
}
|
388 |
return true;
|
401 |
if ( isset( $data['facebook'] ) ) {
|
402 |
( new Facebook_CAPI( $this->options ) )->send_facebook_capi_event( $data['facebook'] );
|
403 |
}
|
404 |
+
// Send Tiktok Events API event
|
405 |
+
if ( isset( $data['tiktok'] ) ) {
|
406 |
+
TikTok_EAPI::send_tiktok_eapi_event( $data['tiktok'] );
|
407 |
+
}
|
408 |
}
|
409 |
|
410 |
public function wpm_save_imported_settings( $request )
|
411 |
{
|
412 |
+
// Verify nonce
|
413 |
+
if ( !wp_verify_nonce( $request->get_header( 'X-WP-Nonce' ), 'wp_rest' ) ) {
|
414 |
+
wp_send_json_error( 'Invalid nonce' );
|
415 |
+
}
|
416 |
$options = $request->get_params();
|
417 |
// Sanitize nested array $options
|
418 |
$options = Helpers::generic_sanitization( $options );
|
439 |
|
440 |
if ( is_cart() || is_checkout() ) {
|
441 |
if ( $this->options_obj->facebook->pixel_id && $this->options_obj->facebook->capi->token ) {
|
442 |
+
( new Facebook_CAPI( $this->options ) )->pmw_facebook_set_session_identifiers();
|
443 |
}
|
444 |
if ( $this->google->is_google_analytics_active() ) {
|
445 |
( new Google_MP( $this->options ) )->wpm_google_analytics_set_session_data();
|
522 |
$product = wc_get_product( get_the_id() );
|
523 |
|
524 |
if ( is_object( $product ) ) {
|
525 |
+
Product::get_product_data_layer_script( $product, false, true );
|
526 |
} else {
|
527 |
wc_get_logger()->debug( 'woocommerce_inject_product_data_on_product_page provided no product on a product page: .' . get_the_id(), [
|
528 |
'source' => 'wpm',
|
534 |
$product = wc_get_product( $product_id );
|
535 |
|
536 |
if ( is_object( $product ) ) {
|
537 |
+
Product::get_product_data_layer_script( $product, false, true );
|
538 |
} else {
|
539 |
+
Product::log_problematic_product_id( $product_id );
|
540 |
}
|
541 |
|
542 |
}
|
554 |
$variable_product = wc_get_product( $variation['variation_id'] );
|
555 |
|
556 |
if ( is_object( $variable_product ) ) {
|
557 |
+
Product::get_product_data_layer_script( $variable_product, false, true );
|
558 |
} else {
|
559 |
+
Product::log_problematic_product_id( $variation['variation_id'] );
|
560 |
}
|
561 |
|
562 |
}
|
570 |
public function action_woocommerce_after_shop_loop_item()
|
571 |
{
|
572 |
global $product ;
|
573 |
+
Product::get_product_data_layer_script( $product );
|
574 |
}
|
575 |
|
576 |
// product views generated by a gutenberg block instead of a shortcode
|
577 |
public function wc_add_data_to_gutenberg_block( $html, $data, $product )
|
578 |
{
|
579 |
+
return $html . Product::buffer_get_product_data_layer_script( $product );
|
580 |
}
|
581 |
|
582 |
public function wpm_wp_footer()
|
613 |
$data = [
|
614 |
'cart' => (object) [],
|
615 |
'cart_item_keys' => (object) [],
|
616 |
+
'orderDeduplication' => $this->options['shop']['order_deduplication'] && !Shop::is_nodedupe_parameter_set(),
|
617 |
'position' => 1,
|
618 |
'viewItemListTrigger' => $this->view_item_list_trigger_settings(),
|
619 |
'version' => [
|
684 |
'conversionIds' => (object) $this->google->get_google_ads_conversion_ids(),
|
685 |
'dynamic_remarketing' => [
|
686 |
'status' => (bool) $this->options_obj->google->ads->dynamic_remarketing,
|
687 |
+
'id_type' => Product::get_dyn_r_id_type( 'google' ),
|
688 |
'send_events_with_parent_ids' => apply_filters( 'wpm_send_events_with_parent_ids', apply_filters_deprecated(
|
689 |
'wooptpm_send_events_with_parent_ids',
|
690 |
[ true ],
|
727 |
return [
|
728 |
'uet_tag_id' => $this->options_obj->bing->uet_tag_id,
|
729 |
'dynamic_remarketing' => [
|
730 |
+
'id_type' => Product::get_dyn_r_id_type( 'bing' ),
|
731 |
],
|
732 |
];
|
733 |
}
|
737 |
$data = [
|
738 |
'pixel_id' => $this->options_obj->facebook->pixel_id,
|
739 |
'dynamic_remarketing' => [
|
740 |
+
'id_type' => Product::get_dyn_r_id_type( 'facebook' ),
|
741 |
],
|
742 |
'capi' => (bool) $this->options_obj->facebook->capi->token,
|
743 |
+
'advanced_matching' => (bool) $this->options_obj->facebook->capi->user_transparency->send_additional_client_identifiers,
|
744 |
'exclusion_patterns' => apply_filters( 'pmw_facebook_tracking_exclusion_patterns', [] ),
|
745 |
];
|
746 |
if ( wpm_fs()->is__premium_only() && Environment_Check::get_instance()->is_woocommerce_active() && is_product() && $this->options_obj->facebook->microdata ) {
|
761 |
$data = [
|
762 |
'pixel_id' => $this->options_obj->pinterest->pixel_id,
|
763 |
'dynamic_remarketing' => [
|
764 |
+
'id_type' => Product::get_dyn_r_id_type( 'pinterest' ),
|
765 |
],
|
766 |
'enhanced_match_email' => $this->get_user_email(),
|
767 |
];
|
788 |
return [
|
789 |
'pixel_id' => $this->options_obj->snapchat->pixel_id,
|
790 |
'dynamic_remarketing' => [
|
791 |
+
'id_type' => Product::get_dyn_r_id_type( 'snapchat' ),
|
792 |
],
|
793 |
];
|
794 |
}
|
798 |
return [
|
799 |
'pixel_id' => $this->options_obj->tiktok->pixel_id,
|
800 |
'dynamic_remarketing' => [
|
801 |
+
'id_type' => Product::get_dyn_r_id_type( 'tiktok' ),
|
802 |
],
|
803 |
+
'eapi' => (bool) $this->options_obj->tiktok->eapi->token,
|
804 |
+
'advanced_matching' => (bool) $this->options_obj->tiktok->advanced_matching,
|
|
|
|
|
|
|
|
|
|
|
805 |
];
|
806 |
}
|
807 |
|
810 |
return [
|
811 |
'pixel_id' => $this->options_obj->twitter->pixel_id,
|
812 |
'dynamic_remarketing' => [
|
813 |
+
'id_type' => Product::get_dyn_r_id_type( 'twitter' ),
|
814 |
],
|
815 |
];
|
816 |
}
|
823 |
if ( !$this->pmw_get_current_order() ) {
|
824 |
return array_merge( $data, [] );
|
825 |
}
|
826 |
+
if ( !Shop::can_order_confirmation_be_processed( $this->pmw_get_current_order() ) ) {
|
827 |
return array_merge( $data, [] );
|
828 |
}
|
829 |
return array_merge( $data, $this->get_order_data( $this->pmw_get_current_order() ) );
|
838 |
'id' => (int) $order->get_id(),
|
839 |
'number' => (string) $order->get_order_number(),
|
840 |
'affiliation' => (string) get_bloginfo( 'name' ),
|
841 |
+
'currency' => (string) Shop::get_order_currency( $order ),
|
842 |
+
'value_filtered' => (double) Shop::wpm_get_order_total( $order ),
|
843 |
'value_regular' => (double) $order->get_total(),
|
844 |
'discount' => (double) $order->get_total_discount(),
|
845 |
'tax' => (double) $order->get_total_tax(),
|
846 |
'shipping' => (double) $order->get_shipping_total(),
|
847 |
'coupon' => implode( ',', $order->get_coupon_codes() ),
|
848 |
'aw_merchant_id' => ( (int) $this->options['google']['ads']['aw_merchant_id'] ? (int) $this->options['google']['ads']['aw_merchant_id'] : '' ),
|
849 |
+
'aw_feed_country' => (string) Helpers::get_visitor_country(),
|
850 |
'aw_feed_language' => (string) $this->google->get_gmc_language(),
|
851 |
+
'new_customer' => Shop::is_new_customer( $order ),
|
852 |
+
'quantity' => (int) count( Product::wpm_get_order_items( $order ) ),
|
853 |
+
'items' => Product::get_front_end_order_items( $order ),
|
854 |
'customer_id' => $order->get_customer_id(),
|
855 |
'user_id' => $order->get_user_id(),
|
856 |
];
|
857 |
// Process customer lifetime value
|
858 |
|
859 |
+
if ( Shop::can_clv_query_be_run( $order->get_billing_email() ) ) {
|
860 |
+
$data['order']['clv_order_total'] = Shop::get_clv_order_total_by_billing_email( $order->get_billing_email() );
|
861 |
+
$data['order']['clv_order_value_filtered'] = Shop::get_clv_value_filtered_by_billing_email( $order->get_billing_email() );
|
862 |
}
|
863 |
|
864 |
// set em (email)
|
867 |
|
868 |
if ( $order->get_billing_phone() ) {
|
869 |
$phone = $order->get_billing_phone();
|
870 |
+
$phone = Helpers::get_e164_formatted_phone_number( $phone, $order->get_billing_country() );
|
871 |
$data['order']['billing_phone'] = $phone;
|
872 |
}
|
873 |
|
933 |
if ( isset( $current_user->billing_phone ) ) {
|
934 |
$data['plain']['phone'] = trim( $current_user->billing_phone );
|
935 |
$data['facebook']['phone'] = str_replace( '+', '', trim( strtolower( $current_user->billing_phone ) ) );
|
936 |
+
$data['phone'] = [
|
937 |
+
'raw' => trim( $current_user->billing_phone ),
|
938 |
+
'e164' => Helpers::get_e164_formatted_phone_number( trim( $current_user->billing_phone ), Helpers::get_user_country_code( $current_user ) ),
|
939 |
+
];
|
940 |
+
$data['sha256']['phone'] = [
|
941 |
+
'raw' => hash( 'sha256', trim( $current_user->billing_phone ) ),
|
942 |
+
'e164' => hash( 'sha256', Helpers::get_e164_formatted_phone_number( trim( $current_user->billing_phone ), Helpers::get_user_country_code( $current_user ) ) ),
|
943 |
+
];
|
944 |
}
|
945 |
|
946 |
|
975 |
protected function get_order_products( $order )
|
976 |
{
|
977 |
$order_products = [];
|
978 |
+
foreach ( (array) Product::wpm_get_order_items( $order ) as $order_item ) {
|
979 |
$order_item_data = $order_item->get_data();
|
980 |
if ( 0 !== $order_item_data['variation_id'] ) {
|
981 |
// add variation
|
991 |
$product = wc_get_product( $product_id );
|
992 |
|
993 |
if ( !is_object( $product ) ) {
|
994 |
+
Product::log_problematic_product_id( $product_id );
|
995 |
return [];
|
996 |
}
|
997 |
|
999 |
'product_id' => $product->get_id(),
|
1000 |
'name' => $product->get_name(),
|
1001 |
'type' => $product->get_type(),
|
1002 |
+
'dyn_r_ids' => Product::get_dyn_r_ids( $product ),
|
1003 |
+
'brand' => (string) Product::get_brand_name( $product_id ),
|
1004 |
+
'category' => (array) Product::get_product_category( $product_id ),
|
1005 |
+
'variant_name' => ( (string) ($product->get_type() === 'variation') ? Product::get_formatted_variant_text( $product ) : '' ),
|
1006 |
];
|
1007 |
|
1008 |
if ( $product->get_type() === 'variation' ) {
|
1009 |
$parent_product = wc_get_product( $product->get_parent_id() );
|
1010 |
+
$data['brand'] = Product::get_brand_name( $parent_product->get_id() );
|
1011 |
}
|
1012 |
|
1013 |
return $data;
|
1048 |
private function increase_conversion_count_for_ratings( $order )
|
1049 |
{
|
1050 |
|
1051 |
+
if ( Shop::can_order_confirmation_be_processed( $order ) ) {
|
1052 |
$ratings = get_option( WPM_DB_RATINGS );
|
1053 |
if ( !isset( $ratings['conversions_count'] ) ) {
|
1054 |
$ratings['conversions_count'] = 0;
|
1056 |
$ratings['conversions_count'] = $ratings['conversions_count'] + 1;
|
1057 |
update_option( WPM_DB_RATINGS, $ratings );
|
1058 |
} else {
|
1059 |
+
Shop::conversion_pixels_already_fired_html();
|
1060 |
}
|
1061 |
|
1062 |
}
|
1070 |
$product = wc_get_product( $value['data']->get_id() );
|
1071 |
|
1072 |
if ( !is_object( $product ) ) {
|
1073 |
+
Product::log_problematic_product_id( $value['data']->get_id() );
|
1074 |
continue;
|
1075 |
}
|
1076 |
|
1080 |
];
|
1081 |
$data['cart'][$product->get_id()] = [
|
1082 |
'id' => (string) $product->get_id(),
|
1083 |
+
'dyn_r_ids' => Product::get_dyn_r_ids( $product ),
|
1084 |
'name' => $product->get_name(),
|
1085 |
+
'brand' => Product::get_brand_name( $product->get_id() ),
|
1086 |
'quantity' => (int) $value['quantity'],
|
1087 |
'price' => (double) $product->get_price(),
|
1088 |
'isVariation' => false,
|
1094 |
if ( $parent_product ) {
|
1095 |
$data['cart'][$product->get_id()]['name'] = $parent_product->get_name();
|
1096 |
$data['cart'][$product->get_id()]['parentId'] = (string) $parent_product->get_id();
|
1097 |
+
$data['cart'][$product->get_id()]['parentId_dyn_r_ids'] = Product::get_dyn_r_ids( $parent_product );
|
1098 |
+
$data['cart'][$product->get_id()]['brand'] = Product::get_brand_name( $parent_product->get_id() );
|
1099 |
} else {
|
1100 |
wc_get_logger()->debug( 'Variation ' . $product->get_id() . ' doesn\'t link to a valid parent product.', [
|
1101 |
'source' => 'wpm',
|
1103 |
}
|
1104 |
|
1105 |
$data['cart'][$product->get_id()]['isVariation'] = true;
|
1106 |
+
$data['cart'][$product->get_id()]['category'] = Product::get_product_category( $product->get_parent_id() );
|
1107 |
$variant_text_array = [];
|
1108 |
$attributes = $product->get_attributes();
|
1109 |
if ( $attributes ) {
|
1116 |
$data['cart_item_keys'][$cart_item]['parentId'] = (string) $product->get_parent_id();
|
1117 |
$data['cart_item_keys'][$cart_item]['isVariation'] = true;
|
1118 |
} else {
|
1119 |
+
$data['cart'][$product->get_id()]['category'] = Product::get_product_category( $product->get_id() );
|
1120 |
}
|
1121 |
|
1122 |
}
|
1127 |
{
|
1128 |
$_post = Helpers::get_input_vars( INPUT_POST );
|
1129 |
$product_ids = explode( ',', $_post['productIds'] );
|
1130 |
+
// Prevent server overload if too many products are requested
|
1131 |
+
$product_ids = ( count( $product_ids ) > 50 ? array_slice( $product_ids, 0, 50 ) : $product_ids );
|
1132 |
|
1133 |
if ( !$product_ids ) {
|
1134 |
wp_send_json_error();
|
1155 |
continue;
|
1156 |
}
|
1157 |
|
1158 |
+
$products[$product_id] = Product::get_product_details_for_datalayer( $product );
|
1159 |
}
|
1160 |
return $products;
|
1161 |
}
|
1163 |
public function ajax_purchase_pixels_fired_handler()
|
1164 |
{
|
1165 |
$_post = Helpers::get_input_vars( INPUT_POST );
|
1166 |
+
// Verify nonce
|
1167 |
+
if ( !wp_verify_nonce( $_post['nonce'] ) ) {
|
1168 |
+
wp_send_json_error( 'Invalid nonce' );
|
1169 |
+
}
|
1170 |
|
1171 |
if ( isset( $_post['order_id'] ) && isset( $_post['source'] ) ) {
|
1172 |
$this->save_conversion_pixels_fired_status( $_post['order_id'], $_post['source'] );
|
1218 |
[
|
1219 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
1220 |
'root' => esc_url_raw( rest_url() ),
|
1221 |
+
'nonce' => wp_create_nonce(),
|
1222 |
]
|
1223 |
);
|
1224 |
}
|
1249 |
$data = [];
|
1250 |
|
1251 |
if ( is_product_category() ) {
|
1252 |
+
$data['list_name'] = 'Product Category' . Shop::get_list_name_suffix();
|
1253 |
+
$data['list_id'] = 'product_category' . Shop::get_list_id_suffix();
|
1254 |
$data['page_type'] = 'product_category';
|
1255 |
} elseif ( is_product_tag() ) {
|
1256 |
+
$data['list_name'] = 'Product Tag' . Shop::get_list_name_suffix();
|
1257 |
+
$data['list_id'] = 'product_tag' . Shop::get_list_id_suffix();
|
1258 |
$data['page_type'] = 'product_tag';
|
1259 |
} elseif ( is_search() ) {
|
1260 |
$data['list_name'] = 'Product Search';
|
1265 |
$data['list_id'] = 'product_shop_page_number_' . $this->get_page_number();
|
1266 |
$data['page_type'] = 'product_shop';
|
1267 |
} elseif ( is_product() ) {
|
1268 |
+
$data['list_name'] = 'Product | ' . Shop::wpm_get_the_title();
|
1269 |
$data['list_id'] = 'product_' . sanitize_title( get_the_title() );
|
1270 |
$data['page_type'] = 'product';
|
1271 |
$product = wc_get_product();
|
1287 |
$data['list_id'] = 'checkout';
|
1288 |
$data['page_type'] = 'checkout';
|
1289 |
} elseif ( is_page() ) {
|
1290 |
+
$data['list_name'] = 'Page | ' . Shop::wpm_get_the_title();
|
1291 |
$data['list_id'] = 'page_' . sanitize_title( get_the_title() );
|
1292 |
$data['page_type'] = 'page';
|
1293 |
} elseif ( is_home() ) {
|
1295 |
$data['list_id'] = 'blog_home';
|
1296 |
$data['page_type'] = 'blog_post';
|
1297 |
} elseif ( 'post' === get_post_type() ) {
|
1298 |
+
$data['list_name'] = 'Blog Post | ' . Shop::wpm_get_the_title();
|
1299 |
$data['list_id'] = 'blog_post_' . sanitize_title( get_the_title() );
|
1300 |
$data['page_type'] = 'blog_post';
|
1301 |
} else {
|
1340 |
'userLoggedIn' => is_user_logged_in(),
|
1341 |
'scrollTrackingThresholds' => $this->options_obj->general->scroll_tracker_thresholds,
|
1342 |
'pageId' => get_the_ID(),
|
1343 |
+
'excludeDomains' => apply_filters( 'pmw_exclude_domains_from_tracking', [] ),
|
1344 |
];
|
1345 |
}
|
1346 |
|
1373 |
// https://stackoverflow.com/a/49616130/4688612
|
1374 |
protected function get_order_from_order_received_page()
|
1375 |
{
|
1376 |
+
$order = Shop::get_order_from_query_vars();
|
1377 |
if ( !$order ) {
|
1378 |
+
$order = Shop::get_order_with_url_order_key();
|
1379 |
}
|
1380 |
return $order;
|
1381 |
}
|
classes/pixels/class-pixel.php
CHANGED
@@ -10,9 +10,6 @@ if (!defined('ABSPATH')) {
|
|
10 |
|
11 |
class Pixel {
|
12 |
|
13 |
-
use Trait_Product;
|
14 |
-
use Trait_Shop;
|
15 |
-
|
16 |
protected $add_cart_data;
|
17 |
protected $aw_merchant_id;
|
18 |
protected $conversion_id;
|
10 |
|
11 |
class Pixel {
|
12 |
|
|
|
|
|
|
|
13 |
protected $add_cart_data;
|
14 |
protected $aw_merchant_id;
|
15 |
protected $conversion_id;
|
classes/pixels/class-shortcodes.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace WCPM\Classes\Pixels;
|
4 |
|
5 |
use WCPM\Classes\Pixels\Google\Google;
|
|
|
6 |
|
7 |
if (!defined('ABSPATH')) {
|
8 |
exit; // Exit if accessed directly
|
@@ -10,8 +11,6 @@ if (!defined('ABSPATH')) {
|
|
10 |
|
11 |
class Shortcodes extends Pixel {
|
12 |
|
13 |
-
use Trait_Product;
|
14 |
-
|
15 |
private $google;
|
16 |
|
17 |
public function __construct( $options ) {
|
@@ -40,7 +39,7 @@ class Shortcodes extends Pixel {
|
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
-
|
44 |
|
45 |
?>
|
46 |
|
3 |
namespace WCPM\Classes\Pixels;
|
4 |
|
5 |
use WCPM\Classes\Pixels\Google\Google;
|
6 |
+
use WCPM\Classes\Product;
|
7 |
|
8 |
if (!defined('ABSPATH')) {
|
9 |
exit; // Exit if accessed directly
|
11 |
|
12 |
class Shortcodes extends Pixel {
|
13 |
|
|
|
|
|
14 |
private $google;
|
15 |
|
16 |
public function __construct( $options ) {
|
39 |
return;
|
40 |
}
|
41 |
|
42 |
+
Product::get_product_data_layer_script($product, false, false);
|
43 |
|
44 |
?>
|
45 |
|
classes/pixels/facebook/class-facebook-pixel-manager.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace WCPM\Classes\Pixels\Facebook;
|
4 |
|
5 |
use WCPM\Classes\Http\Facebook_CAPI ;
|
6 |
-
use WCPM\Classes\Pixels\Trait_Shop ;
|
7 |
|
8 |
if ( !defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
@@ -12,7 +11,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
12 |
|
13 |
class Facebook_Pixel_Manager
|
14 |
{
|
15 |
-
use Trait_Shop ;
|
16 |
protected $facebook_capi ;
|
17 |
public function __construct( $options )
|
18 |
{
|
3 |
namespace WCPM\Classes\Pixels\Facebook;
|
4 |
|
5 |
use WCPM\Classes\Http\Facebook_CAPI ;
|
|
|
6 |
|
7 |
if ( !defined( 'ABSPATH' ) ) {
|
8 |
exit;
|
11 |
|
12 |
class Facebook_Pixel_Manager
|
13 |
{
|
|
|
14 |
protected $facebook_capi ;
|
15 |
public function __construct( $options )
|
16 |
{
|
classes/pixels/google/class-google-analytics.php
CHANGED
@@ -2,14 +2,11 @@
|
|
2 |
|
3 |
namespace WCPM\Classes\Pixels\Google;
|
4 |
|
5 |
-
use WCPM\Classes\Pixels\Trait_Shop;
|
6 |
-
|
7 |
if (!defined('ABSPATH')) {
|
8 |
exit; // Exit if accessed directly
|
9 |
}
|
10 |
|
11 |
class Google_Analytics extends Google {
|
12 |
-
use Trait_Shop;
|
13 |
|
14 |
public function __construct( $options ) {
|
15 |
parent::__construct($options);
|
2 |
|
3 |
namespace WCPM\Classes\Pixels\Google;
|
4 |
|
|
|
|
|
5 |
if (!defined('ABSPATH')) {
|
6 |
exit; // Exit if accessed directly
|
7 |
}
|
8 |
|
9 |
class Google_Analytics extends Google {
|
|
|
10 |
|
11 |
public function __construct( $options ) {
|
12 |
parent::__construct($options);
|
classes/pixels/google/class-google-pixel-manager.php
CHANGED
@@ -3,10 +3,9 @@
|
|
3 |
namespace WCPM\Classes\Pixels\Google;
|
4 |
|
5 |
use WCPM\Classes\Helpers ;
|
|
|
6 |
use WCPM\Classes\Http\Google_MP_GA4 ;
|
7 |
use WCPM\Classes\Http\Google_MP_UA ;
|
8 |
-
use WCPM\Classes\Pixels\Script_Manager ;
|
9 |
-
use WCPM\Classes\Pixels\Trait_Shop ;
|
10 |
|
11 |
if ( !defined( 'ABSPATH' ) ) {
|
12 |
exit;
|
@@ -15,7 +14,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
15 |
|
16 |
class Google_Pixel_Manager
|
17 |
{
|
18 |
-
use Trait_Shop ;
|
19 |
private $google_pixel ;
|
20 |
private $google_analytics_ua_http_mp ;
|
21 |
private $google_analytics_4_http_mp ;
|
@@ -48,7 +46,7 @@ class Google_Pixel_Manager
|
|
48 |
{
|
49 |
|
50 |
if ( is_user_logged_in() ) {
|
51 |
-
$user_info = get_user_by( 'id',
|
52 |
if ( is_object( $user_info ) ) {
|
53 |
wc_get_logger()->debug( 'Prevented order ID ' . $order->get_id() . ' to be reported through the Measurement Protocol for user ' . $user_info->user_login . ' (roles: ' . implode( ', ', $user_info->roles ) . ')', [
|
54 |
'source' => 'wpm',
|
3 |
namespace WCPM\Classes\Pixels\Google;
|
4 |
|
5 |
use WCPM\Classes\Helpers ;
|
6 |
+
use WCPM\Classes\Shop ;
|
7 |
use WCPM\Classes\Http\Google_MP_GA4 ;
|
8 |
use WCPM\Classes\Http\Google_MP_UA ;
|
|
|
|
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
exit;
|
14 |
|
15 |
class Google_Pixel_Manager
|
16 |
{
|
|
|
17 |
private $google_pixel ;
|
18 |
private $google_analytics_ua_http_mp ;
|
19 |
private $google_analytics_4_http_mp ;
|
46 |
{
|
47 |
|
48 |
if ( is_user_logged_in() ) {
|
49 |
+
$user_info = get_user_by( 'id', Shop::wpm_get_order_user_id( $order ) );
|
50 |
if ( is_object( $user_info ) ) {
|
51 |
wc_get_logger()->debug( 'Prevented order ID ' . $order->get_id() . ' to be reported through the Measurement Protocol for user ' . $user_info->user_login . ' (roles: ' . implode( ', ', $user_info->roles ) . ')', [
|
52 |
'source' => 'wpm',
|
classes/pixels/google/class-google.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
namespace WCPM\Classes\Pixels\Google;
|
4 |
|
5 |
use WCPM\Classes\Admin\Environment_Check ;
|
|
|
|
|
6 |
use WCPM\Classes\Pixels\Pixel ;
|
7 |
-
use WCPM\Classes\Pixels\Trait_Product ;
|
8 |
-
use WCPM\Classes\Pixels\Trait_Shop ;
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
exit;
|
@@ -14,8 +14,6 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
14 |
|
15 |
class Google extends Pixel
|
16 |
{
|
17 |
-
use Trait_Shop ;
|
18 |
-
use Trait_Product ;
|
19 |
private $google_ads_conversion_identifiers ;
|
20 |
public function is_ga4_debug_mode_active()
|
21 |
{
|
@@ -47,7 +45,7 @@ class Google extends Pixel
|
|
47 |
return [];
|
48 |
}
|
49 |
|
50 |
-
$dyn_r_ids =
|
51 |
/**
|
52 |
* Get the name of the product.
|
53 |
* For Variations, fall back to the name in the parent product
|
@@ -57,10 +55,10 @@ class Google extends Pixel
|
|
57 |
if ( $product->get_type() === 'variation' ) {
|
58 |
$parent_product = wc_get_product( $product->get_parent_id() );
|
59 |
$name = $parent_product->get_name();
|
60 |
-
$brand =
|
61 |
} else {
|
62 |
$name = $product->get_name();
|
63 |
-
$brand =
|
64 |
}
|
65 |
|
66 |
return [
|
@@ -69,9 +67,9 @@ class Google extends Pixel
|
|
69 |
'quantity' => (int) $order_item['quantity'],
|
70 |
'affiliation' => (string) get_bloginfo( 'name' ),
|
71 |
'brand' => (string) $brand,
|
72 |
-
'category' => implode( ',',
|
73 |
-
'category_array' =>
|
74 |
-
'variant' => ( (string) ($product->get_type() === 'variation') ?
|
75 |
'price' => (double) $this->wpm_get_order_item_price( $order_item ),
|
76 |
];
|
77 |
}
|
@@ -203,7 +201,7 @@ class Google extends Pixel
|
|
203 |
|
204 |
}
|
205 |
|
206 |
-
return (double) $order_item->get_order()->get_item_total( $order_item,
|
207 |
// return (float) $product->get_price();
|
208 |
}
|
209 |
|
@@ -306,7 +304,7 @@ class Google extends Pixel
|
|
306 |
$customer_data['email'] = (string) $order->get_billing_email();
|
307 |
}
|
308 |
if ( $order->get_billing_phone() ) {
|
309 |
-
$customer_data['phone_number'] =
|
310 |
}
|
311 |
|
312 |
if ( $this->is_shipping_address_set( $order ) ) {
|
3 |
namespace WCPM\Classes\Pixels\Google;
|
4 |
|
5 |
use WCPM\Classes\Admin\Environment_Check ;
|
6 |
+
use WCPM\Classes\Helpers ;
|
7 |
+
use WCPM\Classes\Product ;
|
8 |
use WCPM\Classes\Pixels\Pixel ;
|
|
|
|
|
9 |
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
exit;
|
14 |
|
15 |
class Google extends Pixel
|
16 |
{
|
|
|
|
|
17 |
private $google_ads_conversion_identifiers ;
|
18 |
public function is_ga4_debug_mode_active()
|
19 |
{
|
45 |
return [];
|
46 |
}
|
47 |
|
48 |
+
$dyn_r_ids = Product::get_dyn_r_ids( $product );
|
49 |
/**
|
50 |
* Get the name of the product.
|
51 |
* For Variations, fall back to the name in the parent product
|
55 |
if ( $product->get_type() === 'variation' ) {
|
56 |
$parent_product = wc_get_product( $product->get_parent_id() );
|
57 |
$name = $parent_product->get_name();
|
58 |
+
$brand = Product::get_brand_name( $parent_product->get_id() );
|
59 |
} else {
|
60 |
$name = $product->get_name();
|
61 |
+
$brand = Product::get_brand_name( $product->get_id() );
|
62 |
}
|
63 |
|
64 |
return [
|
67 |
'quantity' => (int) $order_item['quantity'],
|
68 |
'affiliation' => (string) get_bloginfo( 'name' ),
|
69 |
'brand' => (string) $brand,
|
70 |
+
'category' => implode( ',', Product::get_product_category( $product->get_id() ) ),
|
71 |
+
'category_array' => Product::get_product_category( $product->get_id() ),
|
72 |
+
'variant' => ( (string) ($product->get_type() === 'variation') ? Product::get_formatted_variant_text( $product ) : '' ),
|
73 |
'price' => (double) $this->wpm_get_order_item_price( $order_item ),
|
74 |
];
|
75 |
}
|
201 |
|
202 |
}
|
203 |
|
204 |
+
return (double) $order_item->get_order()->get_item_total( $order_item, Product::pmw_output_product_prices_with_tax() );
|
205 |
// return (float) $product->get_price();
|
206 |
}
|
207 |
|
304 |
$customer_data['email'] = (string) $order->get_billing_email();
|
305 |
}
|
306 |
if ( $order->get_billing_phone() ) {
|
307 |
+
$customer_data['phone_number'] = Helpers::get_e164_formatted_phone_number( (string) $order->get_billing_phone(), (string) $order->get_billing_country() );
|
308 |
}
|
309 |
|
310 |
if ( $this->is_shipping_address_set( $order ) ) {
|
js/admin/ask-for-rating.js
CHANGED
@@ -31,14 +31,16 @@ jQuery(function () {
|
|
31 |
e.preventDefault()
|
32 |
|
33 |
let data = {
|
34 |
-
|
35 |
-
|
|
|
36 |
}
|
37 |
|
38 |
-
jQuery.post(
|
39 |
// console.log('Got this from the server: ' + response);
|
40 |
// console.log('update rating done');
|
41 |
})
|
|
|
42 |
jQuery(".wpm-rating-success-notice").remove()
|
43 |
}
|
44 |
})
|
31 |
e.preventDefault()
|
32 |
|
33 |
let data = {
|
34 |
+
action: "wpm_dismissed_notice_handler",
|
35 |
+
nonce : ajax_var.nonce,
|
36 |
+
set : set,
|
37 |
}
|
38 |
|
39 |
+
jQuery.post(ajax_var.url, data, (response) => {
|
40 |
// console.log('Got this from the server: ' + response);
|
41 |
// console.log('update rating done');
|
42 |
})
|
43 |
+
|
44 |
jQuery(".wpm-rating-success-notice").remove()
|
45 |
}
|
46 |
})
|
js/admin/edit-order-page.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function ($) {
|
2 |
+
|
3 |
+
// Get the data element order-id from the div with ID order-attribution-data
|
4 |
+
let orderId = $("#order-attribution-data").data("order-id")
|
5 |
+
|
6 |
+
// use fetch to post data to the server
|
7 |
+
fetch(pmwAdminApi.root + "pmw/v1/ga4/data-api/get-order-attribution-data/", {
|
8 |
+
method : "POST",
|
9 |
+
credentials: "same-origin",
|
10 |
+
headers : {
|
11 |
+
"Content-Type": "application/json",
|
12 |
+
"X-WP-Nonce" : pmwAdminApi.nonce,
|
13 |
+
},
|
14 |
+
body : JSON.stringify(orderId),
|
15 |
+
})
|
16 |
+
.then(response => response.json())
|
17 |
+
.then(async message => {
|
18 |
+
// If message.success is true, then we have data to display
|
19 |
+
if (message.success) {
|
20 |
+
$("#order-attribution-data").html(message.data)
|
21 |
+
} else {
|
22 |
+
// If message.success is false, then we have an error to display
|
23 |
+
// console.log(message)
|
24 |
+
$("#order-attribution-data").html(message.data)
|
25 |
+
}
|
26 |
+
})
|
27 |
+
})
|
28 |
+
|
js/admin/environment-check.js
CHANGED
@@ -1,84 +1,88 @@
|
|
1 |
jQuery(function () {
|
2 |
|
3 |
// disable incompatible plugin warning
|
4 |
-
jQuery(document).on(
|
5 |
-
e.preventDefault()
|
6 |
|
7 |
let data = {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
wpm_send_ajax_data(data);
|
13 |
-
});
|
14 |
-
|
15 |
|
|
|
|
|
16 |
// disable WP Rocket JavaScript concatenation
|
17 |
-
jQuery(document).on(
|
18 |
-
e.preventDefault()
|
19 |
|
20 |
let data = {
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
24 |
|
25 |
-
wpm_send_ajax_data(data)
|
26 |
-
})
|
27 |
|
28 |
// dismiss WP Rocket JavaScript concatenation error
|
29 |
-
jQuery(document).on(
|
30 |
-
e.preventDefault()
|
31 |
|
32 |
let data = {
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
36 |
|
37 |
-
wpm_send_ajax_data(data)
|
38 |
-
})
|
39 |
|
40 |
// disable WP Rocket JavaScript concatenation
|
41 |
-
jQuery(document).on(
|
42 |
-
e.preventDefault()
|
43 |
|
44 |
let data = {
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
48 |
|
49 |
-
wpm_send_ajax_data(data)
|
50 |
-
})
|
51 |
|
52 |
// dismiss WP Rocket JavaScript concatenation error
|
53 |
-
jQuery(document).on(
|
54 |
-
e.preventDefault()
|
55 |
|
56 |
let data = {
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
60 |
|
61 |
-
wpm_send_ajax_data(data)
|
62 |
-
})
|
63 |
|
64 |
// dismiss PayPal standard payment gateway warning
|
65 |
-
jQuery(document).on(
|
66 |
-
e.preventDefault()
|
67 |
|
68 |
let data = {
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
72 |
|
73 |
-
wpm_send_ajax_data(data)
|
74 |
-
})
|
75 |
|
76 |
-
})
|
77 |
|
78 |
function wpm_send_ajax_data(data) {
|
79 |
-
jQuery.post(
|
80 |
// console.log('Got this from the server: ' + response);
|
81 |
// console.log('update rating done');
|
82 |
-
location.reload()
|
83 |
-
})
|
84 |
}
|
1 |
jQuery(function () {
|
2 |
|
3 |
// disable incompatible plugin warning
|
4 |
+
jQuery(document).on("click", ".incompatible-plugin-error-dismissal-button", function (e) {
|
5 |
+
e.preventDefault()
|
6 |
|
7 |
let data = {
|
8 |
+
action : "environment_check_handler",
|
9 |
+
nonce : ajax_var.nonce,
|
10 |
+
disable_warning: jQuery(this).data("plugin-slug"),
|
11 |
+
}
|
|
|
|
|
|
|
12 |
|
13 |
+
wpm_send_ajax_data(data)
|
14 |
+
})
|
15 |
// disable WP Rocket JavaScript concatenation
|
16 |
+
jQuery(document).on("click", "#wpm-wp-rocket-js-concatenation-disable", function (e) {
|
17 |
+
e.preventDefault()
|
18 |
|
19 |
let data = {
|
20 |
+
action: "environment_check_handler",
|
21 |
+
nonce : ajax_var.nonce,
|
22 |
+
set : "disable_wp_rocket_javascript_concatenation",
|
23 |
+
}
|
24 |
|
25 |
+
wpm_send_ajax_data(data)
|
26 |
+
})
|
27 |
|
28 |
// dismiss WP Rocket JavaScript concatenation error
|
29 |
+
jQuery(document).on("click", "#wpm-dismiss-wp-rocket-js-concatenation-error", function (e) {
|
30 |
+
e.preventDefault()
|
31 |
|
32 |
let data = {
|
33 |
+
action: "environment_check_handler",
|
34 |
+
nonce : ajax_var.nonce,
|
35 |
+
set : "dismiss_wp_rocket_javascript_concatenation_error",
|
36 |
+
}
|
37 |
|
38 |
+
wpm_send_ajax_data(data)
|
39 |
+
})
|
40 |
|
41 |
// disable WP Rocket JavaScript concatenation
|
42 |
+
jQuery(document).on("click", "#wpm-litespeed-inline-js-dom-ready-disable", function (e) {
|
43 |
+
e.preventDefault()
|
44 |
|
45 |
let data = {
|
46 |
+
action: "environment_check_handler",
|
47 |
+
nonce : ajax_var.nonce,
|
48 |
+
set : "disable_litespeed_inline_js_dom_ready",
|
49 |
+
}
|
50 |
|
51 |
+
wpm_send_ajax_data(data)
|
52 |
+
})
|
53 |
|
54 |
// dismiss WP Rocket JavaScript concatenation error
|
55 |
+
jQuery(document).on("click", "#wpm-dismiss-litespeed-inline-js-dom-ready-error", function (e) {
|
56 |
+
e.preventDefault()
|
57 |
|
58 |
let data = {
|
59 |
+
action: "environment_check_handler",
|
60 |
+
nonce : ajax_var.nonce,
|
61 |
+
set : "dismiss_litespeed_inline_js_dom_ready",
|
62 |
+
}
|
63 |
|
64 |
+
wpm_send_ajax_data(data)
|
65 |
+
})
|
66 |
|
67 |
// dismiss PayPal standard payment gateway warning
|
68 |
+
jQuery(document).on("click", "#wpm-paypal-standard-error-dismissal-button", function (e) {
|
69 |
+
e.preventDefault()
|
70 |
|
71 |
let data = {
|
72 |
+
action: "environment_check_handler",
|
73 |
+
nonce : ajax_var.nonce,
|
74 |
+
set : "dismiss_paypal_standard_warning",
|
75 |
+
}
|
76 |
|
77 |
+
wpm_send_ajax_data(data)
|
78 |
+
})
|
79 |
|
80 |
+
})
|
81 |
|
82 |
function wpm_send_ajax_data(data) {
|
83 |
+
jQuery.post(ajax_var.url, data, function (response) {
|
84 |
// console.log('Got this from the server: ' + response);
|
85 |
// console.log('update rating done');
|
86 |
+
location.reload()
|
87 |
+
})
|
88 |
}
|
js/admin/helpers.js
CHANGED
@@ -29,12 +29,12 @@ jQuery(function () {
|
|
29 |
|
30 |
(function (wpm, $, undefined) {
|
31 |
|
32 |
-
wpm.saveSettingsToDisk = () => {
|
33 |
let text = document.getElementById("export-settings-json").value
|
34 |
text = text.replace(/\n/g, "\r\n") // To retain the Line breaks.
|
35 |
let blob = new Blob([text], {type: "text/plain"})
|
36 |
let anchor = document.createElement("a")
|
37 |
-
anchor.download = "pixel-manager-
|
38 |
anchor.href = window.URL.createObjectURL(blob)
|
39 |
anchor.target = "_blank"
|
40 |
anchor.style.display = "none" // just to be safe!
|
29 |
|
30 |
(function (wpm, $, undefined) {
|
31 |
|
32 |
+
wpm.saveSettingsToDisk = (version) => {
|
33 |
let text = document.getElementById("export-settings-json").value
|
34 |
text = text.replace(/\n/g, "\r\n") // To retain the Line breaks.
|
35 |
let blob = new Blob([text], {type: "text/plain"})
|
36 |
let anchor = document.createElement("a")
|
37 |
+
anchor.download = "pixel-manager-settings_" + version + '_' + wpm.getCurrentDateForFileName() + ".json"
|
38 |
anchor.href = window.URL.createObjectURL(blob)
|
39 |
anchor.target = "_blank"
|
40 |
anchor.style.display = "none" // just to be safe!
|
js/admin/notifications.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
jQuery(document).on(
|
2 |
|
3 |
jQuery.ajax({
|
4 |
-
url:
|
5 |
data: {
|
6 |
-
action:
|
7 |
-
|
|
|
8 |
})
|
9 |
|
10 |
})
|
1 |
+
jQuery(document).on("click", ".pmw-payment-gateway-notification .notice-dismiss", function () {
|
2 |
|
3 |
jQuery.ajax({
|
4 |
+
url : ajax_var.url,
|
5 |
data: {
|
6 |
+
action: "dismiss_pmw_payment_gateway_notification",
|
7 |
+
nonce : ajax_var.nonce,
|
8 |
+
},
|
9 |
})
|
10 |
|
11 |
})
|
js/admin/wpm-admin-freemius.p1.min.js.br
CHANGED
Binary file
|
js/admin/wpm-admin-freemius.p1.min.js.gz
CHANGED
Binary file
|
js/admin/wpm-admin-freemius.p1.min.js.map.gz
DELETED
Binary file
|
js/admin/wpm-admin.p1.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(()=>{var e={663:()=>{jQuery((function(){jQuery("#debug-info-button").on("click",(function(){jQuery("#debug-info-textarea").select(),document.execCommand("copy")})),jQuery("#wpm_pro_version_demo").on("click",(function(){jQuery("#submit").trigger("click")})),document.getElementById("json-settings-file-input").addEventListener("change",wpm.readSettingsFile,!1),document.getElementById("ga4-data-api-credentials-upload-button")&&(document.getElementById("ga4-data-api-credentials-upload-button").addEventListener("change",wpm.readGa4DataApiCredentials,!1),document.getElementById("ga4-data-api-credentials-delete-button").addEventListener("click",(()=>{wpm.saveGa4DataApiCredentialsToDb({})}),!1))})),function(e,t,a){e.saveSettingsToDisk=
|
2 |
//# sourceMappingURL=wpm-admin.p1.min.js.map
|
1 |
+
(()=>{var e={663:()=>{jQuery((function(){jQuery("#debug-info-button").on("click",(function(){jQuery("#debug-info-textarea").select(),document.execCommand("copy")})),jQuery("#wpm_pro_version_demo").on("click",(function(){jQuery("#submit").trigger("click")})),document.getElementById("json-settings-file-input").addEventListener("change",wpm.readSettingsFile,!1),document.getElementById("ga4-data-api-credentials-upload-button")&&(document.getElementById("ga4-data-api-credentials-upload-button").addEventListener("change",wpm.readGa4DataApiCredentials,!1),document.getElementById("ga4-data-api-credentials-delete-button").addEventListener("click",(()=>{wpm.saveGa4DataApiCredentialsToDb({})}),!1))})),function(e,t,a){e.saveSettingsToDisk=t=>{let a=document.getElementById("export-settings-json").value;a=a.replace(/\n/g,"\r\n");let n=new Blob([a],{type:"text/plain"}),s=document.createElement("a");s.download="pixel-manager-settings_"+t+"_"+e.getCurrentDateForFileName()+".json",s.href=window.URL.createObjectURL(n),s.target="_blank",s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)},e.getCurrentDateForFileName=()=>{let e=new Date;return e.getFullYear()+"."+("0"+(e.getMonth()+1)).slice(-2)+"."+("0"+e.getDate()).slice(-2)},e.readSettingsFile=t=>{let a=t.target.files[0];if(!a)return;let n=new FileReader;n.onload=function(t){let a=JSON.parse(t.target.result);e.saveImportedSettingsToDb(a)},n.readAsText(a)},e.saveImportedSettingsToDb=e=>{fetch(pmwAdminApi.root+"pmw/v1/settings/",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":pmwAdminApi.nonce},body:JSON.stringify(e)}).then((e=>e.json())).then((async e=>{e.success?(console.log(e),document.getElementById("upload-status-success").style.display="block",await new Promise((e=>setTimeout(e,5e3))),window.location.reload()):(console.log(e),document.getElementById("upload-status-error").style.display="block")})).catch((e=>{console.error(e),document.getElementById("upload-status-error").style.display="block"}))},e.readGa4DataApiCredentials=t=>{let a=t.target.files[0];if(!a)return;let n=new FileReader;n.onload=function(t){let a=JSON.parse(t.target.result);e.saveGa4DataApiCredentialsToDb(a)},n.readAsText(a)},e.deleteGa4DataApiCredentials=t=>{e.saveGa4DataApiCredentialsToDb({})},e.saveGa4DataApiCredentialsToDb=e=>{fetch(pmwAdminApi.root+"pmw/v1/ga4/data-api/credentials",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":pmwAdminApi.nonce},body:JSON.stringify(e)}).then((e=>e.json())).then((async e=>{e.success?(console.log(e),document.getElementById("ga4-api-credentials-upload-status-success").style.display="block",window.location.reload()):(console.log(e),document.getElementById("ga4-api-credentials-upload-status-error").style.display="block")})).catch((e=>{console.error(e),document.getElementById("ga4-api-credentials-upload-status-error").style.display="block"}))}}(window.wpm=window.wpm||{},jQuery)},958:()=>{function e(){jQuery("#script-blocker-notice").hide()}e(),jQuery((function(){e()}))},966:()=>{function e(){const e=window.location.search,t=new URLSearchParams(e);return!!t.get("section")&&{section:t.get("section"),subsection:t.get("subsection")}}function t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=window.location.search,s=new URLSearchParams(n);s.delete("section"),s.delete("subsection");let i="section="+e;i+=t?"&subsection="+t:"",history.pushState("","wpm"+e,document.location.pathname+"?page=wpm&"+i),jQuery('input[name ="_wp_http_referer"]').val(a()+"?page=wpm&"+i+"&settings-updated=true")}function a(){return new URL(jQuery("#wp-admin-canonical").attr("href")).pathname}jQuery((function(){if("wpm"!==wpmGetPageId())return;let a=[],n={};if(jQuery(".section").closest("tr").hide(),jQuery(".section").each((function(){a.push({slug:jQuery(this).data("sectionSlug"),title:jQuery(this).data("sectionTitle")})})),jQuery(".subsection").each((function(){n[jQuery(this).data("sectionSlug")]=n[jQuery(this).data("sectionSlug")]||[],n[jQuery(this).data("sectionSlug")].push({title:jQuery(this).data("subsectionTitle"),slug:jQuery(this).data("subsectionSlug")})})),a.forEach((function(e){jQuery(".nav-tab-wrapper").append('<a href="#" class="nav-tab" data-section-slug="'+e.slug+'">'+e.title+"</a>")})),jQuery(".nav-tab-wrapper").after(function(e){let t=Object.keys(e),a="";return t.forEach((function(t){a+='<ul class="pmw-subnav-tabs" data-section-slug="'+t+'">',e[t].forEach((function(e){a+='<li class="pmw-subnav-li pmw-subnav-li-inactive" style="cursor: pointer;" data-subsection-slug="'+e.slug+'">'+e.title+"</li>"})),a+="</ul>"})),a}(n)),jQuery(".nav-tab-wrapper a").on("click",(function(e){e.preventDefault(),jQuery(this).addClass("nav-tab-active").siblings().removeClass("nav-tab-active");let s=jQuery(this).data("section-slug");!function(e,a){jQuery("#wpm_settings_form > h2").nextUntil(".submit").andSelf().hide(),jQuery(".pmw-subnav-tabs").hide(),jQuery(".pmw-subnav-tabs[data-section-slug="+e+"]").show();let n=a.findIndex((t=>t.slug===e));jQuery("div[data-section-slug="+e+"]").closest("table").prevAll("h2:first").next().nextUntil("h2, .submit").andSelf().show(),t(a[n].slug)}(s,a),s in n&&jQuery("ul[data-section-slug="+s+"]").children(":first").trigger("click")})),jQuery(".pmw-subnav-li").on("click",(function(e){var a,n;e.preventDefault(),jQuery(this).addClass("pmw-subnav-li-active").removeClass("pmw-subnav-li-inactive").siblings().addClass("pmw-subnav-li-inactive").removeClass("pmw-subnav-li-active"),a=jQuery(this).parent().data("section-slug"),n=jQuery(this).data("subsection-slug"),jQuery("#wpm_settings_form > h2").nextUntil(".submit").andSelf().hide(),jQuery("[data-section-slug="+a+"][data-subsection-slug="+n+"]").closest("tr").siblings().andSelf().hide(),jQuery("[data-section-slug="+a+"][data-subsection-slug="+n+"]").closest("table").show(),jQuery("[data-section-slug="+a+"][data-subsection-slug="+n+"]").closest("tr").nextUntil(jQuery("[data-section-slug="+a+"][data-subsection-slug]").closest("tr")).show(),t(a,n)})),e()){let t=e();jQuery("a[data-section-slug="+t.section+"]").trigger("click"),!1!==t.subsection&&jQuery("ul[data-section-slug="+t.section+"]").children("[data-subsection-slug="+t.subsection+"]").trigger("click")}else jQuery("a[data-section-slug="+a[0].slug+"]").trigger("click")})),wpmGetPageId=()=>{const e=window.location.search;return new URLSearchParams(e).get("page")}}},t={};function a(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}a(663),a(958),a(966)})();
|
2 |
//# sourceMappingURL=wpm-admin.p1.min.js.map
|
js/admin/wpm-admin.p1.min.js.br
ADDED
Binary file
|
js/admin/wpm-admin.p1.min.js.gz
CHANGED
Binary file
|
js/admin/wpm-admin.p1.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"wpm-admin.p1.min.js","mappings":"sBAAAA,QAAO,WAGNA,OAAO,sBAAsBC,GAAG,SAAS,WACxCD,OAAO,wBAAwBE,SAC/BC,SAASC,YAAY,OACtB,IAEAJ,OAAO,yBAAyBC,GAAG,SAAS,WAC3CD,OAAO,WAAWK,QAAQ,QAC3B,IAEAF,SAASG,eAAe,4BACtBC,iBAAiB,SAAUC,IAAIC,kBAAkB,GAG/CN,SAASG,eAAe,4CAE3BH,SAASG,eAAe,0CACtBC,iBAAiB,SAAUC,IAAIE,2BAA2B,GAE5DP,SAASG,eAAe,0CACtBC,iBAAiB,SAAS,KAC1BC,IAAIG,8BAA8B,CAAC,EAAE,IACnC,GAGN,IAEC,SAAUH,EAAKI,EAAGC,GAElBL,EAAIM,mBAAqB,KACxB,IAAIC,EAAmBZ,SAASG,eAAe,wBAAwBU,MACvED,EAAuBA,EAAKE,QAAQ,MAAO,QAC3C,IAAIC,EAAmB,IA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AQ,OAAOsB,OAG9MpC,EAAUC,EAAaC,EAxFvB,IASIR,IAAuB,CAE1B,IAAImD,EAAgBnD,IAEpBjF,OAAO,uBAAyBoI,EAAuB,QAAI,KAAK/H,QAAQ,UAEpC,IAAhC+H,EAA0B,YAC7BpI,OAAO,wBAA0BoI,EAAuB,QAAI,KAAKF,SAAS,yBAA2BE,EAA0B,WAAI,KAAK/H,QAAQ,QAElJ,MACCL,OAAO,uBAAyBmG,EAAS,GAAS,KAAI,KAAK9F,QAAQ,QAErE,IA6FA6F,aAAe,KAEd,MAAMhB,EAAcxD,OAAOgD,SAASS,OAGpC,OAFoB,IAAIE,gBAAgBH,GAEvBI,IAAI,OAAO,C,GC7LzB+C,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB1H,IAAjB2H,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CChBAG,EAAQ,KACRA,EAAQ,KACRA,EAAQ,I","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/helpers.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/script-blocker-warning.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/tabs.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/main.js"],"sourcesContent":["jQuery(function () {\n\n\t// copy debug info textarea\n\tjQuery(\"#debug-info-button\").on(\"click\", function () {\n\t\tjQuery(\"#debug-info-textarea\").select()\n\t\tdocument.execCommand(\"copy\")\n\t})\n\n\tjQuery(\"#wpm_pro_version_demo\").on(\"click\", function () {\n\t\tjQuery(\"#submit\").trigger(\"click\")\n\t})\n\n\tdocument.getElementById(\"json-settings-file-input\")\n\t\t.addEventListener(\"change\", wpm.readSettingsFile, false)\n\n\t// if element ga4-data-api-credentials-upload-button exists, then we are on the GA4 settings page\n\tif (document.getElementById(\"ga4-data-api-credentials-upload-button\")) {\n\n\t\tdocument.getElementById(\"ga4-data-api-credentials-upload-button\")\n\t\t\t.addEventListener(\"change\", wpm.readGa4DataApiCredentials, false)\n\n\t\tdocument.getElementById(\"ga4-data-api-credentials-delete-button\")\n\t\t\t.addEventListener(\"click\", () => {\n\t\t\t\twpm.saveGa4DataApiCredentialsToDb({})\n\t\t\t}, false)\n\t}\n\n});\n\n(function (wpm, $, undefined) {\n\n\twpm.saveSettingsToDisk = () => {\n\t\tlet text = document.getElementById(\"export-settings-json\").value\n\t\ttext = text.replace(/\\n/g, \"\\r\\n\") // To retain the Line breaks.\n\t\tlet blob = new Blob([text], {type: \"text/plain\"})\n\t\tlet anchor = document.createElement(\"a\")\n\t\tanchor.download = \"pixel-manager-settings-\" + wpm.getCurrentDateForFileName() + \".json\"\n\t\tanchor.href = window.URL.createObjectURL(blob)\n\t\tanchor.target = \"_blank\"\n\t\tanchor.style.display = \"none\" // just to be safe!\n\t\tdocument.body.appendChild(anchor)\n\t\tanchor.click()\n\t\tdocument.body.removeChild(anchor)\n\t}\n\n\t// Get date in year month day divided by dots. Month and day have to be zero padded.\n\twpm.getCurrentDateForFileName = () => {\n\t\tlet date = new Date()\n\t\tlet year = date.getFullYear()\n\t\tlet month = (\"0\" + (date.getMonth() + 1)).slice(-2)\n\t\tlet day = (\"0\" + date.getDate()).slice(-2)\n\t\treturn year + \".\" + month + \".\" + day\n\n\t\t// return date.toLocaleDateString(\n\t\t// \t\"en-US\", {\n\t\t// \t\tyear : \"numeric\",\n\t\t// \t\tmonth: \"2-digit\",\n\t\t// \t\tday : \"2-digit\",\n\t\t// \t},\n\t\t// )\n\t}\n\n\twpm.readSettingsFile = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveImportedSettingsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.saveImportedSettingsToDb = settings => {\n\n\t\tfetch(pmwAdminApi.root + \"pmw/v1/settings/\", {\n\t\t\tmethod : \"POST\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\theaders : {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\"X-WP-Nonce\" : pmwAdminApi.nonce,\n\t\t\t},\n\t\t\tbody : JSON.stringify(settings),\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message => {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\tawait new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n\twpm.readGa4DataApiCredentials = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveGa4DataApiCredentialsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.deleteGa4DataApiCredentials = e => {\n\t\twpm.saveGa4DataApiCredentialsToDb({})\n\t}\n\n\twpm.saveGa4DataApiCredentialsToDb = credentials => {\n\n\t\tfetch(pmwAdminApi.root + \"pmw/v1/ga4/data-api/credentials\", {\n\t\t\tmethod : \"POST\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\theaders : {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\"X-WP-Nonce\" : pmwAdminApi.nonce,\n\t\t\t},\n\t\t\tbody : JSON.stringify(credentials),\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message => {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\t// await new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n\n\n","function wpm_hide_script_blocker_warning() {\n\tjQuery('#script-blocker-notice').hide();\n}\n\n// try to hide as soon as this script is loaded\n// might be too early in some cases, as the HTML is not rendered yet\nwpm_hide_script_blocker_warning();\n\n// if all other earlier attempts to hide did fail\n// run the function after entire DOM has been loaded\njQuery(function () {\n\twpm_hide_script_blocker_warning();\n});\n","jQuery(function () {\n\n\t // Don't run if we are not one of the\n\t // WPM main tabs\n\tif(\"wpm\" !== wpmGetPageId()) return\n\n\tlet sections = []\n\tlet subsections = {}\n\n\t// Hide unnecessary elements\n\tjQuery(\".section\").closest(\"tr\").hide()\n\n\t// Collect information on sections\n\tjQuery(\".section\").each(function () {\n\t\tsections.push({\n\t\t\t\"slug\" : jQuery(this).data(\"sectionSlug\"),\n\t\t\t\"title\": jQuery(this).data(\"sectionTitle\"),\n\t\t})\n\t})\n\n\t// Collect information on subsections\n\tjQuery(\".subsection\").each(function () {\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")] = subsections[jQuery(this).data(\"sectionSlug\")] || []\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")].push({\n\t\t\t\"title\": jQuery(this).data(\"subsectionTitle\"),\n\t\t\t\"slug\" : jQuery(this).data(\"subsectionSlug\"),\n\t\t})\n\t})\n\n\t// Create tabs for sections\n\tsections.forEach(\n\t\tfunction (section) {\n\t\t\tjQuery(\".nav-tab-wrapper\").append(\"<a href=\\\"#\\\" class=\\\"nav-tab\\\" data-section-slug=\\\"\" + section[\"slug\"] + \"\\\">\" + section[\"title\"] + \"</a>\")\n\t\t})\n\n\t// Create tabs for each subsections\n\tjQuery(\".nav-tab-wrapper\").after(wpmCreateSubtabUlHtml(subsections))\n\n\t// Create on-click events on section tabs that toggle the views\n\tjQuery(\".nav-tab-wrapper a\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// show clicked tab as active\n\t\tjQuery(this).addClass(\"nav-tab-active\").siblings().removeClass(\"nav-tab-active\")\n\n\t\t// toggle the sections visible / invisible based on clicked tab\n\n\t\tlet sectionSlug = jQuery(this).data(\"section-slug\")\n\t\twpmToggleSections(sectionSlug, sections)\n\n\t\t// if subsection exists, click on first subsection\n\t\tif (sectionSlug in subsections) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionSlug + \"]\").children(\":first\").trigger(\"click\")\n\t\t}\n\t})\n\n\t// Create on-click events on subsection tabs that toggle the views\n\tjQuery(\".pmw-subnav-li\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// jQuery(this).hide();\n\t\tjQuery(this)\n\t\t\t.addClass(\"pmw-subnav-li-active\").removeClass(\"pmw-subnav-li-inactive\")\n\t\t\t.siblings()\n\t\t\t.addClass(\"pmw-subnav-li-inactive\").removeClass(\"pmw-subnav-li-active\")\n\n\t\twpmToggleSubsection(jQuery(this).parent().data(\"section-slug\"), jQuery(this).data(\"subsection-slug\"))\n\t})\n\n\t/**\n\t * If someone accesses a plugin tab by deep link, open the right tab\n\t * or fallback to default (first tab)\n\t *\n\t * If deeplink is being opened,\n\t * open the according section and subsection\n\t */\n\tif (wpmGetSectionParams()) {\n\n\t\tlet sectionParams = wpmGetSectionParams()\n\n\t\tjQuery(\"a[data-section-slug=\" + sectionParams[\"section\"] + \"]\").trigger(\"click\")\n\n\t\tif (sectionParams[\"subsection\"] !== false) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionParams[\"section\"] + \"]\").children(\"[data-subsection-slug=\" + sectionParams[\"subsection\"] + \"]\").trigger(\"click\")\n\t\t}\n\t} else {\n\t\tjQuery(\"a[data-section-slug=\" + sections[0][\"slug\"] + \"]\").trigger(\"click\")\n\t}\n})\n\n// Creates the html with all subsection elements\nfunction wpmCreateSubtabUlHtml(subsections) {\n\n\tlet subsectionsKeys = Object.keys(subsections)\n\n\tlet html = \"\"\n\n\tsubsectionsKeys.forEach(function (subsectionKey) {\n\t\thtml += \"<ul class=\\\"pmw-subnav-tabs\\\" data-section-slug=\\\"\" + subsectionKey + \"\\\">\"\n\n\t\tlet subtabs = subsections[subsectionKey]\n\n\t\tsubtabs.forEach(function (subtab) {\n\t\t\thtml += \"<li class=\\\"pmw-subnav-li pmw-subnav-li-inactive\\\" style=\\\"cursor: pointer;\\\" data-subsection-slug=\\\"\" + subtab[\"slug\"] + \"\\\">\" + subtab[\"title\"] + \"</li>\"\n\t\t})\n\n\t\thtml += \"</ul>\"\n\t})\n\n\treturn html\n}\n\n/**\n * If section (and subsection) URL parameters are set,\n * return them, otherwise return false\n */\nfunction wpmGetSectionParams() {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\tif (urlParams.get(\"section\")) {\n\t\treturn {\n\t\t\t\"section\" : urlParams.get(\"section\"),\n\t\t\t\"subsection\": urlParams.get(\"subsection\"),\n\t\t}\n\t} else {\n\t\treturn false\n\t}\n}\n\n// Toggles the sections\nfunction wpmToggleSections(sectionSlug, sections) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\".pmw-subnav-tabs\").hide()\n\tjQuery(\".pmw-subnav-tabs[data-section-slug=\" + sectionSlug + \"]\").show()\n\n\tlet sectionPos = sections.findIndex((arrayElement) => arrayElement[\"slug\"] === sectionSlug)\n\n\tjQuery(\"div[data-section-slug=\" + sectionSlug + \"]\").closest(\"table\").prevAll(\"h2:first\").next().nextUntil(\"h2, .submit\").andSelf().show()\n\n\t// set the URL with the active tab parameter\n\twpmSetUrl(sections[sectionPos][\"slug\"])\n}\n\nfunction wpmToggleSubsection(sectionSlug, subsectionSlug) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").siblings().andSelf().hide()\n\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"table\").show()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").nextUntil(jQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug]\").closest(\"tr\")).show()\n\n\t// Set the URL with the active tab parameter\n\twpmSetUrl(sectionSlug, subsectionSlug)\n}\n\n// Sets the new URL parameters\nfunction wpmSetUrl(sectionSlug, subsectionSlug = \"\") {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\turlParams.delete(\"section\")\n\turlParams.delete(\"subsection\")\n\n\tlet newParams = \"section=\" + sectionSlug\n\tnewParams += subsectionSlug ? \"&subsection=\" + subsectionSlug : \"\"\n\n\thistory.pushState(\"\", \"wpm\" + sectionSlug, document.location.pathname + \"?page=wpm&\" + newParams)\n\n\t// Make WP remember which was the selected tab on a save and return to the same tab after saving\n\tjQuery(\"input[name =\\\"_wp_http_referer\\\"]\").val(wpmGetAdminPath() + \"?page=wpm&\" + newParams + \"&settings-updated=true\")\n}\n\nfunction wpmGetAdminPath() {\n\tlet url = new URL(jQuery(\"#wp-admin-canonical\").attr(\"href\"))\n\treturn url.pathname\n}\n\nwpmGetPageId = () => {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\treturn urlParams.get(\"page\")\n}\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Combine all admin scripts\n * (which only run on the wpm pages)\n */\n\n// require(\"./environment-check\")\nrequire(\"./helpers\")\nrequire(\"./script-blocker-warning\")\nrequire(\"./tabs\")\n\n// #if process.env.TIER === 'premium'\n// // require(\"./helpers_premium\")\n// #endif\n\n// console.log('Pixel Manager for WooCommerce admin script')\n"],"names":["jQuery","on","select","document","execCommand","trigger","getElementById","addEventListener","wpm","readSettingsFile","readGa4DataApiCredentials","saveGa4DataApiCredentialsToDb","$","undefined","saveSettingsToDisk","text","value","replace","blob","Blob","type","anchor","createElement","download","getCurrentDateForFileName","href","window","URL","createObjectURL","target","style","display","body","appendChild","click","removeChild","date","Date","getFullYear","getMonth","slice","getDate","e","file","files","reader","FileReader","onload","contents","JSON","parse","result","saveImportedSettingsToDb","readAsText","settings","fetch","pmwAdminApi","root","method","credentials","headers","nonce","stringify","then","response","json","async","message","success","console","log","Promise","resolve","setTimeout","location","reload","catch","error","deleteGa4DataApiCredentials","wpm_hide_script_blocker_warning","hide","wpmGetSectionParams","queryString","search","urlParams","URLSearchParams","get","wpmSetUrl","sectionSlug","subsectionSlug","delete","newParams","history","pushState","pathname","val","wpmGetAdminPath","attr","wpmGetPageId","sections","subsections","closest","each","push","this","data","forEach","section","append","after","subsectionsKeys","Object","keys","html","subsectionKey","subtab","wpmCreateSubtabUlHtml","preventDefault","addClass","siblings","removeClass","nextUntil","andSelf","show","sectionPos","findIndex","arrayElement","prevAll","next","wpmToggleSections","children","parent","sectionParams","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","require"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"wpm-admin.p1.min.js","mappings":"sBAAAA,QAAO,WAGNA,OAAO,sBAAsBC,GAAG,SAAS,WACxCD,OAAO,wBAAwBE,SAC/BC,SAASC,YAAY,OACtB,IAEAJ,OAAO,yBAAyBC,GAAG,SAAS,WAC3CD,OAAO,WAAWK,QAAQ,QAC3B,IAEAF,SAASG,eAAe,4BACtBC,iBAAiB,SAAUC,IAAIC,kBAAkB,GAG/CN,SAASG,eAAe,4CAE3BH,SAASG,eAAe,0CACtBC,iBAAiB,SAAUC,IAAIE,2BAA2B,GAE5DP,SAASG,eAAe,0CACtBC,iBAAiB,SAAS,KAC1BC,IAAIG,8BAA8B,CAAC,EAAE,IACnC,GAGN,IAEC,SAAUH,EAAKI,EAAGC,GAElBL,EAAIM,mBAAsBC,IACzB,IAAIC,EAAmBb,SAASG,eAAe,wBAAwBW,MACvED,EAAuBA,EAAKE,QAAQ,MAAO,QAC3C,IAAIC,EAAmB,IAAIC,KAAK,CAACJ,GAAO,CAACK,KAAM,eAC3CC,EAAmBnB,SAASoB,cAAc,KAC9CD,EAAOE,SAAgB,0BAA4BT,EAAU,IAAMP,EAAIiB,4BAA8B,QACrGH,EAAOI,KAAgBC,OAAOC,IAAIC,gBAAgBV,GAClDG,EAAOQ,OAAgB,SACv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,QAAI,KAAKF,SAAS,yBAA2BE,EAA0B,WAAI,KAAKhI,QAAQ,QAElJ,MACCL,OAAO,uBAAyBoG,EAAS,GAAS,KAAI,KAAK/F,QAAQ,QAErE,IA6FA8F,aAAe,KAEd,MAAMhB,EAAcxD,OAAOgD,SAASS,OAGpC,OAFoB,IAAIE,gBAAgBH,GAEvBI,IAAI,OAAO,C,GC7LzB+C,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB3H,IAAjB4H,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CChBAG,EAAQ,KACRA,EAAQ,KACRA,EAAQ,I","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/helpers.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/script-blocker-warning.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/tabs.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/admin/main.js"],"sourcesContent":["jQuery(function () {\n\n\t// copy debug info textarea\n\tjQuery(\"#debug-info-button\").on(\"click\", function () {\n\t\tjQuery(\"#debug-info-textarea\").select()\n\t\tdocument.execCommand(\"copy\")\n\t})\n\n\tjQuery(\"#wpm_pro_version_demo\").on(\"click\", function () {\n\t\tjQuery(\"#submit\").trigger(\"click\")\n\t})\n\n\tdocument.getElementById(\"json-settings-file-input\")\n\t\t.addEventListener(\"change\", wpm.readSettingsFile, false)\n\n\t// if element ga4-data-api-credentials-upload-button exists, then we are on the GA4 settings page\n\tif (document.getElementById(\"ga4-data-api-credentials-upload-button\")) {\n\n\t\tdocument.getElementById(\"ga4-data-api-credentials-upload-button\")\n\t\t\t.addEventListener(\"change\", wpm.readGa4DataApiCredentials, false)\n\n\t\tdocument.getElementById(\"ga4-data-api-credentials-delete-button\")\n\t\t\t.addEventListener(\"click\", () => {\n\t\t\t\twpm.saveGa4DataApiCredentialsToDb({})\n\t\t\t}, false)\n\t}\n\n});\n\n(function (wpm, $, undefined) {\n\n\twpm.saveSettingsToDisk = (version) => {\n\t\tlet text = document.getElementById(\"export-settings-json\").value\n\t\ttext = text.replace(/\\n/g, \"\\r\\n\") // To retain the Line breaks.\n\t\tlet blob = new Blob([text], {type: \"text/plain\"})\n\t\tlet anchor = document.createElement(\"a\")\n\t\tanchor.download = \"pixel-manager-settings_\" + version + '_' + wpm.getCurrentDateForFileName() + \".json\"\n\t\tanchor.href = window.URL.createObjectURL(blob)\n\t\tanchor.target = \"_blank\"\n\t\tanchor.style.display = \"none\" // just to be safe!\n\t\tdocument.body.appendChild(anchor)\n\t\tanchor.click()\n\t\tdocument.body.removeChild(anchor)\n\t}\n\n\t// Get date in year month day divided by dots. Month and day have to be zero padded.\n\twpm.getCurrentDateForFileName = () => {\n\t\tlet date = new Date()\n\t\tlet year = date.getFullYear()\n\t\tlet month = (\"0\" + (date.getMonth() + 1)).slice(-2)\n\t\tlet day = (\"0\" + date.getDate()).slice(-2)\n\t\treturn year + \".\" + month + \".\" + day\n\n\t\t// return date.toLocaleDateString(\n\t\t// \t\"en-US\", {\n\t\t// \t\tyear : \"numeric\",\n\t\t// \t\tmonth: \"2-digit\",\n\t\t// \t\tday : \"2-digit\",\n\t\t// \t},\n\t\t// )\n\t}\n\n\twpm.readSettingsFile = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveImportedSettingsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.saveImportedSettingsToDb = settings => {\n\n\t\tfetch(pmwAdminApi.root + \"pmw/v1/settings/\", {\n\t\t\tmethod : \"POST\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\theaders : {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\"X-WP-Nonce\" : pmwAdminApi.nonce,\n\t\t\t},\n\t\t\tbody : JSON.stringify(settings),\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message => {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\tawait new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n\twpm.readGa4DataApiCredentials = e => {\n\n\t\tlet file = e.target.files[0]\n\t\tif (!file) return\n\t\tlet reader = new FileReader()\n\t\treader.onload = function (e) {\n\t\t\tlet contents = JSON.parse(e.target.result)\n\n\t\t\t// document.getElementById(\"import-settings-json\").textContent = JSON.stringify(contents)\n\n\t\t\twpm.saveGa4DataApiCredentialsToDb(contents)\n\t\t}\n\t\treader.readAsText(file)\n\t}\n\n\twpm.deleteGa4DataApiCredentials = e => {\n\t\twpm.saveGa4DataApiCredentialsToDb({})\n\t}\n\n\twpm.saveGa4DataApiCredentialsToDb = credentials => {\n\n\t\tfetch(pmwAdminApi.root + \"pmw/v1/ga4/data-api/credentials\", {\n\t\t\tmethod : \"POST\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\theaders : {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\"X-WP-Nonce\" : pmwAdminApi.nonce,\n\t\t\t},\n\t\t\tbody : JSON.stringify(credentials),\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(async message => {\n\t\t\t\tif (message.success) {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\t// reload window\n\t\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-success\").style.display = \"block\"\n\t\t\t\t\t// wait 5 seconds\n\t\t\t\t\t// await new Promise(resolve => setTimeout(resolve, 5000))\n\t\t\t\t\twindow.location.reload()\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(message)\n\t\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-error\").style.display = \"block\"\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error)\n\t\t\t\tdocument.getElementById(\"ga4-api-credentials-upload-status-error\").style.display = \"block\"\n\t\t\t})\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n\n\n","function wpm_hide_script_blocker_warning() {\n\tjQuery('#script-blocker-notice').hide();\n}\n\n// try to hide as soon as this script is loaded\n// might be too early in some cases, as the HTML is not rendered yet\nwpm_hide_script_blocker_warning();\n\n// if all other earlier attempts to hide did fail\n// run the function after entire DOM has been loaded\njQuery(function () {\n\twpm_hide_script_blocker_warning();\n});\n","jQuery(function () {\n\n\t // Don't run if we are not one of the\n\t // WPM main tabs\n\tif(\"wpm\" !== wpmGetPageId()) return\n\n\tlet sections = []\n\tlet subsections = {}\n\n\t// Hide unnecessary elements\n\tjQuery(\".section\").closest(\"tr\").hide()\n\n\t// Collect information on sections\n\tjQuery(\".section\").each(function () {\n\t\tsections.push({\n\t\t\t\"slug\" : jQuery(this).data(\"sectionSlug\"),\n\t\t\t\"title\": jQuery(this).data(\"sectionTitle\"),\n\t\t})\n\t})\n\n\t// Collect information on subsections\n\tjQuery(\".subsection\").each(function () {\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")] = subsections[jQuery(this).data(\"sectionSlug\")] || []\n\n\t\tsubsections[jQuery(this).data(\"sectionSlug\")].push({\n\t\t\t\"title\": jQuery(this).data(\"subsectionTitle\"),\n\t\t\t\"slug\" : jQuery(this).data(\"subsectionSlug\"),\n\t\t})\n\t})\n\n\t// Create tabs for sections\n\tsections.forEach(\n\t\tfunction (section) {\n\t\t\tjQuery(\".nav-tab-wrapper\").append(\"<a href=\\\"#\\\" class=\\\"nav-tab\\\" data-section-slug=\\\"\" + section[\"slug\"] + \"\\\">\" + section[\"title\"] + \"</a>\")\n\t\t})\n\n\t// Create tabs for each subsections\n\tjQuery(\".nav-tab-wrapper\").after(wpmCreateSubtabUlHtml(subsections))\n\n\t// Create on-click events on section tabs that toggle the views\n\tjQuery(\".nav-tab-wrapper a\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// show clicked tab as active\n\t\tjQuery(this).addClass(\"nav-tab-active\").siblings().removeClass(\"nav-tab-active\")\n\n\t\t// toggle the sections visible / invisible based on clicked tab\n\n\t\tlet sectionSlug = jQuery(this).data(\"section-slug\")\n\t\twpmToggleSections(sectionSlug, sections)\n\n\t\t// if subsection exists, click on first subsection\n\t\tif (sectionSlug in subsections) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionSlug + \"]\").children(\":first\").trigger(\"click\")\n\t\t}\n\t})\n\n\t// Create on-click events on subsection tabs that toggle the views\n\tjQuery(\".pmw-subnav-li\").on(\"click\", function (e) {\n\n\t\te.preventDefault()\n\n\t\t// jQuery(this).hide();\n\t\tjQuery(this)\n\t\t\t.addClass(\"pmw-subnav-li-active\").removeClass(\"pmw-subnav-li-inactive\")\n\t\t\t.siblings()\n\t\t\t.addClass(\"pmw-subnav-li-inactive\").removeClass(\"pmw-subnav-li-active\")\n\n\t\twpmToggleSubsection(jQuery(this).parent().data(\"section-slug\"), jQuery(this).data(\"subsection-slug\"))\n\t})\n\n\t/**\n\t * If someone accesses a plugin tab by deep link, open the right tab\n\t * or fallback to default (first tab)\n\t *\n\t * If deeplink is being opened,\n\t * open the according section and subsection\n\t */\n\tif (wpmGetSectionParams()) {\n\n\t\tlet sectionParams = wpmGetSectionParams()\n\n\t\tjQuery(\"a[data-section-slug=\" + sectionParams[\"section\"] + \"]\").trigger(\"click\")\n\n\t\tif (sectionParams[\"subsection\"] !== false) {\n\t\t\tjQuery(\"ul[data-section-slug=\" + sectionParams[\"section\"] + \"]\").children(\"[data-subsection-slug=\" + sectionParams[\"subsection\"] + \"]\").trigger(\"click\")\n\t\t}\n\t} else {\n\t\tjQuery(\"a[data-section-slug=\" + sections[0][\"slug\"] + \"]\").trigger(\"click\")\n\t}\n})\n\n// Creates the html with all subsection elements\nfunction wpmCreateSubtabUlHtml(subsections) {\n\n\tlet subsectionsKeys = Object.keys(subsections)\n\n\tlet html = \"\"\n\n\tsubsectionsKeys.forEach(function (subsectionKey) {\n\t\thtml += \"<ul class=\\\"pmw-subnav-tabs\\\" data-section-slug=\\\"\" + subsectionKey + \"\\\">\"\n\n\t\tlet subtabs = subsections[subsectionKey]\n\n\t\tsubtabs.forEach(function (subtab) {\n\t\t\thtml += \"<li class=\\\"pmw-subnav-li pmw-subnav-li-inactive\\\" style=\\\"cursor: pointer;\\\" data-subsection-slug=\\\"\" + subtab[\"slug\"] + \"\\\">\" + subtab[\"title\"] + \"</li>\"\n\t\t})\n\n\t\thtml += \"</ul>\"\n\t})\n\n\treturn html\n}\n\n/**\n * If section (and subsection) URL parameters are set,\n * return them, otherwise return false\n */\nfunction wpmGetSectionParams() {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\tif (urlParams.get(\"section\")) {\n\t\treturn {\n\t\t\t\"section\" : urlParams.get(\"section\"),\n\t\t\t\"subsection\": urlParams.get(\"subsection\"),\n\t\t}\n\t} else {\n\t\treturn false\n\t}\n}\n\n// Toggles the sections\nfunction wpmToggleSections(sectionSlug, sections) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\".pmw-subnav-tabs\").hide()\n\tjQuery(\".pmw-subnav-tabs[data-section-slug=\" + sectionSlug + \"]\").show()\n\n\tlet sectionPos = sections.findIndex((arrayElement) => arrayElement[\"slug\"] === sectionSlug)\n\n\tjQuery(\"div[data-section-slug=\" + sectionSlug + \"]\").closest(\"table\").prevAll(\"h2:first\").next().nextUntil(\"h2, .submit\").andSelf().show()\n\n\t// set the URL with the active tab parameter\n\twpmSetUrl(sections[sectionPos][\"slug\"])\n}\n\nfunction wpmToggleSubsection(sectionSlug, subsectionSlug) {\n\n\tjQuery(\"#wpm_settings_form > h2\").nextUntil(\".submit\").andSelf().hide()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").siblings().andSelf().hide()\n\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"table\").show()\n\tjQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug=\" + subsectionSlug + \"]\").closest(\"tr\").nextUntil(jQuery(\"[data-section-slug=\" + sectionSlug + \"][data-subsection-slug]\").closest(\"tr\")).show()\n\n\t// Set the URL with the active tab parameter\n\twpmSetUrl(sectionSlug, subsectionSlug)\n}\n\n// Sets the new URL parameters\nfunction wpmSetUrl(sectionSlug, subsectionSlug = \"\") {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\turlParams.delete(\"section\")\n\turlParams.delete(\"subsection\")\n\n\tlet newParams = \"section=\" + sectionSlug\n\tnewParams += subsectionSlug ? \"&subsection=\" + subsectionSlug : \"\"\n\n\thistory.pushState(\"\", \"wpm\" + sectionSlug, document.location.pathname + \"?page=wpm&\" + newParams)\n\n\t// Make WP remember which was the selected tab on a save and return to the same tab after saving\n\tjQuery(\"input[name =\\\"_wp_http_referer\\\"]\").val(wpmGetAdminPath() + \"?page=wpm&\" + newParams + \"&settings-updated=true\")\n}\n\nfunction wpmGetAdminPath() {\n\tlet url = new URL(jQuery(\"#wp-admin-canonical\").attr(\"href\"))\n\treturn url.pathname\n}\n\nwpmGetPageId = () => {\n\n\tconst queryString = window.location.search\n\tconst urlParams = new URLSearchParams(queryString)\n\n\treturn urlParams.get(\"page\")\n}\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Combine all admin scripts\n * (which only run on the wpm pages)\n */\n\n// require(\"./environment-check\")\nrequire(\"./helpers\")\nrequire(\"./script-blocker-warning\")\nrequire(\"./tabs\")\n\n// #if process.env.TIER === 'premium'\n// // require(\"./helpers_premium\")\n// #endif\n\n// console.log('Pixel Manager for WooCommerce admin script')\n"],"names":["jQuery","on","select","document","execCommand","trigger","getElementById","addEventListener","wpm","readSettingsFile","readGa4DataApiCredentials","saveGa4DataApiCredentialsToDb","$","undefined","saveSettingsToDisk","version","text","value","replace","blob","Blob","type","anchor","createElement","download","getCurrentDateForFileName","href","window","URL","createObjectURL","target","style","display","body","appendChild","click","removeChild","date","Date","getFullYear","getMonth","slice","getDate","e","file","files","reader","FileReader","onload","contents","JSON","parse","result","saveImportedSettingsToDb","readAsText","settings","fetch","pmwAdminApi","root","method","credentials","headers","nonce","stringify","then","response","json","async","message","success","console","log","Promise","resolve","setTimeout","location","reload","catch","error","deleteGa4DataApiCredentials","wpm_hide_script_blocker_warning","hide","wpmGetSectionParams","queryString","search","urlParams","URLSearchParams","get","wpmSetUrl","sectionSlug","subsectionSlug","delete","newParams","history","pushState","pathname","val","wpmGetAdminPath","attr","wpmGetPageId","sections","subsections","closest","each","push","this","data","forEach","section","append","after","subsectionsKeys","Object","keys","html","subsectionKey","subtab","wpmCreateSubtabUlHtml","preventDefault","addClass","siblings","removeClass","nextUntil","andSelf","show","sectionPos","findIndex","arrayElement","prevAll","next","wpmToggleSections","children","parent","sectionParams","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","require"],"sourceRoot":""}
|
js/admin/wpm-admin.p1.min.js.map.gz
DELETED
Binary file
|
js/public/wpm-public.p1.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,a,o,r,n,i,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.facebook)&&void 0!==n&&n.loaded||wpm.doesUrlContainPatterns(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.facebook)||void 0===d?void 0:d.exclusion_patterns)||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToWishlist",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideOrderReceivedPage",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(n=a.createElement(o)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=a.getElementsByTagName(o)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,n,i},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,b,C,k,x,j,S,I,Q,P,O,E,A,T,F,V,U,G,R,q,M,N;let W={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(W.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(W.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.user)&&void 0!==n&&null!==(i=n.facebook)&&void 0!==i&&i.email&&(W.em=wpmDataLayer.user.facebook.email),null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.order)&&void 0!==d&&d.billing_email_hashed&&(W.em=wpmDataLayer.order.billing_email_hashed),null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(W.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(W.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(y=g.user)&&void 0!==y&&null!==(w=y.facebook)&&void 0!==w&&w.last_name&&(W.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&_.billing_last_name&&(W.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(W.ph=wpmDataLayer.user.facebook.phone),null!==(D=wpmDataLayer)&&void 0!==D&&null!==(b=D.order)&&void 0!==b&&b.billing_phone&&(W.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(C=wpmDataLayer)&&void 0!==C&&null!==(k=C.user)&&void 0!==k&&null!==(x=k.facebook)&&void 0!==x&&x.city&&(W.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(W.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(Q=I.user)&&void 0!==Q&&null!==(P=Q.facebook)&&void 0!==P&&P.state&&(W.st=wpmDataLayer.user.facebook.state),null!==(O=wpmDataLayer)&&void 0!==O&&null!==(E=O.order)&&void 0!==E&&E.billing_state&&(W.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(A=wpmDataLayer)&&void 0!==A&&null!==(T=A.user)&&void 0!==T&&null!==(F=T.facebook)&&void 0!==F&&F.postcode&&(W.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(U=V.order)&&void 0!==U&&U.billing_postcode&&(W.zp=wpmDataLayer.order.billing_postcode),null!==(G=wpmDataLayer)&&void 0!==G&&null!==(R=G.user)&&void 0!==R&&null!==(q=R.facebook)&&void 0!==q&&q.country&&(W.country=wpmDataLayer.user.facebook.country),null!==(M=wpmDataLayer)&&void 0!==M&&null!==(N=M.order)&&void 0!==N&&N.billing_country&&(W.country=wpmDataLayer.order.billing_country.toLowerCase()),W},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(o.fbc=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&(o.external_id=wpmDataLayer.user.id),navigator.userAgent&&(o.client_user_agent=navigator.userAgent),o},e.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.currency}),e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,n,i;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let a=e.getFbRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return e}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,n,i,l,d,s,c,u,p,m,g;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,n,i,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,n,i,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.items=[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]),null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,n,i,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;m.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,n,i,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let i={},l={};i={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(i.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(i.user_id=wpmDataLayer.user.id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.order)&&void 0!==n&&n.aw_merchant_id&&(l={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...i,...l})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,n]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==n.variation_id?(r.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[n.variation_id].variant_name,r.brand=wpmDataLayer.products[n.variation_id].brand):(r.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[n.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,n;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.ads)&&void 0!==d&&d.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(y=g.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&>ag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&>ag("set","user_data",wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let n=wpmDataLayer.pixels.google.analytics.ga4.parameters;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.ga4)&&void 0!==r&&r.debug_mode&&(n.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,n),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,n,i,l,d,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,n,i,l,d,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).then((function(t,a){try{var o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,b,C;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var k,x,j,S;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(k=wpmDataLayer)&&void 0!==k&&null!==(x=k.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.pixels)&&void 0!==d&&null!==(s=d.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&>ag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(b=D.analytics)&&void 0!==b&&null!==(C=b.ga4)&&void 0!==C&&C.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let n=0;!function a(){var o,r,i;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(i=r.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,n,i,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.pixels)&&void 0!==n&&null!==(i=n.google)&&void 0!==i&&null!==(l=i.optimize)&&void 0!==l&&l.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,n,i,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.pixels)&&void 0!==l&&null!==(d=l.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=arguments.length>0&&arguments[0]!==a?arguments[0]:null,l=arguments.length>1&&arguments[1]!==a?arguments[1]:null,d=arguments.length>2&&arguments[2]!==a&&arguments[2];if(n.categories.analytics=!d,n.categories.ads=!d,i||l)return i&&(n.categories.analytics=!!i),void(l&&(n.categories.ads=!!l));if(t=e.getCookie("pmw_cookie_consent"))return t=JSON.parse(t),n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieConsent"))return t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieScriptConsent"))return t=JSON.parse(t),"reject"===t.action?(n.categories.analytics=!1,n.categories.ads=!1):2===t.categories.length?(n.categories.analytics=!0,n.categories.ads=!0):(n.categories.analytics=t.categories.indexOf("performance")>=0,n.categories.ads=t.categories.indexOf("targeting")>=0),void(n.visitorHasChosen=!0);var s,c,u,p,m,g,y,w;if(t=e.getCookie("borlabs-cookie"))return t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),n.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),n.visitorHasChosen=!0,n.pixels=[...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.statistics)||[],...(null===(y=t)||void 0===y||null===(w=y.consents)||void 0===w?void 0:w.marketing)||[]],void(n.mode="pixel");if(t=o())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=t.visitorHasChosen);if(t=e.getCookie("cookie_notice_accepted"))return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);if(t=e.getCookie("hu-consent"))return t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],void(n.visitorHasChosen=!0);if(t=r())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0===t.visitorHasChosen);if(t=e.getCookie("moove_gdpr_popup"))return t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,void(n.visitorHasChosen=!0);if(t=e.getCookie("wpautoterms-cookies-notice")){if("1"!==t)return;return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0)}if(window.localStorage&&window.localStorage.getItem("uc_settings")){if(console.log("Usercentrics settings detected"),"undefined"==typeof UC_UI)return void window.addEventListener("UC_UI_INITIALIZED",(function(t){e.ucUiProcessConsent()}));if(UC_UI.areAllConsentsAccepted())return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);e.ucUiProcessConsent()}if(t=e.getCookie("OptanonConsent")){let e=new URLSearchParams(t).get("groups").split(","),a={};return e.forEach((e=>{let t=e.split(":");a[t[0]]=t[1]})),n.categories.analytics="1"===groubsObject[2],n.categories.ads="1"===a[4],void(n.visitorHasChosen=!0)}},e.ucUiProcessConsent=function(){if("undefined"==typeof UC_UI)return;UC_UI.areAllConsentsAccepted()&&pmw.consentAcceptAll();const e=UC_UI.getSettingsLabels().categories.filter((e=>"Statistics"===e.label))[0].slug;pmw.consentAdjustSelectively({analytics:!UC_UI.getServicesBaseInfo().filter((t=>t.categorySlug===e&&!1===t.consent.status)).length>0,ads:!UC_UI.getServicesBaseInfo().filter((e=>"marketing"===e.categorySlug&&!1===e.consent.status)).length>0})},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===n.mode?o=!!n.categories[t]:"pixel"===n.mode?(o=n.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=n.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,i;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||n.visitorHasChosen)&&("category"!==n.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>n.categories[e])))&&("pixel"!==n.mode||!n.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==n.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>n.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){let t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===n.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(n.pixels.includes("google-analytics"),n.pixels.includes("google-ads"))):(e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(n.categories.analytics=!0),Cookiebot.consent.marketing&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(n.categories.analytics=!0),t.detail.categories.includes("targeting")&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&(!0===e.detail["Google Ads Remarketing"]?console.log("Google Ads Remarketing has consent"):console.log("Google Ads Remarketing has no consent"))})),window.addEventListener("UC_UI_CMP_EVENT",(function(e){"ACCEPT_ALL"===e.detail.type&&pmw.consentAcceptAll(),"DENY_ALL"===e.detail.type&&pmw.consentRevokeAll(),"SAVE"===e.detail.type&&console.log("event.detail",e.detail)})),jQuery("#accept-recommended-btn-handler, #onetrust-accept-btn-handler").on("click",(function(){void 0!==window.OneTrust&&pmw.consentAcceptAll()})),jQuery(".ot-pc-refuse-all-handler, #onetrust-reject-all-handler").on("click",(function(){pmw.consentRevokeAll()})),jQuery(".save-preference-btn-handler.onetrust-close-btn-handler").on("click",(function(){location.reload()}))}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}}));const e=[".add_to_cart_button:not(.product_type_variable)",".ajax_add_to_cart",".single_add_to_cart_button"].join(",");jQuery(document).on("ready",(()=>{jQuery(e).on("click",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}}))})),jQuery(document).on("ready",(()=>{jQuery("a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)").one("click",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=new URL(jQuery(e.currentTarget).attr("href"),window.location.origin);if(t.searchParams.has("add-to-cart")){let e=t.searchParams.get("add-to-cart");wpm.addProductToCart(e,1)}}}catch(e){console.error(e)}}))})),jQuery(document).on("ready",(()=>{jQuery(".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product").on("click",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}}))}));let t=[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(",");jQuery(document).one("click init_checkout",t,(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery(document).on("ready",(()=>{jQuery("form.checkout").on("checkout_place_order_success",(()=>{!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4),jQuery(document).trigger("wpmPlaceOrder",{})}))})),jQuery(document).on("ready",(()=>{jQuery("[name='update_cart']").on("click",(()=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}}))})),jQuery(document).on("ready",(()=>{jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery(document).on("ready",(()=>{jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r;let n={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(n.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a;let o={event:"beginCheckout"};var r;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(r=wpmDataLayer)&&void 0!==r&&r.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(o.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r;let n={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(n.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={event:"viewItem",product:r};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(n.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},r&&(n.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(r))),jQuery(document).trigger("wpmClientSideViewItem",n),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(n)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a;let o={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a;let o={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",o)}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_pmw_endpoint_available",n="pmw/v1/test/";function i(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=async()=>window.sessionStorage.getItem(r)?JSON.parse(window.sessionStorage.getItem(r)):await e.testEndpoint(),e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=async function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:e.root+n,o=arguments.length>1&&arguments[1]!==a?arguments[1]:r,i=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!0)),!0):404===i.status||0===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!1)),!1):void 0},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){let r=arguments.length>1&&arguments[1]!==a?arguments[1]:"thankyou_page";if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];i()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t,r)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!i()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.data.cart))}))}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{var a;if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products&&(t=t.filter((e=>!(e in wpmDataLayer.products)))),t&&0!==t.length){try{let a;if(a=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({pageId:wpmDataLayer.general.pageId,productIds:t})}):await fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:t})}),a.ok){let e=await a.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer.products&&wpmDataLayer.products[t]||await e.getProductsFromBackend([t]),e.triggerViewItemEvent(t)},e.triggerViewItemEvent=t=>{let a=e.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmViewItem",a)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let l,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let s,c=0,u=()=>{s=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),l=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),s.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),l.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&m(this)&&(jQuery(this).data("ioid",c++),l.observe(this))}))}))})),m=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.deleteCookie=t=>{e.setCookie(t,"",-1)},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=async(t,a)=>{try{let o;o=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:t,source:a}),keepalive:!0,cache:"no-cache"}):await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:t,source:a}),keepalive:!0}),o.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=e=>{let t={dataType:"script",cache:!0,url:e};return jQuery.ajax(t)},e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),e.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t},e.doesUrlContainPatterns=e=>{for(const t of e)if(new RegExp(t).test(window.location.href))return!0;return!1},e.excludeDomainFromTracking=()=>!!["appspot.com","tranlsate.google.com"].some((e=>window.location.href.includes(e)))}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((()=>{console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),wpm.excludeDomainFromTracking()||document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((()=>{wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((()=>{wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,a),n.exports}a(534),wpm.jQueryExists().then((function(){a(299),a(69),a(12),a(787),a(207)}))})();
|
2 |
//# sourceMappingURL=wpm-public.p1.min.js.map
|
1 |
+
(()=>{var e={164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,a,o,r,n,i,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.facebook)&&void 0!==n&&n.loaded||wpm.doesUrlContainPatterns(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.facebook)||void 0===d?void 0:d.exclusion_patterns)||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToWishlist",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideOrderReceivedPage",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(n=a.createElement(o)).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(i=a.getElementsByTagName(o)[0]).parentNode.insertBefore(n,i));let l={};e.isFbpSet()&&e.isFbAdvancedMatchingEnabled()&&(l={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,l),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,n,i},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,k,b,C,x,j,S,I,P,Q,E,O,T,A,F,V,U,R,G,q,M,N;let W={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(W.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(W.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.user)&&void 0!==n&&null!==(i=n.facebook)&&void 0!==i&&i.email&&(W.em=wpmDataLayer.user.facebook.email),null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.order)&&void 0!==d&&d.billing_email_hashed&&(W.em=wpmDataLayer.order.billing_email_hashed),null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(W.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(W.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(y=g.user)&&void 0!==y&&null!==(w=y.facebook)&&void 0!==w&&w.last_name&&(W.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&_.billing_last_name&&(W.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(W.ph=wpmDataLayer.user.facebook.phone),null!==(D=wpmDataLayer)&&void 0!==D&&null!==(k=D.order)&&void 0!==k&&k.billing_phone&&(W.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(b=wpmDataLayer)&&void 0!==b&&null!==(C=b.user)&&void 0!==C&&null!==(x=C.facebook)&&void 0!==x&&x.city&&(W.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(W.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(P=I.user)&&void 0!==P&&null!==(Q=P.facebook)&&void 0!==Q&&Q.state&&(W.st=wpmDataLayer.user.facebook.state),null!==(E=wpmDataLayer)&&void 0!==E&&null!==(O=E.order)&&void 0!==O&&O.billing_state&&(W.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(T=wpmDataLayer)&&void 0!==T&&null!==(A=T.user)&&void 0!==A&&null!==(F=A.facebook)&&void 0!==F&&F.postcode&&(W.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(U=V.order)&&void 0!==U&&U.billing_postcode&&(W.zp=wpmDataLayer.order.billing_postcode),null!==(R=wpmDataLayer)&&void 0!==R&&null!==(G=R.user)&&void 0!==G&&null!==(q=G.facebook)&&void 0!==q&&q.country&&(W.country=wpmDataLayer.user.facebook.country),null!==(M=wpmDataLayer)&&void 0!==M&&null!==(N=M.order)&&void 0!==N&&N.billing_country&&(W.country=wpmDataLayer.order.billing_country.toLowerCase()),W},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.isFbAdvancedMatchingEnabled=()=>{var e,t,a;return!(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.advanced_matching)},e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{let t={};var a,o;return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(t.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(t.fbc=e.getCookie("_fbc")),e.isFbAdvancedMatchingEnabled()&&null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(t.external_id=wpmDataLayer.user.id),navigator.userAgent&&(t.client_user_agent=navigator.userAgent),t},e.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.currency}),e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,n,i;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.facebook)||void 0===i||!i.loaded)return;let a=e.getFbRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return e}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,n,i,l,d,s,c,u,p,m,g;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,n,i,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,n,i,l,d,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.ads)||void 0===n?void 0:n.conversionIds))return;if(null===(i=wpmDataLayer)||void 0===i||null===(l=i.pixels)||void 0===l||null===(d=l.google)||void 0===d||null===(s=d.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.items=[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]),null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,n,i,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;m.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,n,i,l,d,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(n=r.pixels)||void 0===n||null===(i=n.google)||void 0===i||null===(l=i.ads)||void 0===l||null===(d=l.dynamic_remarketing)||void 0===d||!d.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let i={},l={};i={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(i.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(i.user_id=wpmDataLayer.user.id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.order)&&void 0!==n&&n.aw_merchant_id&&(l={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...i,...l})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,n]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:n.quantity,price:n.price,name:n.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[n.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==n.variation_id?(r.id=String(wpmDataLayer.products[n.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[n.variation_id].variant_name,r.brand=wpmDataLayer.products[n.variation_id].brand):(r.id=String(wpmDataLayer.products[n.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[n.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,n,i,l,d,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,n;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.ads)&&void 0!==d&&d.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(y=g.google)&&void 0!==y&&null!==(w=y.ads)&&void 0!==w&&w.phone_conversion_number&>ag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&>ag("set","user_data",wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let n=wpmDataLayer.pixels.google.analytics.ga4.parameters;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.ga4)&&void 0!==r&&r.debug_mode&&(n.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,n),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,n,i,l,d,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,n,i,l,d,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.google)&&void 0!==l&&null!==(d=l.analytics)&&void 0!==d&&null!==(s=d.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).then((function(t,a){try{var o,r,n,i,l,d,s,c,u,p,m,g,y,w,v,_,f,h,L,D,k,b;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.google)&&void 0!==n&&null!==(i=n.consent_mode)&&void 0!==i&&i.active){var C,x,j,S;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(C=wpmDataLayer)&&void 0!==C&&null!==(x=C.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(l=wpmDataLayer)&&void 0!==l&&null!==(d=l.pixels)&&void 0!==d&&null!==(s=d.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&>ag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(y=wpmDataLayer)&&void 0!==y&&null!==(w=y.pixels)&&void 0!==w&&null!==(v=w.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(k=D.analytics)&&void 0!==k&&null!==(b=k.ga4)&&void 0!==b&&b.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let n=0;!function a(){var o,r,i;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(i=r.google)||void 0===i?void 0:i.state)?e():n>=5e3?t():(n+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,n,i,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.pixels)&&void 0!==n&&null!==(i=n.google)&&void 0!==i&&null!==(l=i.optimize)&&void 0!==l&&l.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,n,i,l,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.hotjar)&&void 0!==n&&n.loaded||!wpm.canIFire("analytics","hotjar")||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(l=i.pixels)&&void 0!==l&&null!==(d=l.hotjar)&&void 0!==d&&d.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},n={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>n,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];n.categories.analytics=e,n.categories.ads=t},e.updateConsentCookieValues=function(){let t,i=arguments.length>0&&arguments[0]!==a?arguments[0]:null,l=arguments.length>1&&arguments[1]!==a?arguments[1]:null,d=arguments.length>2&&arguments[2]!==a&&arguments[2];if(n.categories.analytics=!d,n.categories.ads=!d,i||l)return i&&(n.categories.analytics=!!i),void(l&&(n.categories.ads=!!l));if(t=e.getCookie("pmw_cookie_consent"))return t=JSON.parse(t),n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieConsent"))return t=decodeURI(t),n.categories.analytics=t.indexOf("statistics:true")>=0,n.categories.ads=t.indexOf("marketing:true")>=0,void(n.visitorHasChosen=!0);if(t=e.getCookie("CookieScriptConsent"))return t=JSON.parse(t),"reject"===t.action?(n.categories.analytics=!1,n.categories.ads=!1):2===t.categories.length?(n.categories.analytics=!0,n.categories.ads=!0):(n.categories.analytics=t.categories.indexOf("performance")>=0,n.categories.ads=t.categories.indexOf("targeting")>=0),void(n.visitorHasChosen=!0);var s,c,u,p,m,g,y,w;if(t=e.getCookie("borlabs-cookie"))return t=decodeURI(t),t=JSON.parse(t),n.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),n.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),n.visitorHasChosen=!0,n.pixels=[...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.statistics)||[],...(null===(y=t)||void 0===y||null===(w=y.consents)||void 0===w?void 0:w.marketing)||[]],void(n.mode="pixel");if(t=o())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=t.visitorHasChosen);if(t=e.getCookie("cookie_notice_accepted"))return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);if(t=e.getCookie("hu-consent"))return t=JSON.parse(t),n.categories.analytics=!!t.categories[3],n.categories.ads=!!t.categories[4],void(n.visitorHasChosen=!0);if(t=r())return n.categories.analytics=!0===t.analytics,n.categories.ads=!0===t.ads,void(n.visitorHasChosen=!0===t.visitorHasChosen);if(t=e.getCookie("moove_gdpr_popup"))return t=JSON.parse(t),n.categories.analytics="1"===t.thirdparty,n.categories.ads="1"===t.advanced,void(n.visitorHasChosen=!0);if(t=e.getCookie("wpautoterms-cookies-notice")){if("1"!==t)return;return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0)}if(window.localStorage&&window.localStorage.getItem("uc_settings")){if(console.log("Usercentrics settings detected"),"undefined"==typeof UC_UI)return void window.addEventListener("UC_UI_INITIALIZED",(function(t){e.ucUiProcessConsent()}));if(UC_UI.areAllConsentsAccepted())return n.categories.analytics=!0,n.categories.ads=!0,void(n.visitorHasChosen=!0);e.ucUiProcessConsent()}if(t=e.getCookie("OptanonConsent")){let e=new URLSearchParams(t).get("groups").split(","),a={};return e.forEach((e=>{let t=e.split(":");a[t[0]]=t[1]})),n.categories.analytics="1"===groubsObject[2],n.categories.ads="1"===a[4],void(n.visitorHasChosen=!0)}},e.ucUiProcessConsent=function(){if("undefined"==typeof UC_UI)return;UC_UI.areAllConsentsAccepted()&&pmw.consentAcceptAll();const e=UC_UI.getSettingsLabels().categories.filter((e=>"Statistics"===e.label))[0].slug;pmw.consentAdjustSelectively({analytics:!UC_UI.getServicesBaseInfo().filter((t=>t.categorySlug===e&&!1===t.consent.status)).length>0,ads:!UC_UI.getServicesBaseInfo().filter((e=>"marketing"===e.categorySlug&&!1===e.consent.status)).length>0})},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{n.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===n.mode?o=!!n.categories[t]:"pixel"===n.mode?(o=n.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=n.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,i;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||n.visitorHasChosen)&&("category"!==n.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>n.categories[e])))&&("pixel"!==n.mode||!n.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==n.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>n.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){let t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.explicitConsentStateAlreadySet=()=>{if(n.explicitConsentStateAlreadySet)return!0;n.explicitConsentStateAlreadySet=!0},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===n.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(n.pixels.includes("google-analytics"),n.pixels.includes("google-ads"))):(e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(n.categories.analytics=!0),Cookiebot.consent.marketing&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(n.categories.analytics=!0),t.detail.categories.includes("targeting")&&(n.categories.ads=!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(n.categories.analytics,n.categories.ads),e.updateGoogleConsentMode(n.categories.analytics,n.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&(!0===e.detail["Google Ads Remarketing"]?console.log("Google Ads Remarketing has consent"):console.log("Google Ads Remarketing has no consent"))})),window.addEventListener("UC_UI_CMP_EVENT",(function(e){"ACCEPT_ALL"===e.detail.type&&pmw.consentAcceptAll(),"DENY_ALL"===e.detail.type&&pmw.consentRevokeAll(),"SAVE"===e.detail.type&&console.log("event.detail",e.detail)})),jQuery("#accept-recommended-btn-handler, #onetrust-accept-btn-handler").on("click",(function(){void 0!==window.OneTrust&&pmw.consentAcceptAll()})),jQuery(".ot-pc-refuse-all-handler, #onetrust-reject-all-handler").on("click",(function(){pmw.consentRevokeAll()})),jQuery(".save-preference-btn-handler.onetrust-close-btn-handler").on("click",(function(){location.reload()}))}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{console.log("remove_from_cart event"+(new Date).getTime());try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}}));let e=[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(",");jQuery(document).on("click init_checkout",e,(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r,n,i,l;let d={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(d.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.tiktok)&&void 0!==l&&l.loaded&&(d.tiktok={event:"AddToCart",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:t.price*t.quantity,currency:t.currency,contents:[{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,price:t.price}]}}),jQuery(document).trigger("wpmClientSideAddToCart",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a,o,r,n;let i={event:"beginCheckout"};var l;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(l=wpmDataLayer)&&void 0!==l&&l.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(i.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"InitiateCheckout",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()}),jQuery(document).trigger("wpmClientSideBeginCheckout",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r,n,i,l;let d={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(d.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),null!==(n=wpmDataLayer)&&void 0!==n&&null!==(i=n.pixels)&&void 0!==i&&null!==(l=i.tiktok)&&void 0!==l&&l.loaded&&(d.tiktok={event:"AddToWishlist",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:t.price*t.quantity,currency:t.currency,contents:[{content_id:t.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:t.name,quantity:t.quantity,price:t.price}]}}),jQuery(document).trigger("wpmClientSideAddToWishlist",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o,r,n,i;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d={event:"viewItem",product:l};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(d.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},l&&(d.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(l))),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(n=r.pixels)&&void 0!==n&&null!==(i=n.tiktok)&&void 0!==i&&i.loaded&&(d.tiktok={event:"ViewContent",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()},l&&(d.tiktok.properties={value:l.price*l.quantity,currency:l.currency,contents:[{content_id:l.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],content_type:"product",content_name:l.name,quantity:l.quantity,price:l.price}]})),jQuery(document).trigger("wpmClientSideViewItem",d),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(d)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a,o,r,n;let i={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"Search",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{query:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmPlaceOrder",(()=>{var e,t,a;let o={event:"placeOrder"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.tiktok)&&void 0!==a&&a.loaded&&(o.tiktok={event:"PlaceAnOrder",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser()}),jQuery(document).trigger("wpmClientPlaceOrder",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a,o,r,n;let i={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(i.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(n=r.tiktok)&&void 0!==n&&n.loaded&&(i.tiktok={event:"CompletePayment",event_id:wpm.getRandomEventId(),context:wpm.getTikTokUserDataFromBrowser(),properties:{value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,contents:wpm.getTikTokOrderItemIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",i)}))},459:()=>{const e=[".add_to_cart_button:not(.product_type_variable)",".ajax_add_to_cart",".single_add_to_cart_button"].join(",");jQuery(e).on("click adding_to_cart",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}})),jQuery("a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)").one("click",(e=>{try{if(jQuery(e.target).closest("a").attr("href")){let t=new URL(jQuery(e.currentTarget).attr("href"),window.location.origin);if(t.searchParams.has("add-to-cart")){let e=t.searchParams.get("add-to-cart");wpm.addProductToCart(e,1)}}}catch(e){console.error(e)}})),jQuery(".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product").on("click",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}})),jQuery("#billing_email").on("input",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery("form.checkout").on("checkout_place_order_success",(()=>{!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4),jQuery(document).trigger("wpmPlaceOrder",{})})),jQuery("[name='update_cart']").on("click",(()=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}})),jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))},584:()=>{!function(e,t,a){const o="_wpm_order_ids",r="_pmw_endpoint_available",n="pmw/v1/test/";function i(){return""!==e.getCookie(o)}e.emailSelected=!1,e.paymentMethodSelected=!1,e.useRestEndpoint=()=>e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold(),e.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(0)<=10,e.isRestEndpointAvailable=async()=>window.sessionStorage.getItem(r)?JSON.parse(window.sessionStorage.getItem(r)):await e.testEndpoint(),e.isSessionStorageAvailable=()=>!!window.sessionStorage,e.testEndpoint=async function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:e.root+n,o=arguments.length>1&&arguments[1]!==a?arguments[1]:r,i=await fetch(t,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!0)),!0):404===i.status||0===i.status?(window.sessionStorage.setItem(o,JSON.stringify(!1)),!1):void 0},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:r;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){let r=arguments.length>1&&arguments[1]!==a?arguments[1]:"thankyou_page";if(window.Storage)if(null===localStorage.getItem(o)){let e=[];e.push(t),window.localStorage.setItem(o,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(o));e.includes(t)||(e.push(t),window.localStorage.setItem(o,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let r=[];i()&&(r=JSON.parse(e.getCookie(o))),r.includes(t)||(r.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(r)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t,r)},e.isOrderIdStored=t=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(o)&&JSON.parse(localStorage.getItem(o)).includes(t):!!i()&&JSON.parse(e.getCookie(o)).includes(t):(console.log("order duplication prevention: off"),!1),e.isEmail=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),e.removeProductFromCart=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==o?wpmDataLayer.cart[t].quantity:o,wpmDataLayer.cart[t]){let r=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",r),null==o||wpmDataLayer.cart[t].quantity===o?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},e.addProductToCart=(t,a)=>{try{var o;if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(null!==(o=wpmDataLayer)&&void 0!==o&&o.products[t]){var r;let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmAddToCart",o),null!==(r=wpmDataLayer)&&void 0!==r&&r.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+a:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,a)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=()=>{try{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.data.cart))}))}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{var a;if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products&&(t=t.filter((e=>!(e in wpmDataLayer.products)))),t&&0!==t.length){try{let a;if(a=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({pageId:wpmDataLayer.general.pageId,productIds:t})}):await fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:t})}),a.ok){let e=await a.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer.products&&wpmDataLayer.products[t]||await e.getProductsFromBackend([t]),e.triggerViewItemEvent(t)},e.triggerViewItemEvent=t=>{let a=e.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmViewItem",a)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,o=arguments.length>2&&arguments[2]!==a?arguments[2]:null,r={step:e,checkout_option:t,value:o};jQuery(document).trigger("wpmFireCheckoutOption",r)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let l,d={};e.observerCallback=(t,a)=>{t.forEach((t=>{try{let o,r=jQuery(t.target).data("ioid");if(o=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!o)throw Error("wpmProductId element not found");t.isIntersecting?d[r]=setTimeout((()=>{e.triggerViewItemList(o),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(d[r]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let s,c=0,u=()=>{s=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}))};e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),l=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),u(),s.each(((e,t)=>{jQuery(t[0]).data("ioid",c++),l.observe(t[0])}))}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let p=new MutationObserver((e=>{e.forEach((e=>{let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&m(this)&&(jQuery(this).data("ioid",c++),l.observe(this))}))}))})),m=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",o=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(o){let a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);let r="expires="+a.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},e.deleteCookie=t=>{e.setCookie(t,"",-1)},e.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},e.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},e.storeOrderIdOnServer=async(t,a)=>{try{let o;o=await e.isRestEndpointAvailable()?await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:t,source:a,nonce:e.nonce}),keepalive:!0,cache:"no-cache"}):await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:t,source:a,nonce:e.nonce}),keepalive:!0}),o.ok||console.error("wpm.storeOrderIdOnServer error")}catch(e){console.error(e)}},e.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get(),e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,o={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return o.isVariation&&(o.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),o},e.setReferrerToCookie=()=>{e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=()=>e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null,e.getClidFromBrowser=function(){let t,o=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[o])?e.getCookie(t[o]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.version=()=>{console.log(wpmDataLayer.version)},e.loadScriptAndCacheIt=e=>{let t={dataType:"script",cache:!0,url:e};return jQuery.ajax(t)},e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getWpmSessionData();return null==t?void 0:t.loginEventFired},e.setLoginEventFired=()=>{let t=e.getWpmSessionData();t.loginEventFired=!0,e.setWpmSessionData(t)},e.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),e.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),e.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),e.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),e.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),e.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t},e.doesUrlContainPatterns=e=>{for(const t of e)if(new RegExp(t).test(window.location.href))return!0;return!1},e.excludeDomainFromTracking=()=>{var e,t;let a=["appspot.com","translate.google.com"];return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.excludeDomains&&(a=[...a,...wpmDataLayer.general.excludeDomains]),!!a.some((e=>window.location.href.includes(e)))&&(console.debug("Pixel Manager for WooCommerce: Aborted due to excluded domain"),!0)},e.getRandomEventId=()=>(Math.random()+1).toString(36).substring(2);let g=!1;const y=()=>{!1===g&&jQuery(document).trigger("pmw:ready"),g=!0};jQuery(document).on("ready",(()=>{y()})),document.addEventListener("DOMContentLoaded",(()=>{y()}))}(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((()=>{console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),wpm.excludeDomainFromTracking()||document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((()=>{wpm.pageLoaded().then((()=>{document.dispatchEvent(new Event("wpmLoad"))}))})),jQuery(document).on("pmw:ready",(()=>{wpm.wpmDataLayerExists().then((()=>{wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},t={};function a(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,a),n.exports}a(534),wpm.jQueryExists().then((function(){jQuery(document).on("pmw:ready",(()=>{a(459)})),a(299),a(69),a(12),a(787),a(207)}))})();
|
2 |
//# sourceMappingURL=wpm-public.p1.min.js.map
|
js/public/wpm-public.p1.min.js.br
CHANGED
Binary file
|
js/public/wpm-public.p1.min.js.gz
CHANGED
Binary file
|
js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aAAaiC,QAAQsH,OAAS,WAEpIlJ,IAAImjB,6BAEV1jB,SAAS2U,cAAc,IAAIC,MAAM,oBAAoB,IAErD3L,MAAK,KACL1I,IAAI6hB,aAAanZ,MAAK,WACrBjJ,SAAS2U,cAAc,IAAIC,MAAM,WAClC,GAAE,IAQJrU,IAAI+hB,YAAYrZ,MAAK,WAMpB1I,IAAIyhB,qBACF/Y,MAAK,KAEL1I,IAAIge,mCAGJhe,IAAIoe,sCAAsC,GAE7C,G,GC7CIkF,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBziB,IAAjB0iB,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CClBA7b,EAAQ,KAGR7H,IAAI2hB,eAAejZ,MAAK,WAEvBb,EAAQ,KAIRA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAuBRA,EAAQ,IACT,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fbUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user data is too slow.\n\t\t *\n\t\t * But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t *\n\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\n\t// \t\t\tevent_name : \"ViewContent\",\n\t// \t\t\tevent_id : eventId,\n\t// \t\t\tuser_data : wpm.getFbUserData(),\n\t// \t\t\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor(const key in wpmDataLayer.cart){\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\t\t\n\t\treturn content_ids\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.ads.enhanced_conversion_data)\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.then(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .then(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\t// Update the PMW consent values with values coming from a CMP\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", function (event) {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groubsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = function () {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\n\t\t)\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t/**\n\t * Borlabs Cookie\n\t * If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", function (e) {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", function (event) {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", function () {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", function () {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", function () {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\nconst addToCartSelectors = [\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n].join(\",\")\n\n\n// add_to_cart event\n// When DOM is ready, register event listeners\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(addToCartSelectors).on(\"click\", (event) => {\n\n\t\ttry {\n\n\t\t\t// console.log(\"add_to_cart event detected\")\n\n\t\t\tlet quantity = 1,\n\t\t\t\tproductId\n\n\t\t\t// Only process on product pages\n\t\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t\t// First process related and upsell products\n\t\t\t\tif (typeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\t// If is simple product\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\t// If is variable product or variable-subscription\n\t\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\t// If is grouped product\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// If is bundle product\n\t\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n\njQuery(document).on(\"ready\", () => {\n\tjQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", function (event) {\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\n\n\t\ttry {\n\t\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin)\n\n\t\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\")\n\t\t\t\t\twpm.addProductToCart(productId, 1)\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n// select item event\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\n\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * On some pages the event fires multiple times, and on product pages\n\t\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t\t * the most compatible way across shops.\n\t\t\t *\n\t\t\t * e.stopPropagation();\n\t\t\t * */\n\n\t\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t\t/**\n\t\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t\t * related products, which are found below.\n\t\t\t */\n\n\t\t\tif (productId) {\n\n\t\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n].join(\",\")\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).one(\"click init_checkout\", checkoutButtonClasses, () => {\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n */\njQuery(document).on(\"ready\", () => {\n\tjQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t\tif (false === wpm.emailSelected) {\n\t\t\twpm.fireCheckoutProgress(2)\n\t\t}\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\t}\n\n\t\twpm.fireCheckoutProgress(4)\n\n\t\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n\t})\n})\n\n// update cart event\njQuery(document).on(\"ready\", () => {\n\tjQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\t\ttry {\n\t\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\t\tlet quantity = jQuery(element).find(\".qty\").val()\n\n\t\t\t\tif (quantity === 0) {\n\t\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t\t}\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t})\n})\n\n// add_to_wishlist\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(document).on(\"ready\", () => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\twpm.triggerViewItemEventPrep(productId)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n//\n// \t\ttry {\n// \t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n// \t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n//\n// \t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n//\n// \t\t\t/**\n// \t\t\t * If we have a variable product with no preset,\n// \t\t\t * and variations output is enabled,\n// \t\t\t * then we send a viewItem event with the first\n// \t\t\t * variation we find for the parent.\n// \t\t\t * If variations output is disabled,\n// \t\t\t * we just send the parent ID.\n// \t\t\t *\n// \t\t\t * And if Facebook microdata is active, use the\n// \t\t\t * microdata product ID.\n// \t\t\t */\n//\n// \t\t\tif (\n// \t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n// \t\t\t\twpmDataLayer?.general?.variationsOutput\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parentId\" in product) {\n//\n// \t\t\t\t\t\tproductId = product.id\n// \t\t\t\t\t\tbreak\n// \t\t\t\t\t}\n// \t\t\t\t}\n//\n// \t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n// \t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(document).on(\"wpmLoad\", () => {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null, true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n\n\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\n\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, source = \"thankyou_page\", expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId, source)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products))\n\t\t}\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = async (orderId, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tconst excludedDomains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"tranlsate.google.com\",\n\t\t]\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (excludedDomains.some(domain => window.location.href.includes(domain))) {\n\t\t\t// console.log(\"Pixel Manager for WooCommerce: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(() => {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") + \" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t if(wpm.excludeDomainFromTracking()) return\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(() => {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n/**\n * Run when page is ready\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(() => {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\t// require(\"./wpm/wc_hooks\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./wpm/event_listeners_premium\")\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","doesUrlContainPatterns","exclusion_patterns","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","getUserIdentifiersForFb","user","id","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","localStorage","getItem","log","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","URLSearchParams","get","split","groupsObject","forEach","group","groupArray","groubsObject","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","consent","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","duration","consentSetCookie","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addToCartSelectors","addProductToCart","product_type","Number","val","each","index","find","classes","getPostIdFromString","one","target","closest","origin","searchParams","has","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","checkoutButtonClasses","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","pageId","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","match","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","order_id","cartItemKey","cartItemKeys","matches","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","patterns","pattern","excludeDomainFromTracking","domain","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"wpm-public.p1.min.js","mappings":"sBAOAA,OAAOC,UAAUC,GAAG,iBAAiB,KAAM,sBAG7B,QAAZ,EAAAC,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCC,UAChB,QAAb,EAACH,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,OAA9B,EAAgCE,QAChCC,IAAIC,uBAAmC,QAAb,EAACN,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,WAAlB,EAAZ,EAAgCK,qBAE3DF,IAAIG,SAAS,MAAO,iBAAiBH,IAAII,mBAC9C,IAKDZ,OAAOC,UAAUC,GAAG,0BAA0B,CAACW,EAAOC,KAErD,IAAI,UACH,GAAiB,QAAb,EAACX,oBAAY,OAAQ,QAAR,EAAZ,EAAcC,cAAM,OAAU,QAAV,EAApB,EAAsBC,gBAAQ,QAA9B,EAAgCE,OAAQ,OAE7CQ,IAAI,QAAS,YAAaD,EAAQT,SAASW,YAAa,CACvDC,QAASH,EAAQT,SAASa,UAI5B,CAFE,MAAOC,GACRC,QAAQD,MAAMA,EACf,KAKDnB,OAAOC,UAAUC,GAAG,8BAA8B,CAACW,EAAOC,KAEzD,IAAI,UACH,GAAiB,QAAb,EAACX,oBAA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S,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,CClBA3c,EAAQ,KAGR/H,IAAIuiB,eAAe3Z,MAAK,WAEvBpJ,OAAOC,UAAUC,GAAG,aAAa,KAChCqI,EAAQ,IAAiC,IAG1CA,EAAQ,KAIRA,EAAQ,IACRA,EAAQ,IACRA,EAAQ,KAuBRA,EAAQ,IACT,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners_on_ready.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fbUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet() && wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user data is too slow.\n\t\t *\n\t\t * But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t *\n\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.isFbAdvancedMatchingEnabled = () => {\n\t\tif (wpmDataLayer?.pixels?.facebook?.advanced_matching) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) data.client_user_agent = navigator.userAgent\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\n\t// \t\t\tevent_name : \"ViewContent\",\n\t// \t\t\tevent_id : eventId,\n\t// \t\t\tuser_data : wpm.getFbUserData(),\n\t// \t\t\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\n\t\treturn content_ids\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.ads.enhanced_conversion_data)\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.then(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .then(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\t// Update the PMW consent values with values coming from a CMP\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", function (event) {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groubsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = function () {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\n\t\t)\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t/**\n\t * Borlabs Cookie\n\t * If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", function (e) {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", function (event) {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", function () {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", function () {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", function () {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * remove_from_cart event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\tconsole.log(\"remove_from_cart event\" + new Date().getTime())\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * begin_checkout event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\nlet checkoutButtonClasses = [\n\t// \".checkout\",\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n].join(\",\")\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"click init_checkout\", checkoutButtonClasses, () => {\n\n\t// console.log(\"init_checkout at: \" + new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n/**\n * Set up PWM events\n */\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(document).on(\"wpmLoad\", () => {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null, true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n\n\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585702922241#item-link-Adding%20parameters%20to%20event%20code\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToCart\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"InitiateCheckout\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"ViewContent\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.tiktok.properties = {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"Search\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tquery: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmPlaceOrder\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"placeOrder\",\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"PlaceAnOrder\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientPlaceOrder\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"CompletePayment\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcontents: wpm.getTikTokOrderItemIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\n\n","/**\n * Register event listeners\n */\n\n\n/**\n * add_to_cart event\n *\n * WC is inconsistent with events that emit add-to-cart events.\n * adding_to_cart and added_to_are legacy events. Also, they only work\n * on Ajax buttons on shop pages.\n */\n\nconst addToCartSelectors = [\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n].join(\",\")\n\njQuery(addToCartSelectors).on(\"click adding_to_cart\", (event) => {\n\t// console log current time\n\t// console.log(\"add_to_cart event fired at: \" + new Date().getTime())\n\n\ttry {\n\n\t\t// console.log(\"add_to_cart event detected\")\n\n\t\tlet quantity = 1,\n\t\t\tproductId\n\n\t\t// Only process on product pages\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\njQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin)\n\n\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\")\n\t\t\t\twpm.addProductToCart(productId, 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select item event\n// jQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\njQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\n// jQuery(document).on(\"input\", \"#billing_email\", (event) => {\njQuery(\"#billing_email\").on(\"input\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n *\n * Has to be hooked after document ready !\n */\njQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t// console log current time\n\t// console.log(\"checkout_place_order_success event fired at: \" + new Date().getTime())\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n\n\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n})\n\n/**\n * Update cart event\n *\n * Has to be hooked after document ready !\n */\njQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\t\tlet quantity = jQuery(element).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n// add_to_wishlist\njQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\ttry {\n\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\twpm.triggerViewItemEventPrep(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n//\n// \t\ttry {\n// \t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n// \t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n//\n// \t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n//\n// \t\t\t/**\n// \t\t\t * If we have a variable product with no preset,\n// \t\t\t * and variations output is enabled,\n// \t\t\t * then we send a viewItem event with the first\n// \t\t\t * variation we find for the parent.\n// \t\t\t * If variations output is disabled,\n// \t\t\t * we just send the parent ID.\n// \t\t\t *\n// \t\t\t * And if Facebook microdata is active, use the\n// \t\t\t * microdata product ID.\n// \t\t\t */\n//\n// \t\t\tif (\n// \t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n// \t\t\t\twpmDataLayer?.general?.variationsOutput\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parentId\" in product) {\n//\n// \t\t\t\t\t\tproductId = product.id\n// \t\t\t\t\t\tbreak\n// \t\t\t\t\t}\n// \t\t\t\t}\n//\n// \t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n// \t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, source = \"thankyou_page\", expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId, source)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products))\n\t\t}\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = async (orderId, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t\t// \"X-WP-Nonce\" : wpm.nonce,\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t\tnonce : wpm.nonce,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t\tnonce : wpm.nonce,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\t// console.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tlet excludeDomains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"translate.google.com\",\n\t\t]\n\n\t\tif (wpmDataLayer?.general?.excludeDomains) {\n\t\t\texcludeDomains = [...excludeDomains, ...wpmDataLayer.general.excludeDomains]\n\t\t}\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (excludeDomains.some(domain => window.location.href.includes(domain))) {\n\t\t\tconsole.debug(\"Pixel Manager for WooCommerce: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\tlet jQueryReadyFired = false\n\n\tconst fireJQueryReady = () => {\n\t\tif (jQueryReadyFired === false) jQuery(document).trigger(\"pmw:ready\")\n\t\tjQueryReadyFired = true\n\t}\n\n\tjQuery(document).on(\"ready\", () => {\n\t\tfireJQueryReady()\n\t})\n\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\tfireJQueryReady()\n\t})\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(() => {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") + \" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tif (wpm.excludeDomainFromTracking()) return\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(() => {\n\t\twpm.pageLoaded().then(() => {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n/**\n * Run when page is ready\n */\n\n// wpm.pageReady().then(() => {\njQuery(document).on(\"pmw:ready\", () => {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(() => {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\tjQuery(document).on(\"pmw:ready\", () => {\n\t\trequire(\"./wpm/event_listeners_on_ready\")\n\t})\n\n\trequire(\"./wpm/event_listeners\")\n\n\t// require(\"./wpm/wc_hooks\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./wpm/event_listeners_premium\")\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","doesUrlContainPatterns","exclusion_patterns","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","isFbAdvancedMatchingEnabled","getUserIdentifiersForFb","user","id","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","advanced_matching","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","localStorage","getItem","log","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","URLSearchParams","get","split","groupsObject","forEach","group","groupArray","groubsObject","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","consent","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","duration","consentSetCookie","setCookie","stringify","getTime","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","checkoutButtonClasses","paymentMethodSelected","fireCheckoutProgress","fireCheckoutOption","val","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","product_type","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","tiktok","getRandomEventId","context","getTikTokUserDataFromBrowser","properties","contents","content_id","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","query","getTikTokOrderItemIds","addToCartSelectors","addProductToCart","Number","each","index","find","classes","getPostIdFromString","one","target","closest","origin","searchParams","has","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","emailSelected","getCartItemsFromBackend","variation","triggerViewItemEventPrep","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","pageId","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","match","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","order_id","nonce","cartItemKey","cartItemKeys","matches","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","patterns","pattern","excludeDomainFromTracking","excludeDomains","domain","debug","jQueryReadyFired","fireJQueryReady","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
|
languages/woocommerce-google-adwords-conversion-tracking-tag.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Pixel Manager for WooCommerce 1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-11-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.7.1\n"
|
15 |
"X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
|
@@ -34,879 +34,906 @@ msgstr ""
|
|
34 |
msgid "https://sweetcode.com"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: classes/admin/class-admin.php:
|
38 |
msgid "GA4 Attribution"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: classes/admin/class-admin.php:
|
42 |
-
#: classes/admin/class-admin.php:
|
43 |
-
#: wgact.php:
|
44 |
-
#: wgact.php:
|
45 |
msgid "Pixel Manager"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: classes/admin/class-admin.php:
|
49 |
msgid "Main"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: classes/admin/class-admin.php:
|
53 |
msgid "Google"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: classes/admin/class-admin.php:
|
57 |
msgid "Google Ads Conversion ID"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: classes/admin/class-admin.php:
|
61 |
msgid "Google Ads Purchase Conversion Label"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: classes/admin/class-admin.php:
|
65 |
msgid "Google Analytics UA"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: classes/admin/class-admin.php:
|
69 |
msgid "Google Analytics 4"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: classes/admin/class-admin.php:
|
73 |
msgid "Google Optimize"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: classes/admin/class-admin.php:
|
77 |
msgid "Meta (Facebook)"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: classes/admin/class-admin.php:
|
81 |
msgid "Meta (Facebook) pixel ID"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: classes/admin/class-admin.php:
|
85 |
msgid "more pixels"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: classes/admin/class-admin.php:
|
89 |
msgid "Microsoft Advertising UET tag ID"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: classes/admin/class-admin.php:
|
93 |
msgid "Twitter pixel ID"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: classes/admin/class-admin.php:
|
97 |
msgid "Pinterest pixel ID"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: classes/admin/class-admin.php:
|
101 |
msgid "Pinterest Enhanced Match"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: classes/admin/class-admin.php:
|
105 |
msgid "Snapchat pixel ID"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: classes/admin/class-admin.php:
|
109 |
msgid "TikTok pixel ID"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: classes/admin/class-admin.php:
|
113 |
msgid "Hotjar site ID"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: classes/admin/class-admin.php:
|
117 |
msgid "Advanced"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: classes/admin/class-admin.php:
|
121 |
msgid "Order Total Logic"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: classes/admin/class-admin.php:
|
125 |
msgid "Order Duplication Prevention"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: classes/admin/class-admin.php:
|
129 |
msgid "Maximum Compatibility Mode"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: classes/admin/class-admin.php:
|
133 |
msgid "Disable Tracking for User Roles"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: classes/admin/class-admin.php:
|
137 |
msgid "ACR"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: classes/admin/class-admin.php:
|
141 |
msgid "Order List Info"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: classes/admin/class-admin.php:
|
145 |
msgid "Scroll Tracker"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: classes/admin/class-admin.php:
|
149 |
msgid "Conversion Cart Data"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: classes/admin/class-admin.php:
|
153 |
msgid "Enhanced E-Commerce"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: classes/admin/class-admin.php:
|
157 |
msgid "GA4 API secret"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: classes/admin/class-admin.php:
|
161 |
msgid "GA4 Property ID"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: classes/admin/class-admin.php:
|
165 |
msgid "GA4 Data API Credentials"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: classes/admin/class-admin.php:
|
169 |
msgid "Enhanced Link Attribution"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: classes/admin/class-admin.php:
|
173 |
msgid "Google User ID"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: classes/admin/class-admin.php:
|
177 |
msgid "Google Ads Enhanced Conversions"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: classes/admin/class-admin.php:
|
181 |
msgid "Google Ads Phone Conversion Number"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: classes/admin/class-admin.php:
|
185 |
msgid "Google Ads Phone Conversion Label"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: classes/admin/class-admin.php:
|
189 |
msgid "Google Ads Conversion Adjustments: Conversion Name"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: classes/admin/class-admin.php:
|
193 |
msgid "Google Ads Conversion Adjustments: Feed"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: classes/admin/class-admin.php:
|
197 |
msgid "Cookie Consent Management"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: classes/admin/class-admin.php:
|
201 |
msgid "Google Consent Mode"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: classes/admin/class-admin.php:
|
205 |
msgid "Google Consent Regions"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: classes/admin/class-admin.php:
|
209 |
msgid "Explicit Consent Mode"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: classes/admin/class-admin.php:
|
213 |
msgid "Borlabs Cookie Support"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: classes/admin/class-admin.php:
|
217 |
msgid "Cookiebot Support"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: classes/admin/class-admin.php:
|
221 |
msgid "Complianz GDPR Support"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: classes/admin/class-admin.php:
|
225 |
msgid "Cookie Notice Support"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: classes/admin/class-admin.php:
|
229 |
msgid "Cookie Script Support"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: classes/admin/class-admin.php:
|
233 |
msgid "GDPR Cookie Compliance Support"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: classes/admin/class-admin.php:
|
237 |
msgid "GDPR Cookie Consent Support"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: classes/admin/class-admin.php:
|
241 |
msgid "Meta (Facebook) CAPI: token"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: classes/admin/class-admin.php:
|
245 |
msgid "Meta (Facebook) CAPI: test event code"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: classes/admin/class-admin.php:
|
249 |
msgid "Meta (Facebook) CAPI: process anonymous hits"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: classes/admin/class-admin.php:
|
253 |
-
msgid "Meta (Facebook)
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: classes/admin/class-admin.php:
|
257 |
msgid "Meta (Facebook) Microdata Tags for Catalogues"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: classes/admin/class-admin.php:
|
261 |
-
|
262 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
msgid "Dynamic Remarketing"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: classes/admin/class-admin.php:
|
267 |
msgid "Product Identifier"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: classes/admin/class-admin.php:
|
271 |
msgid "Variations output"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: classes/admin/class-admin.php:
|
275 |
msgid "Google Business Vertical"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: classes/admin/class-admin.php:
|
279 |
-
#: classes/admin/class-admin.php:
|
280 |
msgid "Diagnostics"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: classes/admin/class-admin.php:
|
284 |
-
#: classes/admin/class-admin.php:
|
285 |
msgid "Support"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: classes/admin/class-admin.php:
|
289 |
-
#: classes/admin/class-admin.php:
|
290 |
msgid "Author"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: classes/admin/class-admin.php:
|
294 |
msgid ""
|
295 |
"It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.\n"
|
296 |
" In order for the plugin to work properly you need to disable the script blocker."
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: classes/admin/class-admin.php:
|
300 |
#: classes/admin/class-notifications.php:96
|
301 |
#: classes/admin/class-notifications.php:146
|
302 |
msgid "Learn more"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: classes/admin/class-admin.php:
|
306 |
msgid "Profit Driven Marketing by SweetCode"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: classes/admin/class-admin.php:
|
310 |
msgid "Show Pro version settings"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: classes/admin/class-admin.php:
|
314 |
msgid "Enabling this will only show you the pro settings in the user interface. It won't actually enable the pro features. If you want to try out the pro features head over to sweetcode.com and sign up for a trial."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: classes/admin/class-admin.php:
|
318 |
msgid "Visit us here:"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: classes/admin/class-admin.php:
|
322 |
msgid "Payment Gateway Tracking Accuracy Report"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: classes/admin/class-admin.php:
|
326 |
-
#: classes/admin/class-admin.php:
|
327 |
-
#: classes/admin/class-admin.php:
|
328 |
msgid "beta"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: classes/admin/class-admin.php:
|
332 |
msgid "What's this? Follow this link to learn more"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: classes/admin/class-admin.php:
|
336 |
msgid "Available payment gateways"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: classes/admin/class-admin.php:
|
340 |
msgid "id"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: classes/admin/class-admin.php:
|
344 |
msgid "method_title"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: classes/admin/class-admin.php:
|
348 |
msgid "class"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: classes/admin/class-admin.php:
|
352 |
msgid "Purchase confirmation page reached per gateway (active and inactive)"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: classes/admin/class-admin.php:
|
356 |
-
#: classes/admin/class-admin.php:
|
357 |
-
#: classes/admin/class-admin.php:
|
358 |
msgid "The analysis is being generated. Please check back in 5 minutes."
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: classes/admin/class-admin.php:
|
362 |
msgid "Purchase confirmation page reached per gateway (only active), weighted by frequency"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: classes/admin/class-admin.php:
|
366 |
msgid "Automatic Conversion Recovery (ACR)"
|
367 |
msgstr ""
|
368 |
|
369 |
#. translators: The number and percentage of orders that were recovered by the Automatic Conversion Recovery (ACR).
|
370 |
-
#: classes/admin/class-admin.php:
|
371 |
msgid "ACR recovered %1$s (%2$s%%) out of %3$s missing conversions."
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: classes/admin/class-admin.php:
|
375 |
msgid "This feature is only available in the pro version of the plugin. Follow the link to learn more about it:"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: classes/admin/class-admin.php:
|
379 |
msgid "Get the pro version of the Pixel Manager for WooCommerce over here"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: classes/admin/class-admin.php:
|
383 |
msgid "Go Pro"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: classes/admin/class-admin.php:
|
387 |
msgid "Contacting Support"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: classes/admin/class-admin.php:
|
391 |
msgid "Debug Information"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: classes/admin/class-admin.php:
|
395 |
msgid "copy to clipboard"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: classes/admin/class-admin.php:
|
399 |
msgid "Export settings"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: classes/admin/class-admin.php:
|
403 |
msgid "Export to disk"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: classes/admin/class-admin.php:
|
407 |
msgid "Import settings"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: classes/admin/class-admin.php:
|
411 |
-
#: classes/admin/class-admin.php:
|
412 |
msgid "Settings imported successfully!"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: classes/admin/class-admin.php:
|
416 |
-
#: classes/admin/class-admin.php:
|
417 |
msgid "Reloading...(in 5 seconds)!"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: classes/admin/class-admin.php:
|
421 |
-
#: classes/admin/class-admin.php:
|
422 |
msgid "There was an error importing that file! Please try again."
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: classes/admin/class-admin.php:
|
426 |
msgid "Translations"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: classes/admin/class-admin.php:
|
430 |
msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: classes/admin/class-admin.php:
|
434 |
msgid "Post a support request in the WordPress support forum here: "
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: classes/admin/class-admin.php:
|
438 |
msgid "Support forum"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: classes/admin/class-admin.php:
|
442 |
msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: classes/admin/class-admin.php:
|
446 |
msgid "Or send us an email to the following address: "
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: classes/admin/class-admin.php:
|
450 |
msgid "Send us your support request through the WooCommerce.com dashboard: "
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: classes/admin/class-admin.php:
|
454 |
msgid "More details about the developer of this plugin: "
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: classes/admin/class-admin.php:
|
458 |
msgid "Developer: SweetCode"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: classes/admin/class-admin.php:
|
462 |
msgid "Website: "
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: classes/admin/class-admin.php:
|
466 |
msgid "The Google Analytics Universal property ID looks like this:"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: classes/admin/class-admin.php:
|
470 |
msgid "The Google Analytics 4 measurement ID looks like this:"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: classes/admin/class-admin.php:
|
474 |
msgid "The conversion ID looks similar to this:"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: classes/admin/class-admin.php:
|
478 |
msgid "The purchase conversion label looks similar to this:"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: classes/admin/class-admin.php:
|
482 |
-
#: classes/admin/class-admin.php:
|
483 |
msgid "Requires an active Google Ads Conversion ID"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: classes/admin/class-admin.php:
|
487 |
msgid "The Google Optimize container ID looks like this:"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: classes/admin/class-admin.php:
|
491 |
-
#: classes/admin/class-admin.php:
|
492 |
msgid "or"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: classes/admin/class-admin.php:
|
496 |
msgid "The Meta (Facebook) pixel ID looks similar to this:"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: classes/admin/class-admin.php:
|
500 |
msgid "The Microsoft Advertising UET tag ID looks similar to this:"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: classes/admin/class-admin.php:
|
504 |
msgid "The Twitter pixel ID looks similar to this:"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: classes/admin/class-admin.php:
|
508 |
msgid "The Pinterest pixel ID looks similar to this:"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: classes/admin/class-admin.php:
|
512 |
msgid "Enable Pinterest enhanced match"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: classes/admin/class-admin.php:
|
516 |
msgid "The Snapchat pixel ID looks similar to this:"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: classes/admin/class-admin.php:
|
520 |
msgid "The TikTok pixel ID looks similar to this:"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: classes/admin/class-admin.php:
|
524 |
msgid "The Hotjar site ID looks similar to this:"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: classes/admin/class-admin.php:
|
528 |
msgid "Order Subtotal: Doesn't include tax and shipping (default)"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: classes/admin/class-admin.php:
|
532 |
msgid "Order Total: Includes tax and shipping"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: classes/admin/class-admin.php:
|
536 |
msgid "Profit Margin: Only reports the profit margin. Excludes tax, shipping, and where possible, gateway fees."
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: classes/admin/class-admin.php:
|
540 |
msgid "This is the order total amount reported back to the paid ads pixels (such as Google Ads, Facebook, etc.)"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: classes/admin/class-admin.php:
|
544 |
msgid "To use the Profit Margin setting you will need to install one of the following two Cost of Goods plugins:"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: classes/admin/class-admin.php:
|
548 |
-
#: classes/admin/class-admin.php:
|
549 |
msgid "open the documentation"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: classes/admin/class-admin.php:
|
553 |
msgid "Enable Google consent mode with standard settings"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: classes/admin/class-admin.php:
|
557 |
msgid "If no region is set, then the restrictions are enabled for all regions. If you specify one or more regions, then the restrictions only apply for the specified regions."
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: classes/admin/class-admin.php:
|
561 |
msgid "Google Analytics Enhanced E-Commerce is "
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: classes/admin/class-admin.php:
|
565 |
msgid "Google Analytics 4 activation required"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: classes/admin/class-admin.php:
|
569 |
msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: classes/admin/class-admin.php:
|
573 |
-
#: classes/admin/class-admin.php:
|
574 |
msgid "Copied feed URL to clipboard"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: classes/admin/class-admin.php:
|
578 |
-
#: classes/admin/class-admin.php:
|
579 |
-
#: classes/admin/class-admin.php:
|
580 |
-
#: classes/admin/class-admin.php:
|
581 |
msgid "Copy to clipboard"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: classes/admin/class-admin.php:
|
585 |
msgid "Import credentials"
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: classes/admin/class-admin.php:
|
589 |
msgid "Delete credentials"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: classes/admin/class-admin.php:
|
593 |
msgid "The GA4 property ID must be set."
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: classes/admin/class-admin.php:
|
597 |
msgid "Enable Google Analytics enhanced link attribution"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: classes/admin/class-admin.php:
|
601 |
-
#: classes/admin/class-admin.php:
|
602 |
msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: classes/admin/class-admin.php:
|
606 |
msgid "Enable Google user ID"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: classes/admin/class-admin.php:
|
610 |
msgid "Enable Google Ads Enhanced Conversions"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: classes/admin/class-admin.php:
|
614 |
msgid "You need to activate Google Ads"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: classes/admin/class-admin.php:
|
618 |
msgid "The Google Ads phone conversion number must be in the same format as on the website."
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: classes/admin/class-admin.php:
|
622 |
msgid "The conversion name must match the conversion name in Google Ads exactly."
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: classes/admin/class-admin.php:
|
626 |
msgid "Requires an active Google Ads Conversion ID and Conversion Label."
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: classes/admin/class-admin.php:
|
630 |
msgid "The Conversion Name must be set."
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: classes/admin/class-admin.php:
|
634 |
msgid "Borlabs Cookie detected. Automatic support is:"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: classes/admin/class-admin.php:
|
638 |
msgid "Cookiebot detected. Automatic support is:"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: classes/admin/class-admin.php:
|
642 |
msgid "Complianz GDPR detected. Automatic support is:"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: classes/admin/class-admin.php:
|
646 |
msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: classes/admin/class-admin.php:
|
650 |
msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: classes/admin/class-admin.php:
|
654 |
msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: classes/admin/class-admin.php:
|
658 |
msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: classes/admin/class-admin.php:
|
662 |
msgid "Enable Explicit Consent Mode"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: classes/admin/class-admin.php:
|
666 |
msgid "Only activate the Explicit Consent Mode if you are also using a Cookie Management Platform (a cookie banner) that is compatible with this plugin. Find a list of compatible plugins in the documentation."
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: classes/admin/class-admin.php:
|
670 |
-
#: classes/admin/class-admin.php:
|
671 |
-
#: classes/admin/class-admin.php:
|
672 |
-
#: classes/admin/class-admin.php:
|
673 |
msgid "You need to activate the Meta (Facebook) pixel"
|
674 |
msgstr ""
|
675 |
|
676 |
-
#: classes/admin/class-admin.php:
|
677 |
msgid "The test event code automatically rotates frequently within Facebook. If you don't see the server events flowing in, first make sure that you've set the latest test event code."
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: classes/admin/class-admin.php:
|
681 |
msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: classes/admin/class-admin.php:
|
685 |
-
|
|
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: classes/admin/class-admin.php:
|
689 |
msgid "Enable Meta (Facebook) product microdata output"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: classes/admin/class-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: classes/admin/class-admin.php:
|
697 |
msgid "Enable the maximum compatibility mode"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: classes/admin/class-admin.php:
|
701 |
msgid "Automatic Conversion Recovery (ACR) is "
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: classes/admin/class-admin.php:
|
705 |
msgid "Display PMW related information on the order list page"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: classes/admin/class-admin.php:
|
709 |
msgid "The Scroll Tracker thresholds. A comma separated list of scroll tracking thresholds in percent where the scroll tracker triggers its events."
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: classes/admin/class-admin.php:
|
713 |
msgid "Advanced order duplication prevention is "
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: classes/admin/class-admin.php:
|
717 |
msgid "Basic order duplication prevention is "
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: classes/admin/class-admin.php:
|
721 |
msgid "Enable dynamic remarketing audience collection"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: classes/admin/class-admin.php:
|
725 |
msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: classes/admin/class-admin.php:
|
729 |
msgid "Enable variations output"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: classes/admin/class-admin.php:
|
733 |
msgid "In order for this to work you need to upload your product feed including product variations and the item_group_id. Disable it, if you choose only to upload the parent product for variable products."
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: classes/admin/class-admin.php:
|
737 |
msgid "Retail"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: classes/admin/class-admin.php:
|
741 |
msgid "Education"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: classes/admin/class-admin.php:
|
745 |
msgid "Hotels and rentals"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: classes/admin/class-admin.php:
|
749 |
msgid "Jobs"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: classes/admin/class-admin.php:
|
753 |
msgid "Local deals"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: classes/admin/class-admin.php:
|
757 |
msgid "Real estate"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: classes/admin/class-admin.php:
|
761 |
msgid "Custom"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: classes/admin/class-admin.php:
|
765 |
msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: classes/admin/class-admin.php:
|
769 |
msgid "post ID (default)"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: classes/admin/class-admin.php:
|
773 |
msgid "SKU"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: classes/admin/class-admin.php:
|
777 |
msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: classes/admin/class-admin.php:
|
781 |
msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: classes/admin/class-admin.php:
|
785 |
msgid "Choose a product identifier."
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: classes/admin/class-admin.php:
|
789 |
msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: classes/admin/class-admin.php:
|
793 |
msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: classes/admin/class-admin.php:
|
797 |
-
#: classes/admin/class-admin.php:
|
798 |
msgid "active"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: classes/admin/class-admin.php:
|
802 |
-
#: classes/admin/class-admin.php:
|
803 |
msgid "inactive"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: classes/admin/class-admin.php:
|
807 |
-
#: classes/admin/class-admin.php:
|
808 |
msgid "partially active"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: classes/admin/class-admin.php:
|
812 |
msgid "Pro Feature"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: classes/admin/class-admin.php:
|
816 |
msgid "You have entered an invalid Google Analytics Universal property ID."
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: classes/admin/class-admin.php:
|
820 |
msgid "You have entered an invalid Google Analytics 4 measurement ID."
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: classes/admin/class-admin.php:
|
824 |
msgid "You have entered an invalid Google Analytics 4 API key."
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: classes/admin/class-admin.php:
|
828 |
-
msgid "You have entered an invalid
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: classes/admin/class-admin.php:
|
832 |
msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: classes/admin/class-admin.php:
|
836 |
-
#: classes/admin/class-admin.php:
|
837 |
msgid "You have entered an invalid conversion label."
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: classes/admin/class-admin.php:
|
841 |
msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: classes/admin/class-admin.php:
|
845 |
msgid "You have entered an invalid Google Optimize container ID."
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: classes/admin/class-admin.php:
|
849 |
msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: classes/admin/class-admin.php:
|
853 |
msgid "You have entered an invalid Meta (Facebook) CAPI token."
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: classes/admin/class-admin.php:
|
857 |
msgid "You have entered an invalid Meta (Facebook) CAPI test_event_code."
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: classes/admin/class-admin.php:
|
861 |
msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: classes/admin/class-admin.php:
|
865 |
msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: classes/admin/class-admin.php:
|
869 |
msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: classes/admin/class-admin.php:
|
873 |
msgid "You have entered an invalid Snapchat pixel ID."
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: classes/admin/class-admin.php:
|
877 |
msgid "You have entered an invalid TikTok pixel ID."
|
878 |
msgstr ""
|
879 |
|
880 |
-
#: classes/admin/class-admin.php:
|
|
|
|
|
|
|
|
|
881 |
msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
|
882 |
msgstr ""
|
883 |
|
884 |
-
#: classes/admin/class-admin.php:
|
885 |
msgid "You have entered the Scroll Tracker thresholds in the wrong format. It must be a list of comma separated percentages, like this \"25,50,75,100\""
|
886 |
msgstr ""
|
887 |
|
888 |
-
#: classes/admin/class-admin.php:
|
889 |
msgid "You have entered an invalid conversion name. Special characters, quotes and single quotes are not allowed due to security reasons."
|
890 |
msgstr ""
|
891 |
|
892 |
#. translators: %d: the amount of purchase conversions that have been measured
|
893 |
-
#: classes/admin/class-ask-for-rating.php:
|
894 |
msgid "Hey, I noticed that you tracked more than %d purchase conversions with the Pixel Manager for WooCommerce plugin - that's awesome! Could you please do me a BIG favour and give it a 5-star rating on WordPress? It will help to spread the word and boost our motivation."
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: classes/admin/class-ask-for-rating.php:
|
898 |
msgid "Ok, you deserve it"
|
899 |
msgstr ""
|
900 |
|
901 |
-
#: classes/admin/class-ask-for-rating.php:
|
902 |
msgid "Nope, maybe later"
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: classes/admin/class-ask-for-rating.php:
|
906 |
msgid "I already did"
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: classes/admin/class-ask-for-rating.php:
|
910 |
#: classes/admin/class-notifications.php:113
|
911 |
#: classes/admin/class-notifications.php:162
|
912 |
msgid "If the dismiss button is not working, here's why >>"
|
@@ -977,14 +1004,14 @@ msgstr ""
|
|
977 |
msgid "Conversion pixels not fired yet"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: wgact.php:
|
981 |
msgid "Pixel Manager for WooCommerce error"
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: wgact.php:
|
985 |
msgid "Your environment doesn't meet all the system requirements listed below."
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: wgact.php:
|
989 |
msgid "The WooCommerce plugin needs to be activated"
|
990 |
msgstr ""
|
2 |
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Pixel Manager for WooCommerce 1.27.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-11-15T07:21:51+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.7.1\n"
|
15 |
"X-Domain: woocommerce-google-adwords-conversion-tracking-tag\n"
|
34 |
msgid "https://sweetcode.com"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: classes/admin/class-admin.php:77
|
38 |
msgid "GA4 Attribution"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: classes/admin/class-admin.php:334
|
42 |
+
#: classes/admin/class-admin.php:335
|
43 |
+
#: wgact.php:294
|
44 |
+
#: wgact.php:295
|
45 |
msgid "Pixel Manager"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: classes/admin/class-admin.php:375
|
49 |
msgid "Main"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: classes/admin/class-admin.php:396
|
53 |
msgid "Google"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: classes/admin/class-admin.php:419
|
57 |
msgid "Google Ads Conversion ID"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: classes/admin/class-admin.php:431
|
61 |
msgid "Google Ads Purchase Conversion Label"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: classes/admin/class-admin.php:442
|
65 |
msgid "Google Analytics UA"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: classes/admin/class-admin.php:453
|
69 |
msgid "Google Analytics 4"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: classes/admin/class-admin.php:464
|
73 |
msgid "Google Optimize"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: classes/admin/class-admin.php:476
|
77 |
msgid "Meta (Facebook)"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: classes/admin/class-admin.php:499
|
81 |
msgid "Meta (Facebook) pixel ID"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: classes/admin/class-admin.php:511
|
85 |
msgid "more pixels"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: classes/admin/class-admin.php:536
|
89 |
msgid "Microsoft Advertising UET tag ID"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: classes/admin/class-admin.php:548
|
93 |
msgid "Twitter pixel ID"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: classes/admin/class-admin.php:560
|
97 |
msgid "Pinterest pixel ID"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: classes/admin/class-admin.php:572
|
101 |
msgid "Pinterest Enhanced Match"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: classes/admin/class-admin.php:584
|
105 |
msgid "Snapchat pixel ID"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: classes/admin/class-admin.php:596
|
109 |
msgid "TikTok pixel ID"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: classes/admin/class-admin.php:609
|
113 |
msgid "Hotjar site ID"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: classes/admin/class-admin.php:621
|
117 |
msgid "Advanced"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: classes/admin/class-admin.php:673
|
121 |
msgid "Order Total Logic"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: classes/admin/class-admin.php:685
|
125 |
msgid "Order Duplication Prevention"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: classes/admin/class-admin.php:697
|
129 |
msgid "Maximum Compatibility Mode"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: classes/admin/class-admin.php:711
|
133 |
msgid "Disable Tracking for User Roles"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: classes/admin/class-admin.php:723
|
137 |
msgid "ACR"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: classes/admin/class-admin.php:736
|
141 |
msgid "Order List Info"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: classes/admin/class-admin.php:749
|
145 |
msgid "Scroll Tracker"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: classes/admin/class-admin.php:783
|
149 |
msgid "Conversion Cart Data"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: classes/admin/class-admin.php:796
|
153 |
msgid "Enhanced E-Commerce"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: classes/admin/class-admin.php:808
|
157 |
msgid "GA4 API secret"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: classes/admin/class-admin.php:820
|
161 |
msgid "GA4 Property ID"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: classes/admin/class-admin.php:832
|
165 |
msgid "GA4 Data API Credentials"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: classes/admin/class-admin.php:845
|
169 |
msgid "Enhanced Link Attribution"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: classes/admin/class-admin.php:858
|
173 |
msgid "Google User ID"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: classes/admin/class-admin.php:870
|
177 |
msgid "Google Ads Enhanced Conversions"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: classes/admin/class-admin.php:884
|
181 |
msgid "Google Ads Phone Conversion Number"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: classes/admin/class-admin.php:896
|
185 |
msgid "Google Ads Phone Conversion Label"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: classes/admin/class-admin.php:908
|
189 |
msgid "Google Ads Conversion Adjustments: Conversion Name"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: classes/admin/class-admin.php:920
|
193 |
msgid "Google Ads Conversion Adjustments: Feed"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: classes/admin/class-admin.php:933
|
197 |
msgid "Cookie Consent Management"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: classes/admin/class-admin.php:956
|
201 |
msgid "Google Consent Mode"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: classes/admin/class-admin.php:968
|
205 |
msgid "Google Consent Regions"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: classes/admin/class-admin.php:980
|
209 |
msgid "Explicit Consent Mode"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: classes/admin/class-admin.php:993
|
213 |
msgid "Borlabs Cookie Support"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: classes/admin/class-admin.php:1007
|
217 |
msgid "Cookiebot Support"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: classes/admin/class-admin.php:1021
|
221 |
msgid "Complianz GDPR Support"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: classes/admin/class-admin.php:1035
|
225 |
msgid "Cookie Notice Support"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: classes/admin/class-admin.php:1049
|
229 |
msgid "Cookie Script Support"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: classes/admin/class-admin.php:1063
|
233 |
msgid "GDPR Cookie Compliance Support"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: classes/admin/class-admin.php:1077
|
237 |
msgid "GDPR Cookie Consent Support"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: classes/admin/class-admin.php:1110
|
241 |
msgid "Meta (Facebook) CAPI: token"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: classes/admin/class-admin.php:1122
|
245 |
msgid "Meta (Facebook) CAPI: test event code"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: classes/admin/class-admin.php:1134
|
249 |
msgid "Meta (Facebook) CAPI: process anonymous hits"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: classes/admin/class-admin.php:1146
|
253 |
+
msgid "Meta (Facebook): Advanced Matching"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: classes/admin/class-admin.php:1162
|
257 |
msgid "Meta (Facebook) Microdata Tags for Catalogues"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: classes/admin/class-admin.php:1195
|
261 |
+
msgid "TikTok Events API: token"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: classes/admin/class-admin.php:1207
|
265 |
+
msgid "TikTok Events API: process anonymous hits"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: classes/admin/class-admin.php:1219
|
269 |
+
msgid "TikTok: Advanced Matching"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: classes/admin/class-admin.php:1231
|
273 |
+
#: classes/admin/class-admin.php:1244
|
274 |
+
#: classes/admin/class-admin.php:1255
|
275 |
msgid "Dynamic Remarketing"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: classes/admin/class-admin.php:1267
|
279 |
msgid "Product Identifier"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: classes/admin/class-admin.php:1279
|
283 |
msgid "Variations output"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: classes/admin/class-admin.php:1292
|
287 |
msgid "Google Business Vertical"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: classes/admin/class-admin.php:1305
|
291 |
+
#: classes/admin/class-admin.php:1314
|
292 |
msgid "Diagnostics"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: classes/admin/class-admin.php:1322
|
296 |
+
#: classes/admin/class-admin.php:1331
|
297 |
msgid "Support"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: classes/admin/class-admin.php:1339
|
301 |
+
#: classes/admin/class-admin.php:1349
|
302 |
msgid "Author"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: classes/admin/class-admin.php:1396
|
306 |
msgid ""
|
307 |
"It looks like you are using some sort of ad or script blocker which is blocking the script and CSS files of this plugin.\n"
|
308 |
" In order for the plugin to work properly you need to disable the script blocker."
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: classes/admin/class-admin.php:1403
|
312 |
#: classes/admin/class-notifications.php:96
|
313 |
#: classes/admin/class-notifications.php:146
|
314 |
msgid "Learn more"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: classes/admin/class-admin.php:1446
|
318 |
msgid "Profit Driven Marketing by SweetCode"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: classes/admin/class-admin.php:1453
|
322 |
msgid "Show Pro version settings"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: classes/admin/class-admin.php:1466
|
326 |
msgid "Enabling this will only show you the pro settings in the user interface. It won't actually enable the pro features. If you want to try out the pro features head over to sweetcode.com and sign up for a trial."
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: classes/admin/class-admin.php:1472
|
330 |
msgid "Visit us here:"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: classes/admin/class-admin.php:1518
|
334 |
msgid "Payment Gateway Tracking Accuracy Report"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: classes/admin/class-admin.php:1519
|
338 |
+
#: classes/admin/class-admin.php:3342
|
339 |
+
#: classes/admin/class-admin.php:3350
|
340 |
msgid "beta"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: classes/admin/class-admin.php:1523
|
344 |
msgid "What's this? Follow this link to learn more"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: classes/admin/class-admin.php:1531
|
348 |
msgid "Available payment gateways"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: classes/admin/class-admin.php:1538
|
352 |
msgid "id"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: classes/admin/class-admin.php:1539
|
356 |
msgid "method_title"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: classes/admin/class-admin.php:1540
|
360 |
msgid "class"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: classes/admin/class-admin.php:1558
|
364 |
msgid "Purchase confirmation page reached per gateway (active and inactive)"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: classes/admin/class-admin.php:1566
|
368 |
+
#: classes/admin/class-admin.php:1615
|
369 |
+
#: classes/admin/class-admin.php:1690
|
370 |
msgid "The analysis is being generated. Please check back in 5 minutes."
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: classes/admin/class-admin.php:1607
|
374 |
msgid "Purchase confirmation page reached per gateway (only active), weighted by frequency"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: classes/admin/class-admin.php:1678
|
378 |
msgid "Automatic Conversion Recovery (ACR)"
|
379 |
msgstr ""
|
380 |
|
381 |
#. translators: The number and percentage of orders that were recovered by the Automatic Conversion Recovery (ACR).
|
382 |
+
#: classes/admin/class-admin.php:1766
|
383 |
msgid "ACR recovered %1$s (%2$s%%) out of %3$s missing conversions."
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: classes/admin/class-admin.php:1784
|
387 |
msgid "This feature is only available in the pro version of the plugin. Follow the link to learn more about it:"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: classes/admin/class-admin.php:1786
|
391 |
msgid "Get the pro version of the Pixel Manager for WooCommerce over here"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: classes/admin/class-admin.php:1788
|
395 |
msgid "Go Pro"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: classes/admin/class-admin.php:1817
|
399 |
msgid "Contacting Support"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: classes/admin/class-admin.php:1839
|
403 |
msgid "Debug Information"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: classes/admin/class-admin.php:1848
|
407 |
msgid "copy to clipboard"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: classes/admin/class-admin.php:1858
|
411 |
msgid "Export settings"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: classes/admin/class-admin.php:1870
|
415 |
msgid "Export to disk"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: classes/admin/class-admin.php:1879
|
419 |
msgid "Import settings"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: classes/admin/class-admin.php:1884
|
423 |
+
#: classes/admin/class-admin.php:2496
|
424 |
msgid "Settings imported successfully!"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: classes/admin/class-admin.php:1887
|
428 |
+
#: classes/admin/class-admin.php:2499
|
429 |
msgid "Reloading...(in 5 seconds)!"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: classes/admin/class-admin.php:1893
|
433 |
+
#: classes/admin/class-admin.php:2505
|
434 |
msgid "There was an error importing that file! Please try again."
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: classes/admin/class-admin.php:1910
|
438 |
msgid "Translations"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: classes/admin/class-admin.php:1911
|
442 |
msgid "If you want to participate improving the translations of this plugin into your language, please follow this link:"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: classes/admin/class-admin.php:1929
|
446 |
msgid "Post a support request in the WordPress support forum here: "
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: classes/admin/class-admin.php:1932
|
450 |
msgid "Support forum"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: classes/admin/class-admin.php:1936
|
454 |
msgid "(Never post the debug or other sensitive information to the support forum. Instead send us the information by email.)"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: classes/admin/class-admin.php:1939
|
458 |
msgid "Or send us an email to the following address: "
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: classes/admin/class-admin.php:1955
|
462 |
msgid "Send us your support request through the WooCommerce.com dashboard: "
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: classes/admin/class-admin.php:1969
|
466 |
msgid "More details about the developer of this plugin: "
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: classes/admin/class-admin.php:1972
|
470 |
msgid "Developer: SweetCode"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: classes/admin/class-admin.php:1974
|
474 |
msgid "Website: "
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: classes/admin/class-admin.php:1997
|
478 |
msgid "The Google Analytics Universal property ID looks like this:"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: classes/admin/class-admin.php:2013
|
482 |
msgid "The Google Analytics 4 measurement ID looks like this:"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: classes/admin/class-admin.php:2029
|
486 |
msgid "The conversion ID looks similar to this:"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: classes/admin/class-admin.php:2045
|
490 |
msgid "The purchase conversion label looks similar to this:"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: classes/admin/class-admin.php:2049
|
494 |
+
#: classes/admin/class-admin.php:3164
|
495 |
msgid "Requires an active Google Ads Conversion ID"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: classes/admin/class-admin.php:2067
|
499 |
msgid "The Google Optimize container ID looks like this:"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: classes/admin/class-admin.php:2069
|
503 |
+
#: classes/admin/class-admin.php:2264
|
504 |
msgid "or"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: classes/admin/class-admin.php:2085
|
508 |
msgid "The Meta (Facebook) pixel ID looks similar to this:"
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: classes/admin/class-admin.php:2103
|
512 |
msgid "The Microsoft Advertising UET tag ID looks similar to this:"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: classes/admin/class-admin.php:2122
|
516 |
msgid "The Twitter pixel ID looks similar to this:"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: classes/admin/class-admin.php:2141
|
520 |
msgid "The Pinterest pixel ID looks similar to this:"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: classes/admin/class-admin.php:2157
|
524 |
msgid "Enable Pinterest enhanced match"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: classes/admin/class-admin.php:2183
|
528 |
msgid "The Snapchat pixel ID looks similar to this:"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: classes/admin/class-admin.php:2204
|
532 |
msgid "The TikTok pixel ID looks similar to this:"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: classes/admin/class-admin.php:2216
|
536 |
msgid "The Hotjar site ID looks similar to this:"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: classes/admin/class-admin.php:2226
|
540 |
msgid "Order Subtotal: Doesn't include tax and shipping (default)"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: classes/admin/class-admin.php:2234
|
544 |
msgid "Order Total: Includes tax and shipping"
|
545 |
msgstr ""
|
546 |
|
547 |
+
#: classes/admin/class-admin.php:2248
|
548 |
msgid "Profit Margin: Only reports the profit margin. Excludes tax, shipping, and where possible, gateway fees."
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: classes/admin/class-admin.php:2256
|
552 |
msgid "This is the order total amount reported back to the paid ads pixels (such as Google Ads, Facebook, etc.)"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: classes/admin/class-admin.php:2261
|
556 |
msgid "To use the Profit Margin setting you will need to install one of the following two Cost of Goods plugins:"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: classes/admin/class-admin.php:2288
|
560 |
+
#: classes/admin/class-admin.php:2298
|
561 |
msgid "open the documentation"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: classes/admin/class-admin.php:2318
|
565 |
msgid "Enable Google consent mode with standard settings"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: classes/admin/class-admin.php:2356
|
569 |
msgid "If no region is set, then the restrictions are enabled for all regions. If you specify one or more regions, then the restrictions only apply for the specified regions."
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: classes/admin/class-admin.php:2364
|
573 |
msgid "Google Analytics Enhanced E-Commerce is "
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: classes/admin/class-admin.php:2387
|
577 |
msgid "Google Analytics 4 activation required"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: classes/admin/class-admin.php:2390
|
581 |
msgid "If enabled, purchase and refund events will be sent to Google through the measurement protocol for increased accuracy."
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: classes/admin/class-admin.php:2440
|
585 |
+
#: classes/admin/class-admin.php:2695
|
586 |
msgid "Copied feed URL to clipboard"
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: classes/admin/class-admin.php:2445
|
590 |
+
#: classes/admin/class-admin.php:2453
|
591 |
+
#: classes/admin/class-admin.php:2700
|
592 |
+
#: classes/admin/class-admin.php:2707
|
593 |
msgid "Copy to clipboard"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: classes/admin/class-admin.php:2467
|
597 |
msgid "Import credentials"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: classes/admin/class-admin.php:2478
|
601 |
msgid "Delete credentials"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: classes/admin/class-admin.php:2489
|
605 |
msgid "The GA4 property ID must be set."
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: classes/admin/class-admin.php:2525
|
609 |
msgid "Enable Google Analytics enhanced link attribution"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: classes/admin/class-admin.php:2541
|
613 |
+
#: classes/admin/class-admin.php:2571
|
614 |
msgid "You need to activate at least Google Analytics UA or Google Analytics 4"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: classes/admin/class-admin.php:2560
|
618 |
msgid "Enable Google user ID"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: classes/admin/class-admin.php:2590
|
622 |
msgid "Enable Google Ads Enhanced Conversions"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: classes/admin/class-admin.php:2601
|
626 |
msgid "You need to activate Google Ads"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: classes/admin/class-admin.php:2621
|
630 |
msgid "The Google Ads phone conversion number must be in the same format as on the website."
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: classes/admin/class-admin.php:2657
|
634 |
msgid "The conversion name must match the conversion name in Google Ads exactly."
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: classes/admin/class-admin.php:2665
|
638 |
msgid "Requires an active Google Ads Conversion ID and Conversion Label."
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: classes/admin/class-admin.php:2715
|
642 |
msgid "The Conversion Name must be set."
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: classes/admin/class-admin.php:2723
|
646 |
msgid "Borlabs Cookie detected. Automatic support is:"
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: classes/admin/class-admin.php:2729
|
650 |
msgid "Cookiebot detected. Automatic support is:"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: classes/admin/class-admin.php:2735
|
654 |
msgid "Complianz GDPR detected. Automatic support is:"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: classes/admin/class-admin.php:2741
|
658 |
msgid "Cookie Notice (by hu-manity.co) detected. Automatic support is:"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: classes/admin/class-admin.php:2747
|
662 |
msgid "Cookie Script (by cookie-script.com) detected. Automatic support is:"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: classes/admin/class-admin.php:2753
|
666 |
msgid "GDPR Cookie Compliance (by Moove Agency) detected. Automatic support is:"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: classes/admin/class-admin.php:2759
|
670 |
msgid "GDPR Cookie Consent (by WebToffee) detected. Automatic support is:"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: classes/admin/class-admin.php:2778
|
674 |
msgid "Enable Explicit Consent Mode"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: classes/admin/class-admin.php:2787
|
678 |
msgid "Only activate the Explicit Consent Mode if you are also using a Cookie Management Platform (a cookie banner) that is compatible with this plugin. Find a list of compatible plugins in the documentation."
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: classes/admin/class-admin.php:2806
|
682 |
+
#: classes/admin/class-admin.php:2859
|
683 |
+
#: classes/admin/class-admin.php:2888
|
684 |
+
#: classes/admin/class-admin.php:2916
|
685 |
msgid "You need to activate the Meta (Facebook) pixel"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: classes/admin/class-admin.php:2830
|
689 |
msgid "The test event code automatically rotates frequently within Facebook. If you don't see the server events flowing in, first make sure that you've set the latest test event code."
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: classes/admin/class-admin.php:2850
|
693 |
msgid "Send CAPI hits for anonymous visitors who likely have blocked the Meta (Facebook) pixel."
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: classes/admin/class-admin.php:2879
|
697 |
+
#: classes/admin/class-admin.php:2988
|
698 |
+
msgid "Send events with additional visitor identifiers, such as email and phone number, if available."
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: classes/admin/class-admin.php:2907
|
702 |
msgid "Enable Meta (Facebook) product microdata output"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: classes/admin/class-admin.php:2936
|
706 |
+
#: classes/admin/class-admin.php:2968
|
707 |
+
#: classes/admin/class-admin.php:2997
|
708 |
+
msgid "You need to activate the TikTok pixel"
|
709 |
+
msgstr ""
|
710 |
+
|
711 |
+
#: classes/admin/class-admin.php:2959
|
712 |
+
msgid "Send Events API hits for anonymous visitors who likely have blocked the TikTok pixel."
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: classes/admin/class-admin.php:3024
|
716 |
msgid "Only disable order duplication prevention for testing. Remember to re-enable the setting once done."
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: classes/admin/class-admin.php:3041
|
720 |
msgid "Enable the maximum compatibility mode"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: classes/admin/class-admin.php:3076
|
724 |
msgid "Automatic Conversion Recovery (ACR) is "
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: classes/admin/class-admin.php:3094
|
728 |
msgid "Display PMW related information on the order list page"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: classes/admin/class-admin.php:3116
|
732 |
msgid "The Scroll Tracker thresholds. A comma separated list of scroll tracking thresholds in percent where the scroll tracker triggers its events."
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: classes/admin/class-admin.php:3123
|
736 |
msgid "Advanced order duplication prevention is "
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: classes/admin/class-admin.php:3125
|
740 |
msgid "Basic order duplication prevention is "
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: classes/admin/class-admin.php:3149
|
744 |
msgid "Enable dynamic remarketing audience collection"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: classes/admin/class-admin.php:3170
|
748 |
msgid "You need to choose the correct product identifier setting in order to match the product identifiers in the product feeds."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: classes/admin/class-admin.php:3188
|
752 |
msgid "Enable variations output"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: classes/admin/class-admin.php:3199
|
756 |
msgid "In order for this to work you need to upload your product feed including product variations and the item_group_id. Disable it, if you choose only to upload the parent product for variable products."
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: classes/admin/class-admin.php:3214
|
760 |
msgid "Retail"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: classes/admin/class-admin.php:3224
|
764 |
msgid "Education"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: classes/admin/class-admin.php:3234
|
768 |
msgid "Hotels and rentals"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: classes/admin/class-admin.php:3244
|
772 |
msgid "Jobs"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: classes/admin/class-admin.php:3254
|
776 |
msgid "Local deals"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: classes/admin/class-admin.php:3264
|
780 |
msgid "Real estate"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: classes/admin/class-admin.php:3274
|
784 |
msgid "Custom"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: classes/admin/class-admin.php:3293
|
788 |
msgid "ID of your Google Merchant Center account. It looks like this: 12345678"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: classes/admin/class-admin.php:3302
|
792 |
msgid "post ID (default)"
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: classes/admin/class-admin.php:3308
|
796 |
msgid "SKU"
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: classes/admin/class-admin.php:3315
|
800 |
msgid "ID for the WooCommerce Google Product Feed. Outputs the post ID with woocommerce_gpf_ prefix *"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: classes/admin/class-admin.php:3322
|
804 |
msgid "ID for the WooCommerce Google Listings & Ads Plugin. Outputs the post ID with gla_ prefix **"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: classes/admin/class-admin.php:3326
|
808 |
msgid "Choose a product identifier."
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: classes/admin/class-admin.php:3329
|
812 |
msgid "* This is for users of the WooCommerce Google Product Feed Plugin"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: classes/admin/class-admin.php:3333
|
816 |
msgid "** This is for users of the WooCommerce Google Listings & Ads Plugin"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: classes/admin/class-admin.php:3356
|
820 |
+
#: classes/admin/class-admin.php:3361
|
821 |
msgid "active"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: classes/admin/class-admin.php:3366
|
825 |
+
#: classes/admin/class-admin.php:3371
|
826 |
msgid "inactive"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: classes/admin/class-admin.php:3376
|
830 |
+
#: classes/admin/class-admin.php:3381
|
831 |
msgid "partially active"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: classes/admin/class-admin.php:3392
|
835 |
msgid "Pro Feature"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: classes/admin/class-admin.php:3424
|
839 |
msgid "You have entered an invalid Google Analytics Universal property ID."
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: classes/admin/class-admin.php:3432
|
843 |
msgid "You have entered an invalid Google Analytics 4 measurement ID."
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: classes/admin/class-admin.php:3440
|
847 |
msgid "You have entered an invalid Google Analytics 4 API key."
|
848 |
msgstr ""
|
849 |
|
850 |
+
#: classes/admin/class-admin.php:3448
|
851 |
+
msgid "You have entered an invalid GA4 property ID."
|
852 |
msgstr ""
|
853 |
|
854 |
+
#: classes/admin/class-admin.php:3456
|
855 |
msgid "You have entered an invalid conversion ID. It only contains 8 to 10 digits."
|
856 |
msgstr ""
|
857 |
|
858 |
+
#: classes/admin/class-admin.php:3464
|
859 |
+
#: classes/admin/class-admin.php:3472
|
860 |
msgid "You have entered an invalid conversion label."
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: classes/admin/class-admin.php:3480
|
864 |
msgid "You have entered an invalid merchant ID. It only contains 6 to 12 digits."
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: classes/admin/class-admin.php:3488
|
868 |
msgid "You have entered an invalid Google Optimize container ID."
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: classes/admin/class-admin.php:3496
|
872 |
msgid "You have entered an invalid Meta (Facebook) pixel ID. It only contains 14 to 16 digits."
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: classes/admin/class-admin.php:3504
|
876 |
msgid "You have entered an invalid Meta (Facebook) CAPI token."
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: classes/admin/class-admin.php:3512
|
880 |
msgid "You have entered an invalid Meta (Facebook) CAPI test_event_code."
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: classes/admin/class-admin.php:3520
|
884 |
msgid "You have entered an invalid Bing Ads UET tag ID. It only contains 7 to 9 digits."
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: classes/admin/class-admin.php:3528
|
888 |
msgid "You have entered an invalid Twitter pixel ID. It only contains 5 to 7 lowercase letters and numbers."
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: classes/admin/class-admin.php:3536
|
892 |
msgid "You have entered an invalid Pinterest pixel ID. It only contains 13 digits."
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: classes/admin/class-admin.php:3544
|
896 |
msgid "You have entered an invalid Snapchat pixel ID."
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: classes/admin/class-admin.php:3552
|
900 |
msgid "You have entered an invalid TikTok pixel ID."
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: classes/admin/class-admin.php:3560
|
904 |
+
msgid "You have entered an invalid TikTok Events API access token."
|
905 |
+
msgstr ""
|
906 |
+
|
907 |
+
#: classes/admin/class-admin.php:3568
|
908 |
msgid "You have entered an invalid Hotjar site ID. It only contains 6 to 9 digits."
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: classes/admin/class-admin.php:3594
|
912 |
msgid "You have entered the Scroll Tracker thresholds in the wrong format. It must be a list of comma separated percentages, like this \"25,50,75,100\""
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: classes/admin/class-admin.php:3613
|
916 |
msgid "You have entered an invalid conversion name. Special characters, quotes and single quotes are not allowed due to security reasons."
|
917 |
msgstr ""
|
918 |
|
919 |
#. translators: %d: the amount of purchase conversions that have been measured
|
920 |
+
#: classes/admin/class-ask-for-rating.php:156
|
921 |
msgid "Hey, I noticed that you tracked more than %d purchase conversions with the Pixel Manager for WooCommerce plugin - that's awesome! Could you please do me a BIG favour and give it a 5-star rating on WordPress? It will help to spread the word and boost our motivation."
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: classes/admin/class-ask-for-rating.php:173
|
925 |
msgid "Ok, you deserve it"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: classes/admin/class-ask-for-rating.php:178
|
929 |
msgid "Nope, maybe later"
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: classes/admin/class-ask-for-rating.php:187
|
933 |
msgid "I already did"
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: classes/admin/class-ask-for-rating.php:193
|
937 |
#: classes/admin/class-notifications.php:113
|
938 |
#: classes/admin/class-notifications.php:162
|
939 |
msgid "If the dismiss button is not working, here's why >>"
|
1004 |
msgid "Conversion pixels not fired yet"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: wgact.php:310
|
1008 |
msgid "Pixel Manager for WooCommerce error"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: wgact.php:312
|
1012 |
msgid "Your environment doesn't meet all the system requirements listed below."
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: wgact.php:316
|
1016 |
msgid "The WooCommerce plugin needs to be activated"
|
1017 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, google analytics, google ads, facebook, conversion tracking,
|
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 6.1
|
6 |
Requires PHP: 7.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -26,7 +26,7 @@ The Pixel Managers advanced architecture has numerous advantages:
|
|
26 |
- Automatic Conversion Recovery (ACR) feature allows you to recover lost conversions due to redirect issues.
|
27 |
- Its transpiled and optimized JavaScript library ensures compatibility with more than 98% of all browsers that visit your website.
|
28 |
|
29 |
-
While the setup is as simple as it can get, the pixel engine under the hood is very powerful. It tracks all e-commerce events and implements all advanced pixel features like Meta CAPI (Facebook CAPI) (Pro version), Google Analytics Enhanced E-Commerce, Google Shopping Cart Item Tracking, and much more. For advanced users, the plugin offers filters that allow them to tweak the output flexibly and fine-tune the behavior for each shop.
|
30 |
|
31 |
<strong>What makes the Pixel Manager unique?</strong>
|
32 |
|
@@ -99,6 +99,7 @@ Have a look at the full feature list over [here](https://sweetcode.com/docs/wpm/
|
|
99 |
* Pinterest Ads Pixel with Purchase and all Remarketing Events
|
100 |
* Snapchat Ads Pixel with Purchase and all Remarketing Events
|
101 |
* TikTok Ads Pixel with Purchase and all Remarketing Events
|
|
|
102 |
* Advanced Order Duplication Prevention
|
103 |
* Scroll Tracking
|
104 |
|
@@ -220,6 +221,20 @@ You can send the link to the front page of your shop too if you think it would b
|
|
220 |
|
221 |
== Changelog ==
|
222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
= 1.26.0 = 07.11.2022
|
224 |
|
225 |
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 6.1
|
6 |
Requires PHP: 7.3
|
7 |
+
Stable tag: 1.27.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
26 |
- Automatic Conversion Recovery (ACR) feature allows you to recover lost conversions due to redirect issues.
|
27 |
- Its transpiled and optimized JavaScript library ensures compatibility with more than 98% of all browsers that visit your website.
|
28 |
|
29 |
+
While the setup is as simple as it can get, the pixel engine under the hood is very powerful. It tracks all e-commerce events and implements all advanced pixel features like Meta CAPI (Facebook CAPI) (Pro version), Google Analytics Enhanced E-Commerce, Google Shopping Cart Item Tracking, TikTok Events API (Pro version), and much more. For advanced users, the plugin offers filters that allow them to tweak the output flexibly and fine-tune the behavior for each shop.
|
30 |
|
31 |
<strong>What makes the Pixel Manager unique?</strong>
|
32 |
|
99 |
* Pinterest Ads Pixel with Purchase and all Remarketing Events
|
100 |
* Snapchat Ads Pixel with Purchase and all Remarketing Events
|
101 |
* TikTok Ads Pixel with Purchase and all Remarketing Events
|
102 |
+
* TikTok Events API
|
103 |
* Advanced Order Duplication Prevention
|
104 |
* Scroll Tracking
|
105 |
|
221 |
|
222 |
== Changelog ==
|
223 |
|
224 |
+
= 1.27.0 = 15.11.2022
|
225 |
+
|
226 |
+
|
227 |
+
|
228 |
+
* Tweak: Added current_user_can checks for a few functions.
|
229 |
+
* Tweak: Added a safeguard in case too many products are requested from the server.
|
230 |
+
* Tweak: Added filter to disable the Facebook pixel in the Facebook for WooCommerce plugin, if Facebook tracking is enabled in the Pixel Manager.
|
231 |
+
* Tweak: Switched back to the previous method to attach most of the events to DOM elements, as the old method looks like to be compatible with more themes.
|
232 |
+
* Tweak: Added filter to exclude domains from tracking.
|
233 |
+
* Tweak: Updated third party libraries.
|
234 |
+
* Tweak: Include PMW version it filename of settings export file.
|
235 |
+
* Fix: Fixed an edge case where get_pmw_tracked_payment_methods would throw an error if no orders were found.
|
236 |
+
* Fix: Fixed generation of precompressed admin .js files.
|
237 |
+
|
238 |
= 1.26.0 = 07.11.2022
|
239 |
|
240 |
|
vendor/autoload.php
CHANGED
@@ -3,8 +3,21 @@
|
|
3 |
// autoload.php @generated by Composer
|
4 |
|
5 |
if (PHP_VERSION_ID < 50600) {
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
}
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
3 |
// autoload.php @generated by Composer
|
4 |
|
5 |
if (PHP_VERSION_ID < 50600) {
|
6 |
+
if (!headers_sent()) {
|
7 |
+
header('HTTP/1.1 500 Internal Server Error');
|
8 |
+
}
|
9 |
+
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
10 |
+
if (!ini_get('display_errors')) {
|
11 |
+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
12 |
+
fwrite(STDERR, $err);
|
13 |
+
} elseif (!headers_sent()) {
|
14 |
+
echo $err;
|
15 |
+
}
|
16 |
+
}
|
17 |
+
trigger_error(
|
18 |
+
$err,
|
19 |
+
E_USER_ERROR
|
20 |
+
);
|
21 |
}
|
22 |
|
23 |
require_once __DIR__ . '/composer/autoload_real.php';
|
vendor/composer/installed.json
CHANGED
@@ -2,23 +2,23 @@
|
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "freemius/wordpress-sdk",
|
5 |
-
"version": "2.
|
6 |
-
"version_normalized": "2.
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/Freemius/wordpress-sdk.git",
|
10 |
-
"reference": "
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
-
"url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/
|
15 |
-
"reference": "
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require": {
|
19 |
"php": ">=5.2"
|
20 |
},
|
21 |
-
"time": "2022-
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"notification-url": "https://packagist.org/downloads/",
|
@@ -38,23 +38,23 @@
|
|
38 |
],
|
39 |
"support": {
|
40 |
"issues": "https://github.com/Freemius/wordpress-sdk/issues",
|
41 |
-
"source": "https://github.com/Freemius/wordpress-sdk/tree/2.
|
42 |
},
|
43 |
"install-path": "../freemius/wordpress-sdk"
|
44 |
},
|
45 |
{
|
46 |
"name": "giggsey/libphonenumber-for-php",
|
47 |
-
"version": "8.
|
48 |
-
"version_normalized": "8.
|
49 |
"source": {
|
50 |
"type": "git",
|
51 |
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
|
52 |
-
"reference": "
|
53 |
},
|
54 |
"dist": {
|
55 |
"type": "zip",
|
56 |
-
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/
|
57 |
-
"reference": "
|
58 |
"shasum": ""
|
59 |
},
|
60 |
"require": {
|
@@ -71,7 +71,7 @@
|
|
71 |
"symfony/console": "^2.8|^3.0|^v4.4|^v5.2",
|
72 |
"symfony/phpunit-bridge": "^4.2 || ^5"
|
73 |
},
|
74 |
-
"time": "2022-
|
75 |
"type": "library",
|
76 |
"extra": {
|
77 |
"branch-alias": {
|
@@ -112,7 +112,6 @@
|
|
112 |
"validation"
|
113 |
],
|
114 |
"support": {
|
115 |
-
"irc": "irc://irc.appliedirc.com/lobby",
|
116 |
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
|
117 |
"source": "https://github.com/giggsey/libphonenumber-for-php"
|
118 |
},
|
@@ -120,17 +119,17 @@
|
|
120 |
},
|
121 |
{
|
122 |
"name": "giggsey/locale",
|
123 |
-
"version": "2.
|
124 |
-
"version_normalized": "2.
|
125 |
"source": {
|
126 |
"type": "git",
|
127 |
"url": "https://github.com/giggsey/Locale.git",
|
128 |
-
"reference": "
|
129 |
},
|
130 |
"dist": {
|
131 |
"type": "zip",
|
132 |
-
"url": "https://api.github.com/repos/giggsey/Locale/zipball/
|
133 |
-
"reference": "
|
134 |
"shasum": ""
|
135 |
},
|
136 |
"require": {
|
@@ -144,12 +143,12 @@
|
|
144 |
"phing/phing": "^2.7",
|
145 |
"php-coveralls/php-coveralls": "^2.0",
|
146 |
"phpunit/phpunit": "^8.5|^9.5",
|
147 |
-
"symfony/console": "^5.0",
|
148 |
-
"symfony/filesystem": "^5.0",
|
149 |
-
"symfony/finder": "^5.0",
|
150 |
-
"symfony/process": "^5.0"
|
151 |
},
|
152 |
-
"time": "2022-
|
153 |
"type": "library",
|
154 |
"installation-source": "dist",
|
155 |
"autoload": {
|
@@ -171,7 +170,7 @@
|
|
171 |
"description": "Locale functions required by libphonenumber-for-php",
|
172 |
"support": {
|
173 |
"issues": "https://github.com/giggsey/Locale/issues",
|
174 |
-
"source": "https://github.com/giggsey/Locale/tree/2.
|
175 |
},
|
176 |
"install-path": "../giggsey/locale"
|
177 |
},
|
@@ -204,17 +203,17 @@
|
|
204 |
},
|
205 |
{
|
206 |
"name": "symfony/polyfill-iconv",
|
207 |
-
"version": "v1.
|
208 |
-
"version_normalized": "1.
|
209 |
"source": {
|
210 |
"type": "git",
|
211 |
"url": "https://github.com/symfony/polyfill-iconv.git",
|
212 |
-
"reference": "
|
213 |
},
|
214 |
"dist": {
|
215 |
"type": "zip",
|
216 |
-
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/
|
217 |
-
"reference": "
|
218 |
"shasum": ""
|
219 |
},
|
220 |
"require": {
|
@@ -226,11 +225,11 @@
|
|
226 |
"suggest": {
|
227 |
"ext-iconv": "For best performance"
|
228 |
},
|
229 |
-
"time": "2022-
|
230 |
"type": "library",
|
231 |
"extra": {
|
232 |
"branch-alias": {
|
233 |
-
"dev-main": "1.
|
234 |
},
|
235 |
"thanks": {
|
236 |
"name": "symfony/polyfill",
|
@@ -270,7 +269,7 @@
|
|
270 |
"shim"
|
271 |
],
|
272 |
"support": {
|
273 |
-
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.
|
274 |
},
|
275 |
"funding": [
|
276 |
{
|
@@ -373,17 +372,17 @@
|
|
373 |
},
|
374 |
{
|
375 |
"name": "woocommerce/action-scheduler",
|
376 |
-
"version": "3.5.
|
377 |
-
"version_normalized": "3.5.
|
378 |
"source": {
|
379 |
"type": "git",
|
380 |
"url": "https://github.com/woocommerce/action-scheduler.git",
|
381 |
-
"reference": "
|
382 |
},
|
383 |
"dist": {
|
384 |
"type": "zip",
|
385 |
-
"url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/
|
386 |
-
"reference": "
|
387 |
"shasum": ""
|
388 |
},
|
389 |
"require-dev": {
|
@@ -392,7 +391,7 @@
|
|
392 |
"wp-cli/wp-cli": "~2.5.0",
|
393 |
"yoast/phpunit-polyfills": "^1.0"
|
394 |
},
|
395 |
-
"time": "2022-
|
396 |
"type": "wordpress-plugin",
|
397 |
"extra": {
|
398 |
"scripts-description": {
|
@@ -410,7 +409,7 @@
|
|
410 |
"homepage": "https://actionscheduler.org/",
|
411 |
"support": {
|
412 |
"issues": "https://github.com/woocommerce/action-scheduler/issues",
|
413 |
-
"source": "https://github.com/woocommerce/action-scheduler/tree/3.5.
|
414 |
},
|
415 |
"install-path": "../woocommerce/action-scheduler"
|
416 |
}
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "freemius/wordpress-sdk",
|
5 |
+
"version": "2.5.2",
|
6 |
+
"version_normalized": "2.5.2.0",
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/Freemius/wordpress-sdk.git",
|
10 |
+
"reference": "35782eb9f19eefc63723afb3196c768bca6dfbd9"
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
+
"url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/35782eb9f19eefc63723afb3196c768bca6dfbd9",
|
15 |
+
"reference": "35782eb9f19eefc63723afb3196c768bca6dfbd9",
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require": {
|
19 |
"php": ">=5.2"
|
20 |
},
|
21 |
+
"time": "2022-11-14T06:49:45+00:00",
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"notification-url": "https://packagist.org/downloads/",
|
38 |
],
|
39 |
"support": {
|
40 |
"issues": "https://github.com/Freemius/wordpress-sdk/issues",
|
41 |
+
"source": "https://github.com/Freemius/wordpress-sdk/tree/2.5.2"
|
42 |
},
|
43 |
"install-path": "../freemius/wordpress-sdk"
|
44 |
},
|
45 |
{
|
46 |
"name": "giggsey/libphonenumber-for-php",
|
47 |
+
"version": "8.13.0",
|
48 |
+
"version_normalized": "8.13.0.0",
|
49 |
"source": {
|
50 |
"type": "git",
|
51 |
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
|
52 |
+
"reference": "eb1cea72dc8d020e149062371a2c6717457cf561"
|
53 |
},
|
54 |
"dist": {
|
55 |
"type": "zip",
|
56 |
+
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/eb1cea72dc8d020e149062371a2c6717457cf561",
|
57 |
+
"reference": "eb1cea72dc8d020e149062371a2c6717457cf561",
|
58 |
"shasum": ""
|
59 |
},
|
60 |
"require": {
|
71 |
"symfony/console": "^2.8|^3.0|^v4.4|^v5.2",
|
72 |
"symfony/phpunit-bridge": "^4.2 || ^5"
|
73 |
},
|
74 |
+
"time": "2022-11-07T12:16:34+00:00",
|
75 |
"type": "library",
|
76 |
"extra": {
|
77 |
"branch-alias": {
|
112 |
"validation"
|
113 |
],
|
114 |
"support": {
|
|
|
115 |
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
|
116 |
"source": "https://github.com/giggsey/libphonenumber-for-php"
|
117 |
},
|
119 |
},
|
120 |
{
|
121 |
"name": "giggsey/locale",
|
122 |
+
"version": "2.3",
|
123 |
+
"version_normalized": "2.3.0.0",
|
124 |
"source": {
|
125 |
"type": "git",
|
126 |
"url": "https://github.com/giggsey/Locale.git",
|
127 |
+
"reference": "5f035523740be40d40ac768a123c9bcc1ae12f56"
|
128 |
},
|
129 |
"dist": {
|
130 |
"type": "zip",
|
131 |
+
"url": "https://api.github.com/repos/giggsey/Locale/zipball/5f035523740be40d40ac768a123c9bcc1ae12f56",
|
132 |
+
"reference": "5f035523740be40d40ac768a123c9bcc1ae12f56",
|
133 |
"shasum": ""
|
134 |
},
|
135 |
"require": {
|
143 |
"phing/phing": "^2.7",
|
144 |
"php-coveralls/php-coveralls": "^2.0",
|
145 |
"phpunit/phpunit": "^8.5|^9.5",
|
146 |
+
"symfony/console": "^5.0|^6.0",
|
147 |
+
"symfony/filesystem": "^5.0|^6.0",
|
148 |
+
"symfony/finder": "^5.0|^6.0",
|
149 |
+
"symfony/process": "^5.0|^6.0"
|
150 |
},
|
151 |
+
"time": "2022-10-19T20:03:30+00:00",
|
152 |
"type": "library",
|
153 |
"installation-source": "dist",
|
154 |
"autoload": {
|
170 |
"description": "Locale functions required by libphonenumber-for-php",
|
171 |
"support": {
|
172 |
"issues": "https://github.com/giggsey/Locale/issues",
|
173 |
+
"source": "https://github.com/giggsey/Locale/tree/2.3"
|
174 |
},
|
175 |
"install-path": "../giggsey/locale"
|
176 |
},
|
203 |
},
|
204 |
{
|
205 |
"name": "symfony/polyfill-iconv",
|
206 |
+
"version": "v1.27.0",
|
207 |
+
"version_normalized": "1.27.0.0",
|
208 |
"source": {
|
209 |
"type": "git",
|
210 |
"url": "https://github.com/symfony/polyfill-iconv.git",
|
211 |
+
"reference": "927013f3aac555983a5059aada98e1907d842695"
|
212 |
},
|
213 |
"dist": {
|
214 |
"type": "zip",
|
215 |
+
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695",
|
216 |
+
"reference": "927013f3aac555983a5059aada98e1907d842695",
|
217 |
"shasum": ""
|
218 |
},
|
219 |
"require": {
|
225 |
"suggest": {
|
226 |
"ext-iconv": "For best performance"
|
227 |
},
|
228 |
+
"time": "2022-11-03T14:55:06+00:00",
|
229 |
"type": "library",
|
230 |
"extra": {
|
231 |
"branch-alias": {
|
232 |
+
"dev-main": "1.27-dev"
|
233 |
},
|
234 |
"thanks": {
|
235 |
"name": "symfony/polyfill",
|
269 |
"shim"
|
270 |
],
|
271 |
"support": {
|
272 |
+
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0"
|
273 |
},
|
274 |
"funding": [
|
275 |
{
|
372 |
},
|
373 |
{
|
374 |
"name": "woocommerce/action-scheduler",
|
375 |
+
"version": "3.5.3",
|
376 |
+
"version_normalized": "3.5.3.0",
|
377 |
"source": {
|
378 |
"type": "git",
|
379 |
"url": "https://github.com/woocommerce/action-scheduler.git",
|
380 |
+
"reference": "63ef5af013ca3a6efdd8ef8e9363ac70778713cb"
|
381 |
},
|
382 |
"dist": {
|
383 |
"type": "zip",
|
384 |
+
"url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/63ef5af013ca3a6efdd8ef8e9363ac70778713cb",
|
385 |
+
"reference": "63ef5af013ca3a6efdd8ef8e9363ac70778713cb",
|
386 |
"shasum": ""
|
387 |
},
|
388 |
"require-dev": {
|
391 |
"wp-cli/wp-cli": "~2.5.0",
|
392 |
"yoast/phpunit-polyfills": "^1.0"
|
393 |
},
|
394 |
+
"time": "2022-11-09T17:45:19+00:00",
|
395 |
"type": "wordpress-plugin",
|
396 |
"extra": {
|
397 |
"scripts-description": {
|
409 |
"homepage": "https://actionscheduler.org/",
|
410 |
"support": {
|
411 |
"issues": "https://github.com/woocommerce/action-scheduler/issues",
|
412 |
+
"source": "https://github.com/woocommerce/action-scheduler/tree/3.5.3"
|
413 |
},
|
414 |
"install-path": "../woocommerce/action-scheduler"
|
415 |
}
|
vendor/composer/installed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
'name' => 'sweetcode/pixel-manager-for-woocommerce',
|
4 |
'pretty_version' => 'dev-master',
|
5 |
'version' => 'dev-master',
|
6 |
-
'reference' => '
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
@@ -11,27 +11,27 @@
|
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'freemius/wordpress-sdk' => array(
|
14 |
-
'pretty_version' => '2.
|
15 |
-
'version' => '2.
|
16 |
-
'reference' => '
|
17 |
'type' => 'library',
|
18 |
'install_path' => __DIR__ . '/../freemius/wordpress-sdk',
|
19 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'giggsey/libphonenumber-for-php' => array(
|
23 |
-
'pretty_version' => '8.
|
24 |
-
'version' => '8.
|
25 |
-
'reference' => '
|
26 |
'type' => 'library',
|
27 |
'install_path' => __DIR__ . '/../giggsey/libphonenumber-for-php',
|
28 |
'aliases' => array(),
|
29 |
'dev_requirement' => false,
|
30 |
),
|
31 |
'giggsey/locale' => array(
|
32 |
-
'pretty_version' => '2.
|
33 |
-
'version' => '2.
|
34 |
-
'reference' => '
|
35 |
'type' => 'library',
|
36 |
'install_path' => __DIR__ . '/../giggsey/locale',
|
37 |
'aliases' => array(),
|
@@ -49,16 +49,16 @@
|
|
49 |
'sweetcode/pixel-manager-for-woocommerce' => array(
|
50 |
'pretty_version' => 'dev-master',
|
51 |
'version' => 'dev-master',
|
52 |
-
'reference' => '
|
53 |
'type' => 'wordpress-plugin',
|
54 |
'install_path' => __DIR__ . '/../../',
|
55 |
'aliases' => array(),
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'symfony/polyfill-iconv' => array(
|
59 |
-
'pretty_version' => 'v1.
|
60 |
-
'version' => '1.
|
61 |
-
'reference' => '
|
62 |
'type' => 'library',
|
63 |
'install_path' => __DIR__ . '/../symfony/polyfill-iconv',
|
64 |
'aliases' => array(),
|
@@ -74,9 +74,9 @@
|
|
74 |
'dev_requirement' => false,
|
75 |
),
|
76 |
'woocommerce/action-scheduler' => array(
|
77 |
-
'pretty_version' => '3.5.
|
78 |
-
'version' => '3.5.
|
79 |
-
'reference' => '
|
80 |
'type' => 'wordpress-plugin',
|
81 |
'install_path' => __DIR__ . '/../woocommerce/action-scheduler',
|
82 |
'aliases' => array(),
|
3 |
'name' => 'sweetcode/pixel-manager-for-woocommerce',
|
4 |
'pretty_version' => 'dev-master',
|
5 |
'version' => 'dev-master',
|
6 |
+
'reference' => '170b08bf949af4e7f9c152e2268bfb6d53ab633c',
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'freemius/wordpress-sdk' => array(
|
14 |
+
'pretty_version' => '2.5.2',
|
15 |
+
'version' => '2.5.2.0',
|
16 |
+
'reference' => '35782eb9f19eefc63723afb3196c768bca6dfbd9',
|
17 |
'type' => 'library',
|
18 |
'install_path' => __DIR__ . '/../freemius/wordpress-sdk',
|
19 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'giggsey/libphonenumber-for-php' => array(
|
23 |
+
'pretty_version' => '8.13.0',
|
24 |
+
'version' => '8.13.0.0',
|
25 |
+
'reference' => 'eb1cea72dc8d020e149062371a2c6717457cf561',
|
26 |
'type' => 'library',
|
27 |
'install_path' => __DIR__ . '/../giggsey/libphonenumber-for-php',
|
28 |
'aliases' => array(),
|
29 |
'dev_requirement' => false,
|
30 |
),
|
31 |
'giggsey/locale' => array(
|
32 |
+
'pretty_version' => '2.3',
|
33 |
+
'version' => '2.3.0.0',
|
34 |
+
'reference' => '5f035523740be40d40ac768a123c9bcc1ae12f56',
|
35 |
'type' => 'library',
|
36 |
'install_path' => __DIR__ . '/../giggsey/locale',
|
37 |
'aliases' => array(),
|
49 |
'sweetcode/pixel-manager-for-woocommerce' => array(
|
50 |
'pretty_version' => 'dev-master',
|
51 |
'version' => 'dev-master',
|
52 |
+
'reference' => '170b08bf949af4e7f9c152e2268bfb6d53ab633c',
|
53 |
'type' => 'wordpress-plugin',
|
54 |
'install_path' => __DIR__ . '/../../',
|
55 |
'aliases' => array(),
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'symfony/polyfill-iconv' => array(
|
59 |
+
'pretty_version' => 'v1.27.0',
|
60 |
+
'version' => '1.27.0.0',
|
61 |
+
'reference' => '927013f3aac555983a5059aada98e1907d842695',
|
62 |
'type' => 'library',
|
63 |
'install_path' => __DIR__ . '/../symfony/polyfill-iconv',
|
64 |
'aliases' => array(),
|
74 |
'dev_requirement' => false,
|
75 |
),
|
76 |
'woocommerce/action-scheduler' => array(
|
77 |
+
'pretty_version' => '3.5.3',
|
78 |
+
'version' => '3.5.3.0',
|
79 |
+
'reference' => '63ef5af013ca3a6efdd8ef8e9363ac70778713cb',
|
80 |
'type' => 'wordpress-plugin',
|
81 |
'install_path' => __DIR__ . '/../woocommerce/action-scheduler',
|
82 |
'aliases' => array(),
|
vendor/freemius/wordpress-sdk/assets/css/admin/account.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id=
|
1 |
+
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id=license_not_whitelabeled].success,.fs-notice[data-id=license_whitelabeled].success{color:inherit;border-left-color:#00a0d2}.fs-notice[data-id=license_not_whitelabeled].success label.fs-plugin-title,.fs-notice[data-id=license_whitelabeled].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #f1f1f1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type=text]{color:#0073aa;font-size:16px;background:none}.fs-key-value-table input[type=text]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:gray;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}@media screen and (max-width: 639px){#fs_account .fs-header-actions{position:static;padding:0 15px 12px 15px;margin:0 0 12px 0}#fs_account .fs-header-actions li{float:none;display:inline-block}#fs_account #fs_account_details{display:block}#fs_account #fs_account_details tbody,#fs_account #fs_account_details tr,#fs_account #fs_account_details td,#fs_account #fs_account_details th{display:block}#fs_account #fs_account_details tr td:first-child{text-align:left}#fs_account #fs_account_details tr td:nth-child(2){padding:0 12px}#fs_account #fs_account_details tr td:nth-child(2) code{margin:0;padding:0}#fs_account #fs_account_details tr td:nth-child(2) label{margin-left:0}#fs_account #fs_account_details tr td:nth-child(3){text-align:left}#fs_account #fs_account_details tr.fs-field-plan td:nth-child(2) .button-group{float:none;margin:12px 0}}
|
vendor/freemius/wordpress-sdk/assets/css/admin/add-ons.css
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
|
2 |
-
#TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
|
1 |
+
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,.3);box-shadow:0 2px 1px -1px rgba(0,0,0,.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,.15s;-o-transition:all,.15s;-ms-transition:all,.15s;-webkit-transition:all,.15s;transition:all,.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,.15s;-o-transition:all,.15s;-ms-transition:all,.15s;-webkit-transition:all,.15s;transition:all,.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:#adff2f;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.3);box-shadow:1px 1px 1px rgba(0,0,0,.3);text-transform:uppercase;font-size:.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}#TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:#adff2f;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid #006400;padding:2px;text-align:center;font-size:.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#f3f3f3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:#adff2f}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid #fff;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
|
|
vendor/freemius/wordpress-sdk/assets/css/admin/affiliation.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:"✓";margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
|
vendor/freemius/wordpress-sdk/assets/css/admin/clone-resolution.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.fs-notice[data-id^=clone_resolution_options_notice]{padding:0;color:inherit !important}.fs-notice[data-id^=clone_resolution_options_notice] .fs-notice-body{padding:0;margin-bottom:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-notice-header{padding:5px 10px}.fs-notice[data-id^=clone_resolution_options_notice] ol{margin-top:0;margin-bottom:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-options-container{display:flex;flex-direction:row;padding:0 10px 10px}@media(max-width: 750px){.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-options-container{flex-direction:column}}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option{border:1px solid #ccc;padding:10px 10px 15px 10px;flex:auto;margin:5px}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option:first-child{margin-left:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option:last-child{margin-right:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option strong{font-size:1.2em;padding:2px;line-height:1.5em}.fs-notice[data-id^=clone_resolution_options_notice] a{text-decoration:none}.fs-notice[data-id^=clone_resolution_options_notice] .button{margin-right:10px}.rtl .fs-notice[data-id^=clone_resolution_options_notice] .button{margin-right:0;margin-left:10px}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-documentation-container{padding:0 10px 15px}.fs-notice[data-id=temporary_duplicate_notice] #fs_clone_resolution_error_message{border:1px solid #d3135a;background:#fee;color:#d3135a;padding:10px}.fs-notice[data-id=temporary_duplicate_notice] ol{margin-top:0}
|
vendor/freemius/wordpress-sdk/assets/css/admin/common.css
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color
|
2 |
-
.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 1250px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
|
1 |
+
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,.3);box-shadow:0 2px 1px -1px rgba(0,0,0,.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,.1),inset 0 1px 3px 0 rgba(0,0,0,.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,.5);z-index:999;-moz-transition:.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}body.fs-loading,body.fs-loading *{cursor:wait !important}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media(max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,.3);box-shadow:0 2px 2px rgba(6,113,6,.3);opacity:.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 1250px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:"↳";padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:"↲"}.fs-submenu-item.pricing.upgrade-mode{color:#adff2f}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
|
|
vendor/freemius/wordpress-sdk/assets/css/admin/connect.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions>.fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li>i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li .fs-switch{float:right}#fs_connect .fs-permissions ul li .fs-permission-description{margin-left:55px}#fs_connect .fs-permissions ul li .fs-permission-description span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff !important;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li .fs-switch{float:left}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;text-align:center;font-size:0.9em;margin-top:10px}
|
1 |
+
.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .dashicons{float:none !important}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;position:absolute;background:rgba(0,0,0,.8);color:#fff !important;font-family:"arial",serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_connect{width:484px;margin:60px auto 20px auto}#fs_connect a{color:inherit}#fs_connect a:not(.button){text-decoration:underline}#fs_connect .fs-box-container{box-shadow:0 1px 2px rgba(0,0,0,.3);border-radius:3px;overflow:hidden;padding-top:40px;background:#f0f0f1}@media screen and (max-width: 483px){#fs_connect{width:auto;margin:30px 0 0 -10px}#fs_connect .fs-box-container{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}}#fs_connect .fs-content{background:#fff;padding:30px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content h2{line-height:1.5em}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-content{padding-bottom:10px}#fs_connect.require-license-key .fs-actions{border-top:none}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#fff;border-width:1px 0;border-style:solid;border-color:#f1f1f1}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:" ➜"}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:""}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#fff;-moz-transition:background .5s ease;-o-transition:background .5s ease;-ms-transition:background .5s ease;-webkit-transition:background .5s ease;transition:background .5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions>.fs-trigger{font-size:.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions>.fs-trigger .fs-arrow::after{content:"→";width:20px;display:inline-block}#fs_connect .fs-permissions.fs-open>.fs-trigger .fs-arrow::after{content:"↓" !important}#fs_connect .fs-permissions ul li{padding-left:0;padding-right:0}@media screen and (max-width: 483px){#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:inherit;text-decoration:underline}#fs_connect .fs-header{padding:0;line-height:0;height:0;position:relative}#fs_connect .fs-header .fs-site-icon,#fs_connect .fs-header .fs-connect-logo{position:absolute;top:-8px;border-radius:50%}#fs_connect .fs-header .fs-site-icon{left:152px}#fs_connect .fs-header .fs-connect-logo{right:152px}#fs_connect .fs-header .fs-site-icon,#fs_connect .fs-header img,#fs_connect .fs-header object{width:50px;height:50px;border-radius:50%}#fs_connect .fs-header .fs-plugin-icon{position:absolute;overflow:hidden;top:-23px;left:50%;margin-left:-44px;border-radius:50%;z-index:1}#fs_connect .fs-header .fs-plugin-icon,#fs_connect .fs-header .fs-plugin-icon img{width:80px;height:80px}#fs_connect .fs-header .dashicons-wordpress-alt{font-size:40px;background:#01749a;color:#fff;width:40px;height:40px;padding:5px;border-radius:50%}#fs_connect .fs-header .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-header .dashicons-plus.fs-first{left:28%}#fs_connect .fs-header .dashicons-plus.fs-second{left:65%}#fs_connect .fs-header .fs-plugin-icon,#fs_connect .fs-header .fs-connect-logo,#fs_connect .fs-header .fs-site-icon{border:1px solid #efefef;padding:3px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:.85em;padding:10px 5px}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:20px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect{border-radius:3px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#c0c7ca}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:" »"}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:""}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-header .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-header .fs-connect-logo{right:auto;left:20px}.rtl #fs_connect .fs-permissions>.fs-trigger .fs-arrow::after{content:"←"}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:#fff;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:0;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;text-align:center;font-size:.9em;margin-top:10px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .dashicons{float:none !important}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;position:absolute;background:rgba(0,0,0,.8);color:#fff !important;font-family:"arial",serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}.fs-permissions .fs-permission.fs-disabled{color:#aaa}.fs-permissions .fs-permission.fs-disabled .fs-permission-description span{color:#aaa}.fs-permissions .fs-permission .fs-switch-feedback{position:absolute;right:15px;top:52px}.fs-permissions ul{height:0;overflow:hidden;margin:0}.fs-permissions ul li{padding:17px 15px;margin:0;position:relative}.fs-permissions ul li>i.dashicons{float:left;font-size:30px;width:30px;height:30px;padding:5px}.fs-permissions ul li .fs-switch{float:right}.fs-permissions ul li .fs-permission-description{margin-left:55px}.fs-permissions ul li .fs-permission-description span{font-size:14px;font-weight:500;color:#23282d}.fs-permissions ul li .fs-permission-description .fs-tooltip{font-size:13px;font-weight:bold}.fs-permissions ul li .fs-permission-description .fs-tooltip-trigger .dashicons{margin:-1px 2px 0 2px}.fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}.fs-permissions.fs-open{background:#fff}.fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 0 10px 0}.fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-right:10px}.fs-permissions .fs-switch-feedback.success{color:#71ae00}.rtl .fs-permissions .fs-switch-feedback{right:auto;left:15px}.rtl .fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-left:10px;margin-right:0}.rtl .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl .fs-permissions ul li .fs-switch{float:left}.rtl .fs-permissions ul li i.dashicons{float:right}
|
vendor/freemius/wordpress-sdk/assets/css/admin/debug.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
|
1 |
+
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
|
vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
|
2 |
-
.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
|
1 |
+
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,.6)}@media(min-width: 961px){.fs-modal{padding-left:160px}.rtl .fs-modal{padding-left:0;padding-right:160px}}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media(max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:last-of-type{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}.rtl .fs-modal .fs-modal-footer{text-align:left}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media(max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:left;line-height:30px}.rtl .fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.rtl .fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:right}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type=radio]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:20px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media(max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-modal.fs-modal-email-address-update .fs-modal-body input[type=text]{width:100%}.fs-modal.fs-modal-email-address-update p{margin-bottom:0}.fs-modal.fs-modal-email-address-update ul{margin:1em .5em}.fs-modal.fs-modal-email-address-update ul li label span{float:left;margin-top:0}.fs-modal.fs-modal-email-address-update ul li label span:last-child{display:block;float:none;margin-left:20px}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:.3;-o-transform:.3;-ms-transform:.3;-webkit-transform:.3;transform:.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,.1) !important}
|
|
vendor/freemius/wordpress-sdk/assets/css/admin/gdpr-optin-notice.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.fs-notice[data-id^=
|
1 |
+
.fs-notice[data-id^=gdpr_optin_actions] .underlined{text-decoration:underline}.fs-notice[data-id^=gdpr_optin_actions] ul .button,.fs-notice[data-id^=gdpr_optin_actions] ul .action-description{vertical-align:middle}.fs-notice[data-id^=gdpr_optin_actions] ul .action-description{display:inline-block;margin-left:3px}
|
vendor/freemius/wordpress-sdk/assets/css/admin/optout.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .dashicons{float:none !important}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;position:absolute;background:rgba(0,0,0,.8);color:#fff !important;font-family:"arial",serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}.fs-permissions .fs-permission.fs-disabled{color:#aaa}.fs-permissions .fs-permission.fs-disabled .fs-permission-description span{color:#aaa}.fs-permissions .fs-permission .fs-switch-feedback{position:absolute;right:15px;top:52px}.fs-permissions ul{height:0;overflow:hidden;margin:0}.fs-permissions ul li{padding:17px 15px;margin:0;position:relative}.fs-permissions ul li>i.dashicons{float:left;font-size:30px;width:30px;height:30px;padding:5px}.fs-permissions ul li .fs-switch{float:right}.fs-permissions ul li .fs-permission-description{margin-left:55px}.fs-permissions ul li .fs-permission-description span{font-size:14px;font-weight:500;color:#23282d}.fs-permissions ul li .fs-permission-description .fs-tooltip{font-size:13px;font-weight:bold}.fs-permissions ul li .fs-permission-description .fs-tooltip-trigger .dashicons{margin:-1px 2px 0 2px}.fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}.fs-permissions.fs-open{background:#fff}.fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 0 10px 0}.fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-right:10px}.fs-permissions .fs-switch-feedback.success{color:#71ae00}.rtl .fs-permissions .fs-switch-feedback{right:auto;left:15px}.rtl .fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-left:10px;margin-right:0}.rtl .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl .fs-permissions ul li .fs-switch{float:left}.rtl .fs-permissions ul li i.dashicons{float:right}.fs-modal-opt-out .fs-modal-footer .fs-opt-out-button{line-height:30px;margin-right:10px}.fs-modal-opt-out .fs-permissions{margin-top:0 !important}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header .fs-group-opt-out-button{float:right;line-height:1.1em}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header .fs-switch-feedback{float:right;line-height:1.1em;margin-right:10px}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header .fs-switch-feedback .fs-ajax-spinner{margin:-2px 0 0}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header-title{font-size:1.1em;font-weight:600;text-transform:uppercase;display:block;line-height:1.1em;margin:.5em 0}.fs-modal-opt-out .fs-permissions .fs-permissions-section--desc{margin-top:0}.fs-modal-opt-out .fs-permissions hr{border:0;border-top:#eee solid 1px;margin:25px 0 20px 0}.fs-modal-opt-out .fs-permissions ul{border:1px solid #c3c4c7;border-radius:3px;margin:10px 0 0 0;box-shadow:0 1px 1px rgba(0,0,0,.04)}.fs-modal-opt-out .fs-permissions ul li{border-bottom:1px solid #d7dde1;border-left:4px solid #72aee6}.rtl .fs-modal-opt-out .fs-permissions ul li{border-left:none;border-right:4px solid #72aee6}.fs-modal-opt-out .fs-permissions ul li.fs-disabled{border-left-color:rgba(114,174,230,0)}.fs-modal-opt-out .fs-permissions ul li:last-child{border-bottom:none}
|
vendor/freemius/wordpress-sdk/assets/css/customizer.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity
|
1 |
+
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:"arial",serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out,.15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
|
vendor/freemius/wordpress-sdk/config.php
CHANGED
@@ -354,7 +354,7 @@
|
|
354 |
is_multisite() &&
|
355 |
( is_network_admin() ||
|
356 |
( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
|
357 |
-
( isset( $_REQUEST['_fs_network_admin'] ) /*||
|
358 |
( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
|
359 |
) ||
|
360 |
// Plugin uninstall.
|
@@ -385,7 +385,7 @@
|
|
385 |
|
386 |
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
define( 'WP_FS__DEMO_MODE', false );
|
388 |
-
}
|
389 |
-
if ( ! defined( 'FS_SDK__SSLVERIFY' ) ) {
|
390 |
-
define( 'FS_SDK__SSLVERIFY', false );
|
391 |
-
}
|
354 |
is_multisite() &&
|
355 |
( is_network_admin() ||
|
356 |
( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
|
357 |
+
( isset( $_REQUEST['_fs_network_admin'] ) && 'true' === $_REQUEST['_fs_network_admin'] /*||
|
358 |
( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
|
359 |
) ||
|
360 |
// Plugin uninstall.
|
385 |
|
386 |
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
define( 'WP_FS__DEMO_MODE', false );
|
388 |
+
}
|
389 |
+
if ( ! defined( 'FS_SDK__SSLVERIFY' ) ) {
|
390 |
+
define( 'FS_SDK__SSLVERIFY', false );
|
391 |
+
}
|
vendor/freemius/wordpress-sdk/includes/class-freemius-abstract.php
CHANGED
@@ -37,9 +37,12 @@
|
|
37 |
* `$fs->is_registered() && $fs->is_tracking_allowed()`
|
38 |
*
|
39 |
* @since 1.0.1
|
|
|
|
|
|
|
40 |
* @return bool
|
41 |
*/
|
42 |
-
abstract function is_registered();
|
43 |
|
44 |
/**
|
45 |
* Check if the user skipped connecting the account with Freemius.
|
@@ -61,68 +64,6 @@
|
|
61 |
|
62 |
#endregion
|
63 |
|
64 |
-
#----------------------------------------------------------------------------------
|
65 |
-
#region Usage Tracking
|
66 |
-
#----------------------------------------------------------------------------------
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
70 |
-
*
|
71 |
-
* @author Leo Fajardo (@leorw)
|
72 |
-
* @since 1.2.1.5
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
abstract function is_tracking_allowed();
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Returns TRUE if the user never opted-in or manually opted-out.
|
80 |
-
*
|
81 |
-
* @author Vova Feldman (@svovaf)
|
82 |
-
* @since 1.2.1.5
|
83 |
-
*
|
84 |
-
* @return bool
|
85 |
-
*/
|
86 |
-
function is_tracking_prohibited() {
|
87 |
-
return ! $this->is_registered() || ! $this->is_tracking_allowed();
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Opt-out from usage tracking.
|
92 |
-
*
|
93 |
-
* Note: This will not delete the account information but will stop all tracking.
|
94 |
-
*
|
95 |
-
* Returns:
|
96 |
-
* 1. FALSE - If the user never opted-in.
|
97 |
-
* 2. TRUE - If successfully opted-out.
|
98 |
-
* 3. object - API Result on failure.
|
99 |
-
*
|
100 |
-
* @author Leo Fajardo (@leorw)
|
101 |
-
* @since 1.2.1.5
|
102 |
-
*
|
103 |
-
* @return bool|object
|
104 |
-
*/
|
105 |
-
abstract function stop_tracking();
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Opt-in back into usage tracking.
|
109 |
-
*
|
110 |
-
* Note: This will only work if the user opted-in previously.
|
111 |
-
*
|
112 |
-
* Returns:
|
113 |
-
* 1. FALSE - If the user never opted-in.
|
114 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
115 |
-
* 3. object - API result on failure.
|
116 |
-
*
|
117 |
-
* @author Leo Fajardo (@leorw)
|
118 |
-
* @since 1.2.1.5
|
119 |
-
*
|
120 |
-
* @return bool|object
|
121 |
-
*/
|
122 |
-
abstract function allow_tracking();
|
123 |
-
|
124 |
-
#endregion
|
125 |
-
|
126 |
#----------------------------------------------------------------------------------
|
127 |
#region Module Type
|
128 |
#----------------------------------------------------------------------------------
|
37 |
* `$fs->is_registered() && $fs->is_tracking_allowed()`
|
38 |
*
|
39 |
* @since 1.0.1
|
40 |
+
*
|
41 |
+
* @param bool $ignore_anonymous_state Since 2.5.1
|
42 |
+
*
|
43 |
* @return bool
|
44 |
*/
|
45 |
+
abstract function is_registered( $ignore_anonymous_state = false );
|
46 |
|
47 |
/**
|
48 |
* Check if the user skipped connecting the account with Freemius.
|
64 |
|
65 |
#endregion
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
#----------------------------------------------------------------------------------
|
68 |
#region Module Type
|
69 |
#----------------------------------------------------------------------------------
|
vendor/freemius/wordpress-sdk/includes/class-freemius.php
CHANGED
@@ -377,6 +377,8 @@
|
|
377 |
const REASON_DIDNT_WORK_AS_EXPECTED = 14;
|
378 |
const REASON_TEMPORARY_DEACTIVATION = 15;
|
379 |
|
|
|
|
|
380 |
/**
|
381 |
* @author Leo Fajardo (@leorw)
|
382 |
* @since 2.3.1
|
@@ -392,7 +394,8 @@
|
|
392 |
*/
|
393 |
private $_pricing_js_path = null;
|
394 |
|
395 |
-
|
|
|
396 |
|
397 |
/* Ctor
|
398 |
------------------------------------------------------------------------------------------------------------------*/
|
@@ -408,8 +411,10 @@
|
|
408 |
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
409 |
*/
|
410 |
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
|
|
|
|
411 |
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
412 |
-
$this->store_id_slug_type_path_map( $module_id, $slug );
|
413 |
}
|
414 |
|
415 |
$this->_module_id = $module_id;
|
@@ -424,7 +429,7 @@
|
|
424 |
|
425 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
426 |
|
427 |
-
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
428 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
429 |
$this->_plugin_basename = $this->get_plugin_basename();
|
430 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
@@ -519,7 +524,10 @@
|
|
519 |
* @author Leo Fajardo (@leorw)
|
520 |
* @since 1.2.2
|
521 |
*/
|
522 |
-
( is_object( $this->_plugin )
|
|
|
|
|
|
|
523 |
$this->get_unique_affix()
|
524 |
);
|
525 |
|
@@ -933,82 +941,27 @@
|
|
933 |
* @param string $sdk_version
|
934 |
*/
|
935 |
function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
|
936 |
-
/**
|
937 |
-
* @since 1.1.7.3 Fixed unwanted connectivity test cleanup.
|
938 |
-
*/
|
939 |
if ( empty( $sdk_prev_version ) ) {
|
940 |
return;
|
941 |
}
|
942 |
|
943 |
-
if (
|
944 |
-
version_compare( $
|
945 |
-
|
946 |
-
$this->_storage->handle_gdpr_admin_notice = true;
|
947 |
-
}
|
948 |
-
|
949 |
-
if ( version_compare( $sdk_prev_version, '2.0.0', '<' ) &&
|
950 |
-
version_compare( $sdk_version, '2.0.0', '>=' )
|
951 |
-
) {
|
952 |
-
$this->migrate_to_subscriptions_collection();
|
953 |
-
|
954 |
-
$this->consolidate_licenses();
|
955 |
-
|
956 |
-
// Clear trial_plan since it's now loaded from the plans collection when needed.
|
957 |
-
$this->_storage->remove( 'trial_plan', true, false );
|
958 |
-
}
|
959 |
-
|
960 |
-
if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
|
961 |
-
version_compare( $sdk_version, '1.2.3', '>=' )
|
962 |
-
) {
|
963 |
-
/**
|
964 |
-
* Starting from version 1.2.3, paths are stored as relative instead of absolute and some of them can be
|
965 |
-
* invalid.
|
966 |
-
*
|
967 |
-
* @author Leo Fajardo (@leorw)
|
968 |
-
*/
|
969 |
-
$this->remove_invalid_paths();
|
970 |
-
}
|
971 |
-
|
972 |
-
if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
|
973 |
-
version_compare( $sdk_version, '1.1.5', '>=' )
|
974 |
) {
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
$connectivity_data = $this->_storage->connectivity_test;
|
981 |
-
$connectivity_data['is_active'] = $this->_storage->is_on['is_active'];
|
982 |
-
$connectivity_data['timestamp'] = $this->_storage->is_on['timestamp'];
|
983 |
-
|
984 |
-
// Override.
|
985 |
-
$this->_storage->connectivity_test = $connectivity_data;
|
986 |
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
|
|
|
991 |
}
|
992 |
}
|
993 |
-
|
994 |
-
if (
|
995 |
-
version_compare( $sdk_prev_version, '2.2.1', '<' ) &&
|
996 |
-
version_compare( $sdk_version, '2.2.1', '>=' )
|
997 |
-
) {
|
998 |
-
/**
|
999 |
-
* Clear the file cache without storing the previous path since it could be a wrong path. For example,
|
1000 |
-
* in the versions of the SDK lower than 2.2.1, it's possible for the path of an add-on to be the same
|
1001 |
-
* as the parent plugin's when the add-on was auto-installed since the relevant method names were not
|
1002 |
-
* skipped in the logic that determines the right path in the `get_caller_main_file_and_type` method
|
1003 |
-
* (e.g. `try_activate_plugin`). Since it was an auto-installation, the caller was the parent plugin
|
1004 |
-
* and so its path was used. In case the stored path is wrong, clearing the cache will resolve issues
|
1005 |
-
* related to data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
|
1006 |
-
*
|
1007 |
-
* @author Leo Fajardo (@leorw)
|
1008 |
-
* @since 2.2.1
|
1009 |
-
*/
|
1010 |
-
$this->clear_module_main_file_cache( false );
|
1011 |
-
}
|
1012 |
}
|
1013 |
|
1014 |
/**
|
@@ -1059,102 +1012,6 @@
|
|
1059 |
}
|
1060 |
}
|
1061 |
|
1062 |
-
/**
|
1063 |
-
* @author Leo Fajardo (@leorw)
|
1064 |
-
* @since 2.0.0
|
1065 |
-
*/
|
1066 |
-
private function migrate_to_subscriptions_collection() {
|
1067 |
-
if ( ! is_object( $this->_site ) ) {
|
1068 |
-
return;
|
1069 |
-
}
|
1070 |
-
|
1071 |
-
if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
|
1072 |
-
$this->_storage->subscriptions = array( fs_get_entity( $this->_storage->subscription, FS_Subscription::get_class_name() ) );
|
1073 |
-
}
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
/**
|
1077 |
-
* @author Leo Fajardo (@leorw)
|
1078 |
-
* @since 2.0.0
|
1079 |
-
*/
|
1080 |
-
private function consolidate_licenses() {
|
1081 |
-
$plugin_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_PLUGIN );
|
1082 |
-
if ( isset( $plugin_licenses[ $this->_slug ] ) ) {
|
1083 |
-
$plugin_licenses = $plugin_licenses[ $this->_slug ];
|
1084 |
-
} else {
|
1085 |
-
$plugin_licenses = array();
|
1086 |
-
}
|
1087 |
-
|
1088 |
-
$theme_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_THEME );
|
1089 |
-
if ( isset( $theme_licenses[ $this->_slug ] ) ) {
|
1090 |
-
$theme_licenses = $theme_licenses[ $this->_slug ];
|
1091 |
-
} else {
|
1092 |
-
$theme_licenses = array();
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
if ( empty( $plugin_licenses ) && empty( $theme_licenses ) ) {
|
1096 |
-
return;
|
1097 |
-
}
|
1098 |
-
|
1099 |
-
$all_licenses = array();
|
1100 |
-
$user_id_license_ids_map = array();
|
1101 |
-
|
1102 |
-
foreach ( $plugin_licenses as $user_id => $user_licenses ) {
|
1103 |
-
if ( is_array( $user_licenses ) ) {
|
1104 |
-
if ( ! isset( $user_license_ids[ $user_id ] ) ) {
|
1105 |
-
$user_id_license_ids_map[ $user_id ] = array();
|
1106 |
-
}
|
1107 |
-
|
1108 |
-
foreach ( $user_licenses as $user_license ) {
|
1109 |
-
$all_licenses[] = $user_license;
|
1110 |
-
$user_id_license_ids_map[ $user_id ][] = $user_license->id;
|
1111 |
-
}
|
1112 |
-
}
|
1113 |
-
}
|
1114 |
-
|
1115 |
-
foreach ( $theme_licenses as $user_id => $user_licenses ) {
|
1116 |
-
if ( is_array( $user_licenses ) ) {
|
1117 |
-
if ( ! isset( $user_license_ids[ $user_id ] ) ) {
|
1118 |
-
$user_id_license_ids_map[ $user_id ] = array();
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
foreach ( $user_licenses as $user_license ) {
|
1122 |
-
$all_licenses[] = $user_license;
|
1123 |
-
$user_id_license_ids_map[ $user_id ][] = $user_license->id;
|
1124 |
-
}
|
1125 |
-
}
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
self::store_user_id_license_ids_map(
|
1129 |
-
$user_id_license_ids_map,
|
1130 |
-
$this->_module_id
|
1131 |
-
);
|
1132 |
-
|
1133 |
-
$this->_store_licenses( true, $this->_module_id, $all_licenses );
|
1134 |
-
}
|
1135 |
-
|
1136 |
-
/**
|
1137 |
-
* Remove invalid paths.
|
1138 |
-
*
|
1139 |
-
* @author Leo Fajardo (@leorw)
|
1140 |
-
* @since 1.2.3
|
1141 |
-
*/
|
1142 |
-
private function remove_invalid_paths() {
|
1143 |
-
// Remove invalid path that is still associated with the current slug if there's any.
|
1144 |
-
$file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
|
1145 |
-
foreach ( $file_slug_map as $plugin_basename => $slug ) {
|
1146 |
-
if ( $slug === $this->_slug &&
|
1147 |
-
$plugin_basename !== $this->_plugin_basename &&
|
1148 |
-
! file_exists( $this->get_absolute_path( $plugin_basename ) )
|
1149 |
-
) {
|
1150 |
-
unset( $file_slug_map[ $plugin_basename ] );
|
1151 |
-
self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
|
1152 |
-
|
1153 |
-
break;
|
1154 |
-
}
|
1155 |
-
}
|
1156 |
-
}
|
1157 |
-
|
1158 |
/**
|
1159 |
* @author Vova Feldman (@svovaf)
|
1160 |
* @since 1.2.2.7
|
@@ -1491,46 +1348,6 @@
|
|
1491 |
}
|
1492 |
}
|
1493 |
|
1494 |
-
/**
|
1495 |
-
* Add special parameter to WP admin AJAX calls so when we
|
1496 |
-
* process AJAX calls we can identify its source properly.
|
1497 |
-
*
|
1498 |
-
* @author Leo Fajardo (@leorw)
|
1499 |
-
* @since 2.0.0
|
1500 |
-
*/
|
1501 |
-
static function _enrich_ajax_url() {
|
1502 |
-
$admin_param = is_network_admin() ?
|
1503 |
-
'_fs_network_admin' :
|
1504 |
-
'_fs_blog_admin';
|
1505 |
-
?>
|
1506 |
-
<script type="text/javascript">
|
1507 |
-
(function ($) {
|
1508 |
-
$(document).ajaxSend(function (event, jqxhr, settings) {
|
1509 |
-
if (settings.url &&
|
1510 |
-
-1 < settings.url.indexOf('admin-ajax.php') &&
|
1511 |
-
! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
|
1512 |
-
) {
|
1513 |
-
if (
|
1514 |
-
'string' === typeof settings.data &&
|
1515 |
-
settings.data.indexOf( 'action=heartbeat' ) > 0
|
1516 |
-
) {
|
1517 |
-
return;
|
1518 |
-
}
|
1519 |
-
|
1520 |
-
if (settings.url.indexOf('?') > 0) {
|
1521 |
-
settings.url += '&';
|
1522 |
-
} else {
|
1523 |
-
settings.url += '?';
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
settings.url += '<?php echo $admin_param ?>=true';
|
1527 |
-
}
|
1528 |
-
});
|
1529 |
-
})(jQuery);
|
1530 |
-
</script>
|
1531 |
-
<?php
|
1532 |
-
}
|
1533 |
-
|
1534 |
/**
|
1535 |
* Opens the support forum subemenu item in a new browser page.
|
1536 |
*
|
@@ -1641,8 +1458,10 @@
|
|
1641 |
}
|
1642 |
|
1643 |
if ( $this->is_plugin() ) {
|
1644 |
-
if ( $
|
1645 |
add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
|
|
|
|
|
1646 |
}
|
1647 |
|
1648 |
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
@@ -1652,7 +1471,12 @@
|
|
1652 |
add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1653 |
add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1654 |
add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1655 |
-
|
|
|
|
|
|
|
|
|
|
|
1656 |
|
1657 |
add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1658 |
add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
@@ -1677,6 +1501,7 @@
|
|
1677 |
add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
|
1678 |
add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
|
1679 |
add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
|
|
|
1680 |
|
1681 |
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1682 |
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
@@ -2048,7 +1873,13 @@
|
|
2048 |
return;
|
2049 |
}
|
2050 |
|
2051 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2052 |
|
2053 |
if ( self::is_plugins_page() && $this->is_plugin() ) {
|
2054 |
$this->hook_plugin_action_links();
|
@@ -2094,20 +1925,27 @@
|
|
2094 |
/**
|
2095 |
* Leverage backtrace to find caller plugin file path.
|
2096 |
*
|
2097 |
-
* @
|
2098 |
-
* @
|
2099 |
-
*
|
2100 |
-
* @param bool $is_init Is initiation sequence.
|
2101 |
*
|
2102 |
* @return string
|
|
|
|
|
|
|
2103 |
*/
|
2104 |
-
private function _find_caller_plugin_file( $is_init = false ) {
|
2105 |
// Try to load the cached value of the file path.
|
2106 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
2107 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
2108 |
if ( ! empty( $plugin_main_file->path ) ) {
|
2109 |
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
2110 |
if ( file_exists( $absolute_path ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
2111 |
return $absolute_path;
|
2112 |
}
|
2113 |
}
|
@@ -2148,12 +1986,11 @@
|
|
2148 |
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
2149 |
*/
|
2150 |
// Find caller module.
|
2151 |
-
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
2152 |
$this->_storage->plugin_main_file = (object) array(
|
2153 |
-
'path' => $
|
2154 |
);
|
2155 |
|
2156 |
-
return $this->get_absolute_path( $
|
2157 |
}
|
2158 |
|
2159 |
/**
|
@@ -2215,6 +2052,8 @@
|
|
2215 |
* @param number $module_id
|
2216 |
* @param string $slug
|
2217 |
*
|
|
|
|
|
2218 |
* @since 1.2.2
|
2219 |
*/
|
2220 |
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
@@ -2236,20 +2075,52 @@
|
|
2236 |
$store_option = true;
|
2237 |
}
|
2238 |
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2253 |
|
2254 |
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
2255 |
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
@@ -2260,6 +2131,8 @@
|
|
2260 |
if ( $store_option ) {
|
2261 |
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
2262 |
}
|
|
|
|
|
2263 |
}
|
2264 |
|
2265 |
/**
|
@@ -2273,8 +2146,10 @@
|
|
2273 |
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
2274 |
* SDK an internal file instead of directly from functions.php.
|
2275 |
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
|
|
|
|
2276 |
*/
|
2277 |
-
private function get_caller_main_file_and_type() {
|
2278 |
self::require_plugin_essentials();
|
2279 |
|
2280 |
$all_plugins = fs_get_plugins( true );
|
@@ -2413,10 +2288,12 @@
|
|
2413 |
}
|
2414 |
}
|
2415 |
|
2416 |
-
|
2417 |
'module_type' => $module_type,
|
2418 |
'path' => $caller_file_candidate
|
2419 |
);
|
|
|
|
|
2420 |
}
|
2421 |
|
2422 |
#----------------------------------------------------------------------------------
|
@@ -2433,6 +2310,13 @@
|
|
2433 |
* @since 1.1.2
|
2434 |
*/
|
2435 |
function _add_deactivation_feedback_dialog_box() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2436 |
$subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
|
2437 |
$this->_get_subscription_cancellation_dialog_box_template_params() :
|
2438 |
array();
|
@@ -2440,7 +2324,7 @@
|
|
2440 |
/**
|
2441 |
* @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
|
2442 |
*/
|
2443 |
-
$show_deactivation_feedback_form =
|
2444 |
if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
|
2445 |
$show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
|
2446 |
} else if ( $this->is_addon() ) {
|
@@ -2545,7 +2429,7 @@
|
|
2545 |
$reason_temporary_deactivation = array(
|
2546 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
2547 |
'text' => sprintf(
|
2548 |
-
$this->get_text_inline( "It's a temporary %s
|
2549 |
strtolower( $this->is_plugin() ?
|
2550 |
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
2551 |
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
@@ -2710,6 +2594,14 @@
|
|
2710 |
|
2711 |
$this->_storage->store( 'uninstall_reason', $reason );
|
2712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2713 |
/**
|
2714 |
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
2715 |
* not support uninstall hook.
|
@@ -2731,6 +2623,73 @@
|
|
2731 |
exit;
|
2732 |
}
|
2733 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2734 |
/**
|
2735 |
* @author Leo Fajardo (@leorw)
|
2736 |
* @since 2.1.4
|
@@ -2927,6 +2886,13 @@
|
|
2927 |
return self::instance( $addon_id );
|
2928 |
}
|
2929 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2930 |
#endregion ------------------------------------------------------------------
|
2931 |
|
2932 |
/**
|
@@ -3437,7 +3403,9 @@
|
|
3437 |
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
|
3438 |
}
|
3439 |
|
3440 |
-
|
|
|
|
|
3441 |
add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
|
3442 |
|
3443 |
if ( self::is_plugins_page() || self::is_themes_page() ) {
|
@@ -3456,48 +3424,197 @@
|
|
3456 |
self::$_statics_loaded = true;
|
3457 |
}
|
3458 |
|
|
|
|
|
|
|
|
|
3459 |
/**
|
3460 |
* @author Leo Fajardo (@leorw)
|
|
|
3461 |
*
|
3462 |
-
* @
|
|
|
|
|
3463 |
*/
|
3464 |
-
private
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
$api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
|
3469 |
-
$api_network_options->migrate_to_network();
|
3470 |
-
|
3471 |
-
// Migrate API cache to network level storage.
|
3472 |
-
FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
|
3473 |
|
3474 |
-
|
3475 |
}
|
3476 |
|
3477 |
-
#----------------------------------------------------------------------------------
|
3478 |
-
#region Localization
|
3479 |
-
#----------------------------------------------------------------------------------
|
3480 |
-
|
3481 |
/**
|
3482 |
-
*
|
|
|
3483 |
*
|
3484 |
-
* @
|
3485 |
-
* @since 1.2.1
|
3486 |
*/
|
3487 |
-
|
3488 |
-
if ( !
|
3489 |
-
return;
|
3490 |
}
|
3491 |
|
3492 |
-
|
3493 |
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3501 |
|
3502 |
#endregion
|
3503 |
|
@@ -3692,6 +3809,10 @@
|
|
3692 |
|
3693 |
switch_to_blog( $current_blog_id );
|
3694 |
}
|
|
|
|
|
|
|
|
|
3695 |
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
3696 |
check_admin_referer( 'simulate_trial' );
|
3697 |
|
@@ -3740,55 +3861,69 @@
|
|
3740 |
}
|
3741 |
|
3742 |
/**
|
3743 |
-
* @author
|
3744 |
-
* @since
|
|
|
|
|
3745 |
*/
|
3746 |
-
static function
|
3747 |
self::$_static_logger->entrance();
|
3748 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3749 |
if ( ! is_multisite() ) {
|
3750 |
-
$
|
3751 |
-
|
|
|
|
|
|
|
|
|
|
|
3752 |
} else {
|
3753 |
$sites = self::get_sites();
|
3754 |
|
3755 |
-
$all_plugins_installs = array();
|
3756 |
-
$all_themes_installs = array();
|
3757 |
-
|
3758 |
foreach ( $sites as $site ) {
|
3759 |
$blog_id = self::get_site_blog_id( $site );
|
3760 |
|
3761 |
-
|
3762 |
-
|
3763 |
-
foreach ( $plugins_installs as $slug => $install ) {
|
3764 |
-
if ( ! isset( $all_plugins_installs[ $slug ] ) ) {
|
3765 |
-
$all_plugins_installs[ $slug ] = array();
|
3766 |
-
}
|
3767 |
-
|
3768 |
-
$install->blog_id = $blog_id;
|
3769 |
|
3770 |
-
$
|
3771 |
-
|
|
|
|
|
3772 |
|
3773 |
-
|
3774 |
|
3775 |
-
|
3776 |
-
if ( ! isset( $all_themes_installs[ $slug ] ) ) {
|
3777 |
-
$all_themes_installs[ $slug ] = array();
|
3778 |
}
|
3779 |
|
3780 |
-
$install->blog_id = $blog_id;
|
3781 |
-
|
3782 |
-
$all_themes_installs[ $slug ][] = $install;
|
3783 |
}
|
3784 |
}
|
3785 |
}
|
3786 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3787 |
$licenses_by_module_type = self::get_all_licenses_by_module_type();
|
3788 |
|
3789 |
$vars = array(
|
3790 |
-
'plugin_sites' => $
|
3791 |
-
'theme_sites' => $
|
3792 |
'users' => self::get_all_users(),
|
3793 |
'addons' => self::get_all_addons(),
|
3794 |
'account_addons' => self::get_all_account_addons(),
|
@@ -3820,6 +3955,10 @@
|
|
3820 |
function is_on() {
|
3821 |
self::$_static_logger->entrance();
|
3822 |
|
|
|
|
|
|
|
|
|
3823 |
if ( isset( $this->_is_on ) ) {
|
3824 |
return $this->_is_on;
|
3825 |
}
|
@@ -3908,18 +4047,24 @@
|
|
3908 |
|
3909 |
$is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
|
3910 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3911 |
return $this->get_api_plugin_scope()->ping(
|
3912 |
$this->get_anonymous_id( $blog_id ),
|
3913 |
-
|
3914 |
-
'is_update' => json_encode( $is_update ),
|
3915 |
-
'version' => $version,
|
3916 |
-
'sdk' => $this->version,
|
3917 |
-
'is_admin' => json_encode( is_admin() ),
|
3918 |
-
'is_ajax' => json_encode( self::is_ajax() ),
|
3919 |
-
'is_cron' => json_encode( self::is_cron() ),
|
3920 |
-
'is_gdpr_test' => $is_gdpr_test,
|
3921 |
-
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
3922 |
-
)
|
3923 |
);
|
3924 |
}
|
3925 |
|
@@ -4056,7 +4201,7 @@
|
|
4056 |
$unique_id = self::$_accounts->get_option( 'unique_id', null, $blog_id );
|
4057 |
|
4058 |
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
4059 |
-
$key =
|
4060 |
|
4061 |
$secure_auth = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
|
4062 |
if ( empty( $secure_auth ) ||
|
@@ -4085,6 +4230,17 @@
|
|
4085 |
return $unique_id;
|
4086 |
}
|
4087 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4088 |
/**
|
4089 |
* @author Vova Feldman (@svovaf)
|
4090 |
* @since 1.1.7.4
|
@@ -4233,11 +4389,16 @@
|
|
4233 |
$install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
|
4234 |
$fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
|
4235 |
$fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
|
4236 |
-
/* translators: %s: product title (e.g. "Awesome Plugin" requires
|
4237 |
-
$x_requires_access_to_api = $this->esc_html_inline( '%s requires
|
4238 |
$sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
|
4239 |
$happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
|
4240 |
|
|
|
|
|
|
|
|
|
|
|
4241 |
$message = false;
|
4242 |
if ( is_object( $api_result ) &&
|
4243 |
isset( $api_result->error ) &&
|
@@ -4869,7 +5030,7 @@
|
|
4869 |
|
4870 |
/**
|
4871 |
* This should be executed even if Freemius is off for the core module,
|
4872 |
-
* otherwise, the add-ons
|
4873 |
* relevant when the developer decided to turn FS off for existing users.
|
4874 |
*
|
4875 |
* @author Vova Feldman (@svovaf)
|
@@ -4907,22 +5068,25 @@
|
|
4907 |
* @since 1.1.7.3
|
4908 |
*
|
4909 |
*/
|
4910 |
-
if ( $this->is_registered() ) {
|
4911 |
-
|
4912 |
-
$this->schedule_sync_cron();
|
4913 |
-
}
|
4914 |
}
|
4915 |
|
4916 |
/**
|
4917 |
* Check if requested for manual blocking background sync.
|
4918 |
*/
|
4919 |
if ( fs_request_has( 'background_sync' ) ) {
|
|
|
|
|
|
|
4920 |
$this->run_manual_sync();
|
4921 |
}
|
4922 |
}
|
4923 |
}
|
4924 |
|
4925 |
if ( $this->is_registered() ) {
|
|
|
|
|
4926 |
$this->hook_callback_to_install_sync();
|
4927 |
}
|
4928 |
|
@@ -4937,6 +5101,28 @@
|
|
4937 |
}
|
4938 |
|
4939 |
if ( $this->is_user_in_admin() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4940 |
if ( $this->is_addon() ) {
|
4941 |
if ( ! $this->is_parent_plugin_installed() ) {
|
4942 |
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
@@ -5041,7 +5227,7 @@
|
|
5041 |
* because the updater has some logic that needs to be executed
|
5042 |
* during AJAX calls.
|
5043 |
*
|
5044 |
-
* Currently we need to hook to the `http_request_host_is_external` filter.
|
5045 |
* In the future, there might be additional logic added.
|
5046 |
*
|
5047 |
* @author Vova Feldman
|
@@ -5060,7 +5246,8 @@
|
|
5060 |
*/
|
5061 |
( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->premium_plugin_basename() ) ) )
|
5062 |
) &&
|
5063 |
-
$this->has_release_on_freemius()
|
|
|
5064 |
) {
|
5065 |
FS_Plugin_Updater::instance( $this );
|
5066 |
}
|
@@ -5129,150 +5316,70 @@
|
|
5129 |
}
|
5130 |
|
5131 |
/**
|
5132 |
-
* @
|
|
|
|
|
5133 |
*
|
5134 |
-
* @
|
5135 |
*/
|
5136 |
-
function
|
5137 |
$this->_logger->entrance();
|
5138 |
|
5139 |
-
$
|
5140 |
-
|
5141 |
-
|
5142 |
-
|
5143 |
-
if ( true === $result ) {
|
5144 |
-
self::shoot_ajax_success();
|
5145 |
-
}
|
5146 |
-
|
5147 |
-
$this->_logger->api_error( $result );
|
5148 |
-
|
5149 |
-
self::shoot_ajax_failure(
|
5150 |
-
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
5151 |
-
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
5152 |
-
$result->error->message :
|
5153 |
-
var_export( $result, true ) )
|
5154 |
);
|
5155 |
-
}
|
5156 |
-
|
5157 |
-
/**
|
5158 |
-
* @author Leo Fajardo (@leorw)
|
5159 |
-
* @since 1.2.1.5
|
5160 |
-
*/
|
5161 |
-
function _allow_tracking_callback() {
|
5162 |
-
$this->_logger->entrance();
|
5163 |
-
|
5164 |
-
$this->check_ajax_referer( 'allow_tracking' );
|
5165 |
|
5166 |
-
$
|
5167 |
-
|
5168 |
-
if (
|
5169 |
-
|
5170 |
}
|
5171 |
|
5172 |
-
$this->
|
5173 |
-
|
5174 |
-
self::shoot_ajax_failure(
|
5175 |
-
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
5176 |
-
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
5177 |
-
$result->error->message :
|
5178 |
-
var_export( $result, true ) )
|
5179 |
-
);
|
5180 |
-
}
|
5181 |
-
|
5182 |
-
/**
|
5183 |
-
* Opt-out from usage tracking.
|
5184 |
-
*
|
5185 |
-
* Note: This will not delete the account information but will stop all tracking.
|
5186 |
-
*
|
5187 |
-
* Returns:
|
5188 |
-
* 1. FALSE - If the user never opted-in.
|
5189 |
-
* 2. TRUE - If successfully opted-out.
|
5190 |
-
* 3. object - API result on failure.
|
5191 |
-
*
|
5192 |
-
* @author Leo Fajardo (@leorw)
|
5193 |
-
* @since 1.2.1.5
|
5194 |
-
*
|
5195 |
-
* @return bool|object
|
5196 |
-
*/
|
5197 |
-
function stop_site_tracking() {
|
5198 |
-
$this->_logger->entrance();
|
5199 |
-
|
5200 |
-
if ( ! $this->is_registered() ) {
|
5201 |
-
// User never opted-in.
|
5202 |
-
return false;
|
5203 |
-
}
|
5204 |
|
5205 |
-
if ( $
|
5206 |
-
|
5207 |
-
return true;
|
5208 |
}
|
5209 |
|
5210 |
-
|
5211 |
-
|
5212 |
-
|
5213 |
-
) );
|
5214 |
-
|
5215 |
-
if ( ! $this->is_api_result_entity( $result ) ||
|
5216 |
-
! isset( $result->is_disconnected ) ||
|
5217 |
-
! $result->is_disconnected
|
5218 |
) {
|
5219 |
$this->_logger->api_error( $result );
|
5220 |
|
5221 |
return $result;
|
5222 |
}
|
5223 |
|
5224 |
-
$this->_site->is_disconnected = $result->is_disconnected;
|
5225 |
-
$this->_store_site();
|
5226 |
-
|
5227 |
-
$this->clear_sync_cron();
|
5228 |
-
|
5229 |
-
// Successfully disconnected.
|
5230 |
return true;
|
5231 |
}
|
5232 |
|
5233 |
/**
|
5234 |
-
*
|
|
|
|
|
5235 |
*
|
5236 |
-
*
|
5237 |
-
*
|
5238 |
-
* Returns:
|
5239 |
-
* 1. FALSE - If the user never opted-in.
|
5240 |
-
* 2. TRUE - If successfully opted-out.
|
5241 |
-
* 3. object - API result on failure.
|
5242 |
-
*
|
5243 |
-
* @author Leo Fajardo (@leorw)
|
5244 |
-
* @since 1.2.1.5
|
5245 |
-
*
|
5246 |
-
* @return bool|object
|
5247 |
*/
|
5248 |
-
function
|
|
|
|
|
|
|
|
|
5249 |
$this->_logger->entrance();
|
5250 |
|
5251 |
-
if ( ! $this->is_registered() ) {
|
5252 |
-
// User never opted-in.
|
5253 |
-
return false;
|
5254 |
-
}
|
5255 |
-
|
5256 |
$install_id_2_blog_id = array();
|
5257 |
-
$
|
5258 |
-
|
5259 |
-
$opt_out_all = true;
|
5260 |
|
5261 |
-
$
|
5262 |
-
foreach ( $installs_map as $blog_id => $install ) {
|
5263 |
-
if ( $install->is_tracking_prohibited() ) {
|
5264 |
-
// Already opted-out.
|
5265 |
-
continue;
|
5266 |
-
}
|
5267 |
|
|
|
5268 |
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
5269 |
-
//
|
5270 |
-
$
|
5271 |
continue;
|
5272 |
}
|
5273 |
|
5274 |
-
$params[] = array( 'id' => $install->id );
|
5275 |
-
|
5276 |
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
5277 |
}
|
5278 |
|
@@ -5280,171 +5387,188 @@
|
|
5280 |
return true;
|
5281 |
}
|
5282 |
|
5283 |
-
$params
|
|
|
|
|
|
|
|
|
5284 |
|
5285 |
// Send update to FS.
|
5286 |
-
$result = $this->get_current_or_network_user_api_scope()->call(
|
|
|
|
|
|
|
|
|
5287 |
|
5288 |
-
if ( ! $this->is_api_result_object( $result, '
|
5289 |
$this->_logger->api_error( $result );
|
5290 |
|
5291 |
return $result;
|
5292 |
}
|
5293 |
|
5294 |
-
foreach ( $result->installs as $r_install ) {
|
5295 |
-
$blog_id = $install_id_2_blog_id[ $r_install->id ];
|
5296 |
-
$install = $installs_map[ $blog_id ];
|
5297 |
-
$install->is_disconnected = $r_install->is_disconnected;
|
5298 |
-
$this->_store_site( true, $blog_id, $install );
|
5299 |
-
}
|
5300 |
-
|
5301 |
-
$this->clear_sync_cron( $opt_out_all );
|
5302 |
-
|
5303 |
-
// Successfully disconnected.
|
5304 |
return true;
|
5305 |
}
|
5306 |
|
5307 |
/**
|
5308 |
-
*
|
5309 |
-
*
|
5310 |
-
* Note: This will not delete the account information but will stop all tracking.
|
5311 |
-
*
|
5312 |
-
* Returns:
|
5313 |
-
* 1. FALSE - If the user never opted-in.
|
5314 |
-
* 2. TRUE - If successfully opted-out.
|
5315 |
-
* 3. object - API result on failure.
|
5316 |
-
*
|
5317 |
-
* @author Leo Fajardo (@leorw)
|
5318 |
-
* @since 1.2.1.5
|
5319 |
-
*
|
5320 |
-
* @param bool $is_network_action
|
5321 |
*
|
5322 |
-
* @return
|
5323 |
*/
|
5324 |
-
function
|
5325 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5326 |
|
5327 |
-
return $
|
5328 |
-
$this->stop_network_tracking() :
|
5329 |
-
$this->stop_site_tracking();
|
5330 |
}
|
5331 |
|
5332 |
/**
|
5333 |
-
*
|
5334 |
-
*
|
5335 |
-
* Note: This will only work if the user opted-in previously.
|
5336 |
-
*
|
5337 |
-
* Returns:
|
5338 |
-
* 1. FALSE - If the user never opted-in.
|
5339 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
5340 |
-
* 3. object - API result on failure.
|
5341 |
-
*
|
5342 |
-
* @author Leo Fajardo (@leorw)
|
5343 |
-
* @since 1.2.1.5
|
5344 |
-
*
|
5345 |
-
* @return bool|object
|
5346 |
*/
|
5347 |
-
function
|
5348 |
$this->_logger->entrance();
|
5349 |
|
5350 |
-
|
5351 |
-
// User never opted-in.
|
5352 |
-
return false;
|
5353 |
-
}
|
5354 |
|
5355 |
-
if ( $this->
|
5356 |
-
|
5357 |
-
return true;
|
5358 |
}
|
5359 |
|
5360 |
-
$
|
5361 |
-
|
5362 |
-
) );
|
5363 |
-
|
5364 |
-
if ( ! $this->is_api_result_entity( $result ) ||
|
5365 |
-
! isset( $result->is_disconnected ) ||
|
5366 |
-
$result->is_disconnected
|
5367 |
-
) {
|
5368 |
-
$this->_logger->api_error( $result );
|
5369 |
|
5370 |
-
|
|
|
5371 |
}
|
5372 |
|
5373 |
-
$
|
5374 |
-
$this->_store_site();
|
5375 |
|
5376 |
-
$this->
|
5377 |
|
5378 |
-
|
5379 |
-
|
|
|
|
|
|
|
5380 |
}
|
5381 |
|
5382 |
/**
|
5383 |
-
*
|
5384 |
-
*
|
5385 |
-
*
|
5386 |
-
*
|
5387 |
-
* Returns:
|
5388 |
-
* 1. FALSE - If the user never opted-in.
|
5389 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
5390 |
-
* 3. object - API result on failure.
|
5391 |
-
*
|
5392 |
-
* @author Leo Fajardo (@leorw)
|
5393 |
-
* @since 1.2.1.5
|
5394 |
*
|
5395 |
-
* @return bool|
|
5396 |
*/
|
5397 |
-
function
|
5398 |
-
$this->
|
5399 |
-
|
5400 |
-
if ( ! $this->is_registered() ) {
|
5401 |
// User never opted-in.
|
5402 |
return false;
|
5403 |
}
|
5404 |
|
5405 |
-
|
5406 |
-
|
5407 |
-
|
5408 |
-
|
5409 |
-
|
5410 |
-
|
5411 |
-
|
5412 |
-
}
|
5413 |
-
|
5414 |
-
$params[] = array( 'id' => $install->id );
|
5415 |
-
|
5416 |
-
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
5417 |
}
|
5418 |
|
5419 |
-
|
5420 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5421 |
}
|
5422 |
|
5423 |
-
|
|
|
5424 |
|
5425 |
-
|
5426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5427 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5428 |
|
5429 |
-
|
5430 |
-
|
|
|
5431 |
|
5432 |
-
|
5433 |
-
|
|
|
|
|
|
|
|
|
|
|
5434 |
|
5435 |
-
|
5436 |
-
|
5437 |
-
|
5438 |
-
$install->is_disconnected = $r_install->is_disconnected;
|
5439 |
-
$this->_store_site( true, $blog_id, $install );
|
5440 |
}
|
5441 |
|
5442 |
-
$this->
|
|
|
|
|
|
|
|
|
5443 |
|
5444 |
-
// Successfully reconnected.
|
5445 |
return true;
|
5446 |
}
|
5447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5448 |
/**
|
5449 |
* Opt-in back into usage tracking.
|
5450 |
*
|
@@ -5458,16 +5582,18 @@
|
|
5458 |
* @author Leo Fajardo (@leorw)
|
5459 |
* @since 1.2.1.5
|
5460 |
*
|
5461 |
-
* @
|
5462 |
*
|
5463 |
* @return bool|object
|
5464 |
*/
|
5465 |
-
function
|
5466 |
$this->_logger->entrance();
|
5467 |
|
5468 |
-
return $
|
5469 |
-
$this->
|
5470 |
-
$
|
|
|
|
|
5471 |
}
|
5472 |
|
5473 |
/**
|
@@ -5488,8 +5614,7 @@
|
|
5488 |
|
5489 |
if ( ! fs_is_network_admin() || $is_context_single_site ) {
|
5490 |
if ( $this->is_tracking_prohibited() ) {
|
5491 |
-
$this->
|
5492 |
-
$this->_store_site();
|
5493 |
}
|
5494 |
} else {
|
5495 |
$installs_map = $this->get_blog_install_map();
|
@@ -5497,73 +5622,69 @@
|
|
5497 |
/**
|
5498 |
* @var FS_Site $install
|
5499 |
*/
|
5500 |
-
if ( $
|
5501 |
-
$
|
5502 |
-
$this->_store_site( true, $blog_id, $install );
|
5503 |
}
|
5504 |
}
|
5505 |
}
|
5506 |
}
|
5507 |
|
5508 |
/**
|
5509 |
-
*
|
5510 |
-
* @since 2.3.2
|
5511 |
*
|
5512 |
-
* @
|
|
|
|
|
|
|
|
|
5513 |
*/
|
5514 |
-
function
|
5515 |
-
|
5516 |
-
|
5517 |
-
$this->_storage->get( 'is_extensions_tracking_allowed', null )
|
5518 |
-
) );
|
5519 |
-
}
|
5520 |
|
5521 |
-
|
5522 |
-
|
5523 |
-
|
5524 |
-
*/
|
5525 |
-
function _update_tracking_permission_callback() {
|
5526 |
-
$this->_logger->entrance();
|
5527 |
|
5528 |
-
|
|
|
|
|
5529 |
|
5530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5531 |
|
5532 |
-
|
5533 |
-
|
|
|
5534 |
}
|
5535 |
|
5536 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5537 |
|
5538 |
-
|
5539 |
-
case 'extensions':
|
5540 |
-
$this->update_extensions_tracking_flag( $is_enabled );
|
5541 |
-
break;
|
5542 |
-
default:
|
5543 |
$permission = 'no_match';
|
5544 |
-
|
5545 |
|
5546 |
-
|
5547 |
-
self::shoot_ajax_failure();
|
5548 |
}
|
5549 |
|
5550 |
-
|
5551 |
-
'permissions' => array(
|
5552 |
-
$permission => $is_enabled,
|
5553 |
-
)
|
5554 |
-
) );
|
5555 |
-
}
|
5556 |
-
|
5557 |
-
/**
|
5558 |
-
* @author Leo Fajardo (@leorw)
|
5559 |
-
* @since 2.3.2
|
5560 |
-
*
|
5561 |
-
* @param bool|null $is_enabled
|
5562 |
-
*/
|
5563 |
-
function update_extensions_tracking_flag( $is_enabled ) {
|
5564 |
-
if ( is_bool( $is_enabled ) ) {
|
5565 |
-
$this->_storage->store( 'is_extensions_tracking_allowed', $is_enabled );
|
5566 |
-
}
|
5567 |
}
|
5568 |
|
5569 |
/**
|
@@ -5769,8 +5890,7 @@
|
|
5769 |
if ( $this->is_activation_mode() ) {
|
5770 |
if ( ! is_admin() ) {
|
5771 |
/**
|
5772 |
-
* If in activation mode, don't execute Freemius outside
|
5773 |
-
* admin dashboard.
|
5774 |
*
|
5775 |
* @author Vova Feldman (@svovaf)
|
5776 |
* @since 1.1.7.3
|
@@ -6317,7 +6437,25 @@
|
|
6317 |
if ( ! isset( $this->_is_anonymous ) ) {
|
6318 |
if ( $this->is_network_anonymous() ) {
|
6319 |
$this->_is_anonymous = true;
|
6320 |
-
} else if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6321 |
if ( ! isset( $this->_storage->is_anonymous ) ) {
|
6322 |
// Not skipped.
|
6323 |
$this->_is_anonymous = false;
|
@@ -6373,6 +6511,18 @@
|
|
6373 |
return $this->_storage->get( 'is_pending_activation', false );
|
6374 |
}
|
6375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6376 |
/**
|
6377 |
* Check if plugin must be WordPress.org compliant.
|
6378 |
*
|
@@ -6449,9 +6599,11 @@
|
|
6449 |
private function get_cron_blog_id( $name ) {
|
6450 |
$this->_logger->entrance( $name );
|
6451 |
|
6452 |
-
|
6453 |
-
|
6454 |
-
|
|
|
|
|
6455 |
$cron_data = $this->get_cron_data( $name );
|
6456 |
|
6457 |
return ( is_object( $cron_data ) && is_numeric( $cron_data->blog_id ) ) ?
|
@@ -6562,18 +6714,23 @@
|
|
6562 |
return 0;
|
6563 |
}
|
6564 |
|
6565 |
-
if ( $this->_is_network_active
|
6566 |
-
|
6567 |
-
$except_blog_id != $this->_storage->network_install_blog_id &&
|
6568 |
-
self::is_site_active( $this->_storage->network_install_blog_id )
|
6569 |
-
) {
|
6570 |
-
// Try to run cron from the main network blog.
|
6571 |
-
$install = $this->get_install_by_blog_id( $this->_storage->network_install_blog_id );
|
6572 |
|
6573 |
-
if (
|
6574 |
-
|
|
|
|
|
6575 |
) {
|
6576 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6577 |
}
|
6578 |
}
|
6579 |
|
@@ -6582,7 +6739,7 @@
|
|
6582 |
foreach ( $installs as $blog_id => $install ) {
|
6583 |
if ( $except_blog_id != $blog_id &&
|
6584 |
self::is_site_active( $blog_id ) &&
|
6585 |
-
|
6586 |
) {
|
6587 |
return $blog_id;
|
6588 |
}
|
@@ -6614,7 +6771,7 @@
|
|
6614 |
/**
|
6615 |
* @var FS_Site $install
|
6616 |
*/
|
6617 |
-
if ( $
|
6618 |
$clear_cron = false;
|
6619 |
break;
|
6620 |
}
|
@@ -6625,14 +6782,7 @@
|
|
6625 |
return;
|
6626 |
}
|
6627 |
|
6628 |
-
|
6629 |
-
* @var object $cron_data
|
6630 |
-
*/
|
6631 |
-
$cron_data = $this->get_cron_data( $name );
|
6632 |
-
|
6633 |
-
$cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
|
6634 |
-
$cron_data->blog_id :
|
6635 |
-
0;
|
6636 |
|
6637 |
$this->clear_cron_data( $name );
|
6638 |
|
@@ -6669,14 +6819,7 @@
|
|
6669 |
return false;
|
6670 |
}
|
6671 |
|
6672 |
-
|
6673 |
-
* @var object $cron_data
|
6674 |
-
*/
|
6675 |
-
$cron_data = $this->get_cron_data( $name );
|
6676 |
-
|
6677 |
-
$cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
|
6678 |
-
$cron_data->blog_id :
|
6679 |
-
0;
|
6680 |
|
6681 |
if ( 0 < $cron_blog_id ) {
|
6682 |
switch_to_blog( $cron_blog_id );
|
@@ -6787,7 +6930,7 @@
|
|
6787 |
} else {
|
6788 |
$installs = $this->get_blog_install_map();
|
6789 |
foreach ( $installs as $blog_id => $install ) {
|
6790 |
-
if ( $this->
|
6791 |
if ( ! isset( $users_2_blog_ids[ $install->user_id ] ) ) {
|
6792 |
$users_2_blog_ids[ $install->user_id ] = array();
|
6793 |
}
|
@@ -6852,8 +6995,6 @@
|
|
6852 |
* @since 1.1.7.3
|
6853 |
*/
|
6854 |
private function run_manual_sync() {
|
6855 |
-
self::require_pluggable_essentials();
|
6856 |
-
|
6857 |
if ( ! $this->is_user_admin() ) {
|
6858 |
return;
|
6859 |
}
|
@@ -6937,6 +7078,24 @@
|
|
6937 |
return $this->is_cron_on( 'sync' );
|
6938 |
}
|
6939 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6940 |
/**
|
6941 |
* @author Vova Feldman (@svovaf)
|
6942 |
* @since 1.1.7.3
|
@@ -7043,6 +7202,10 @@
|
|
7043 |
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
|
7044 |
*/
|
7045 |
private function schedule_install_sync( $except_blog_id = 0 ) {
|
|
|
|
|
|
|
|
|
7046 |
$this->schedule_cron( 'install_sync', 'install_sync', 'single', WP_FS__SCRIPT_START_TIME, false, $except_blog_id );
|
7047 |
}
|
7048 |
|
@@ -7131,13 +7294,20 @@
|
|
7131 |
/**
|
7132 |
* Show a notice that activation is currently pending.
|
7133 |
*
|
|
|
|
|
7134 |
* @author Vova Feldman (@svovaf)
|
7135 |
* @since 1.0.7
|
7136 |
*
|
7137 |
* @param bool|string $email
|
7138 |
* @param bool $is_pending_trial Since 1.2.1.5
|
|
|
7139 |
*/
|
7140 |
-
function _add_pending_activation_notice(
|
|
|
|
|
|
|
|
|
7141 |
if ( ! is_string( $email ) ) {
|
7142 |
$current_user = self::_get_current_wp_user();
|
7143 |
$email = $current_user->user_email;
|
@@ -7193,6 +7363,20 @@
|
|
7193 |
/**
|
7194 |
* Don't redirect if activating multiple plugins at once (bulk activation).
|
7195 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7196 |
} else if ( ! $is_migration ) {
|
7197 |
$this->_redirect_on_activation_hook();
|
7198 |
return;
|
@@ -7206,7 +7390,7 @@
|
|
7206 |
if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
|
7207 |
check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
|
7208 |
|
7209 |
-
$this->skip_connection(
|
7210 |
|
7211 |
fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) );
|
7212 |
}
|
@@ -7379,8 +7563,6 @@
|
|
7379 |
|
7380 |
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
7381 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
7382 |
-
|
7383 |
-
fs_enqueue_local_style( 'fs_connect', '/admin/connect.css' );
|
7384 |
}
|
7385 |
|
7386 |
/**
|
@@ -7416,14 +7598,14 @@
|
|
7416 |
<?php
|
7417 |
echo $this->apply_filters( 'optin_pointer_execute', "
|
7418 |
|
7419 |
-
|
7420 |
|
7421 |
-
|
7422 |
-
|
7423 |
-
|
7424 |
-
|
7425 |
|
7426 |
-
|
7427 |
}
|
7428 |
}
|
7429 |
});
|
@@ -7439,7 +7621,7 @@
|
|
7439 |
*
|
7440 |
* @return string
|
7441 |
*/
|
7442 |
-
function current_page_url() {
|
7443 |
$url = 'http';
|
7444 |
|
7445 |
if ( isset( $_SERVER["HTTPS"] ) ) {
|
@@ -7471,7 +7653,7 @@
|
|
7471 |
}
|
7472 |
|
7473 |
/* Events
|
7474 |
-
|
7475 |
/**
|
7476 |
* Delete site install from Database.
|
7477 |
*
|
@@ -7635,12 +7817,21 @@
|
|
7635 |
|
7636 |
/**
|
7637 |
* @author Leo Fajardo (@leorw)
|
7638 |
-
* @since 1.2.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7639 |
*
|
7640 |
-
* @return
|
7641 |
*/
|
7642 |
-
private function
|
7643 |
-
$slug = $this->get_previous_theme_slug();
|
7644 |
if ( false !== $slug && current_user_can( 'switch_themes' ) ) {
|
7645 |
$theme_instance = wp_get_theme( $slug );
|
7646 |
|
@@ -7737,6 +7928,10 @@
|
|
7737 |
( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ) :
|
7738 |
$this->is_premium();
|
7739 |
|
|
|
|
|
|
|
|
|
7740 |
$this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
|
7741 |
|
7742 |
if ( $this->is_plugin() ) {
|
@@ -7803,7 +7998,9 @@
|
|
7803 |
$plugin_version = $this->_storage->is_anonymous_ms['version'];
|
7804 |
$network = true;
|
7805 |
} else {
|
7806 |
-
$plugin_version = $this->_storage->is_anonymous
|
|
|
|
|
7807 |
$network = false;
|
7808 |
}
|
7809 |
|
@@ -7951,7 +8148,7 @@
|
|
7951 |
);
|
7952 |
} else {
|
7953 |
// Activate the license.
|
7954 |
-
$install = $this->
|
7955 |
'/',
|
7956 |
'put',
|
7957 |
array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
|
@@ -8610,6 +8807,20 @@
|
|
8610 |
$this->_is_anonymous = $is_anonymous;
|
8611 |
}
|
8612 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8613 |
/**
|
8614 |
* @author Vova Feldman (@svovaf)
|
8615 |
* @since 2.0.0
|
@@ -8626,9 +8837,17 @@
|
|
8626 |
* @uses Freemius::is_network_anonymous() to check if the super-admin network skipped.
|
8627 |
* @uses Freemius::is_network_delegated_connection() to check if the super-admin network delegated the connection to the site admins.
|
8628 |
*/
|
8629 |
-
function _after_new_blog_callback( $blog_id, $user_id, $domain, $path, $network_id, $meta ) {
|
8630 |
$this->_logger->entrance();
|
8631 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8632 |
if ( $this->is_premium() &&
|
8633 |
$this->is_network_connected() &&
|
8634 |
is_object( $this->_license ) &&
|
@@ -8662,9 +8881,13 @@
|
|
8662 |
}
|
8663 |
}
|
8664 |
|
|
|
|
|
8665 |
$this->switch_to_blog( $current_blog_id );
|
8666 |
|
8667 |
-
if ( is_object( $
|
|
|
|
|
8668 |
// Already connected (with or without a license), so no need to continue.
|
8669 |
return;
|
8670 |
}
|
@@ -8697,6 +8920,8 @@
|
|
8697 |
false
|
8698 |
);
|
8699 |
|
|
|
|
|
8700 |
$this->switch_to_blog( $current_blog_id );
|
8701 |
} else {
|
8702 |
/**
|
@@ -8707,8 +8932,8 @@
|
|
8707 |
$has_delegated_site = false;
|
8708 |
|
8709 |
$sites = self::get_sites();
|
8710 |
-
foreach ( $sites as $
|
8711 |
-
$blog_id = self::get_site_blog_id( $
|
8712 |
|
8713 |
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
8714 |
$has_delegated_site = true;
|
@@ -8722,19 +8947,74 @@
|
|
8722 |
$this->skip_site_connection( $blog_id );
|
8723 |
}
|
8724 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8725 |
}
|
8726 |
|
8727 |
/**
|
8728 |
* @author Vova Feldman (@svovaf)
|
8729 |
* @since 1.1.3
|
8730 |
*
|
8731 |
-
* @param bool|int $
|
8732 |
*/
|
8733 |
-
private function reset_anonymous_mode( $
|
8734 |
-
if ( true === $
|
8735 |
-
|
8736 |
-
|
8737 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8738 |
}
|
8739 |
|
8740 |
/**
|
@@ -8745,11 +9025,7 @@
|
|
8745 |
* @author Leo Fajardo (@leorw)
|
8746 |
* @since 1.2.2
|
8747 |
*/
|
8748 |
-
if ( ! $this->_is_network_active
|
8749 |
-
0 === $network_or_blog_id ||
|
8750 |
-
get_current_blog_id() == $network_or_blog_id ||
|
8751 |
-
( true === $network_or_blog_id && fs_is_network_admin() )
|
8752 |
-
) {
|
8753 |
$this->_is_anonymous = null;
|
8754 |
}
|
8755 |
}
|
@@ -8795,44 +9071,42 @@
|
|
8795 |
* @author Vova Feldman (@svovaf)
|
8796 |
* @since 1.1.1
|
8797 |
*
|
8798 |
-
* @param
|
8799 |
-
* @param bool $skip_all_network Since 2.0.0. If true, skip connection for all sites.
|
8800 |
*/
|
8801 |
-
function skip_connection( $
|
8802 |
$this->_logger->entrance();
|
8803 |
|
8804 |
$this->_admin_notices->remove_sticky( 'connect_account' );
|
8805 |
|
8806 |
-
if ( $
|
8807 |
$this->set_anonymous_mode( true, true );
|
8808 |
-
}
|
8809 |
|
8810 |
-
|
8811 |
-
|
8812 |
-
|
8813 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8814 |
|
8815 |
-
|
8816 |
-
$
|
|
|
8817 |
|
8818 |
-
|
8819 |
-
|
8820 |
-
$
|
8821 |
-
$this->skip_site_connection( $blog_id, false );
|
8822 |
-
$uids[] = $this->get_anonymous_id( $blog_id );
|
8823 |
-
}
|
8824 |
-
} else if ( ! empty( $sites ) ) {
|
8825 |
-
foreach ( $sites as $site ) {
|
8826 |
-
$uids[] = $site['uid'];
|
8827 |
-
$this->skip_site_connection( $site['blog_id'], false );
|
8828 |
}
|
8829 |
}
|
|
|
8830 |
|
8831 |
-
|
8832 |
-
|
8833 |
-
$this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
|
8834 |
-
'uids' => $uids,
|
8835 |
-
) );
|
8836 |
}
|
8837 |
|
8838 |
$this->network_upgrade_mode_completed();
|
@@ -8847,18 +9121,12 @@
|
|
8847 |
* @param int|null $blog_id
|
8848 |
* @param bool $send_skip
|
8849 |
*/
|
8850 |
-
private function skip_site_connection( $blog_id = null
|
8851 |
$this->_logger->entrance();
|
8852 |
|
8853 |
$this->_admin_notices->remove_sticky( 'connect_account', $blog_id );
|
8854 |
|
8855 |
$this->set_anonymous_mode( true, $blog_id );
|
8856 |
-
|
8857 |
-
if ( $send_skip ) {
|
8858 |
-
$this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
|
8859 |
-
'uids' => array( $this->get_anonymous_id( $blog_id ) ),
|
8860 |
-
) );
|
8861 |
-
}
|
8862 |
}
|
8863 |
|
8864 |
/**
|
@@ -9230,7 +9498,7 @@
|
|
9230 |
* @param string[] $override
|
9231 |
* @param bool $include_plugins Since 1.1.8 by default include plugin changes.
|
9232 |
* @param bool $include_themes Since 1.1.8 by default include plugin changes.
|
9233 |
-
* @param bool $include_blog_data Since 2.3.0 by default include the current blog's data (language,
|
9234 |
*
|
9235 |
* @return array
|
9236 |
*/
|
@@ -9240,7 +9508,10 @@
|
|
9240 |
$include_themes = true,
|
9241 |
$include_blog_data = true
|
9242 |
) {
|
9243 |
-
|
|
|
|
|
|
|
9244 |
if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
|
9245 |
/**
|
9246 |
* @since 1.1.8 Also send plugin updates.
|
@@ -9268,21 +9539,23 @@
|
|
9268 |
|
9269 |
$versions = $this->get_versions();
|
9270 |
|
9271 |
-
$blog_data =
|
9272 |
-
|
9273 |
-
|
9274 |
-
|
9275 |
-
|
9276 |
-
|
9277 |
-
|
9278 |
-
|
|
|
|
|
|
|
9279 |
|
9280 |
return array_merge( $versions, $blog_data, array(
|
9281 |
'version' => $this->get_plugin_version(),
|
9282 |
'is_premium' => $this->is_premium(),
|
9283 |
// Special params.
|
9284 |
'is_active' => true,
|
9285 |
-
'is_disconnected' => $this->is_tracking_prohibited(),
|
9286 |
'is_uninstalled' => false,
|
9287 |
), $override );
|
9288 |
}
|
@@ -9297,6 +9570,7 @@
|
|
9297 |
*
|
9298 |
* @param string[] string $override
|
9299 |
* @param bool $only_diff
|
|
|
9300 |
* @param bool $include_plugins Since 1.1.8 by default include plugin changes.
|
9301 |
* @param bool $include_themes Since 1.1.8 by default include plugin changes.
|
9302 |
*
|
@@ -9305,6 +9579,7 @@
|
|
9305 |
private function get_installs_data_for_api(
|
9306 |
array $override,
|
9307 |
$only_diff = false,
|
|
|
9308 |
$include_plugins = true,
|
9309 |
$include_themes = true
|
9310 |
) {
|
@@ -9342,6 +9617,10 @@
|
|
9342 |
|
9343 |
$sites = self::get_sites();
|
9344 |
|
|
|
|
|
|
|
|
|
9345 |
foreach ( $sites as $site ) {
|
9346 |
$blog_id = self::get_site_blog_id( $site );
|
9347 |
|
@@ -9353,19 +9632,64 @@
|
|
9353 |
continue;
|
9354 |
}
|
9355 |
|
9356 |
-
if ( ! $this->
|
9357 |
// Don't send updates regarding opted-out installs.
|
9358 |
continue;
|
9359 |
}
|
9360 |
|
9361 |
-
$install_data = $this->get_site_info( $site );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9362 |
|
9363 |
-
|
|
|
|
|
|
|
|
|
|
|
9364 |
|
9365 |
unset( $install_data['blog_id'] );
|
9366 |
unset( $install_data['uid'] );
|
|
|
|
|
9367 |
|
9368 |
-
$install_data['is_disconnected'] = $install->is_disconnected;
|
9369 |
$install_data['is_active'] = $this->is_active_for_site( $blog_id );
|
9370 |
$install_data['is_uninstalled'] = $install->is_uninstalled;
|
9371 |
|
@@ -9388,18 +9712,26 @@
|
|
9388 |
$is_common_diff_for_any_site = $is_common_diff_for_any_site || $is_common_diff;
|
9389 |
}
|
9390 |
|
9391 |
-
if ( ! empty( $install_data ) || $is_common_diff ) {
|
9392 |
// Add install ID and site unique ID.
|
9393 |
$install_data['id'] = $install->id;
|
9394 |
$install_data['uid'] = $uid;
|
|
|
9395 |
|
9396 |
-
$
|
|
|
|
|
9397 |
}
|
9398 |
}
|
9399 |
}
|
9400 |
|
9401 |
restore_current_blog();
|
9402 |
|
|
|
|
|
|
|
|
|
|
|
9403 |
if ( 0 < count( $installs_data ) && ( $is_common_diff_for_any_site || ! $only_diff ) ) {
|
9404 |
if ( ! $only_diff ) {
|
9405 |
$installs_data[] = $common;
|
@@ -9437,8 +9769,12 @@
|
|
9437 |
if ( ( is_bool( $install->{$p} ) || ! empty( $install->{$p} ) ) &&
|
9438 |
$install->{$p} != $v
|
9439 |
) {
|
9440 |
-
$
|
9441 |
-
|
|
|
|
|
|
|
|
|
9442 |
}
|
9443 |
} else {
|
9444 |
$special[ $p ] = $v;
|
@@ -9463,6 +9799,78 @@
|
|
9463 |
return $diff;
|
9464 |
}
|
9465 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9466 |
/**
|
9467 |
* Update install only if changed.
|
9468 |
*
|
@@ -9471,10 +9879,11 @@
|
|
9471 |
*
|
9472 |
* @param string[] string $override
|
9473 |
* @param bool $flush
|
|
|
9474 |
*
|
9475 |
* @return false|object|string
|
9476 |
*/
|
9477 |
-
private function send_install_update( $override = array(), $flush = false ) {
|
9478 |
$this->_logger->entrance();
|
9479 |
|
9480 |
$check_properties = $this->get_install_data_for_api( $override );
|
@@ -9485,7 +9894,6 @@
|
|
9485 |
$params = $this->get_install_diff_for_api( $check_properties, $this->_site, $override );
|
9486 |
}
|
9487 |
|
9488 |
-
$keepalive_only_update = false;
|
9489 |
if ( empty( $params ) ) {
|
9490 |
$keepalive_only_update = $this->should_send_keepalive_update();
|
9491 |
|
@@ -9500,10 +9908,9 @@
|
|
9500 |
}
|
9501 |
}
|
9502 |
|
9503 |
-
if (
|
9504 |
/**
|
9505 |
-
*
|
9506 |
-
* updates sent.
|
9507 |
*
|
9508 |
* @author Leo Fajardo (@leorw)
|
9509 |
* @since 2.2.3
|
@@ -9519,11 +9926,11 @@
|
|
9519 |
$this->set_keepalive_timestamp();
|
9520 |
|
9521 |
// Send updated values to FS.
|
9522 |
-
$site = $this->
|
9523 |
|
9524 |
-
if (
|
9525 |
/**
|
9526 |
-
*
|
9527 |
*
|
9528 |
* @author Leo Fajardo (@leorw)
|
9529 |
* @since 2.2.3
|
@@ -9545,37 +9952,29 @@
|
|
9545 |
*
|
9546 |
* @param string[] string $override
|
9547 |
* @param bool $flush
|
|
|
9548 |
*
|
9549 |
* @return false|object|string
|
9550 |
*/
|
9551 |
-
private function send_installs_update( $override = array(), $flush = false ) {
|
9552 |
$this->_logger->entrance();
|
9553 |
|
9554 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9555 |
|
9556 |
-
$
|
9557 |
-
if ( empty( $installs_data ) ) {
|
9558 |
-
/**
|
9559 |
-
* Pass `true` to use the network level storage since the update is for many installs.
|
9560 |
-
*
|
9561 |
-
* @author Leo Fajardo (@leorw)
|
9562 |
-
* @since 2.2.3
|
9563 |
-
*/
|
9564 |
-
$keepalive_only_update = $this->should_send_keepalive_update( true );
|
9565 |
|
9566 |
-
|
9567 |
-
|
9568 |
-
* There are no updates to send including keepalive.
|
9569 |
-
*
|
9570 |
-
* @author Leo Fajardo (@leorw)
|
9571 |
-
* @since 2.2.3
|
9572 |
-
*/
|
9573 |
-
return false;
|
9574 |
-
}
|
9575 |
}
|
9576 |
|
9577 |
-
if (
|
9578 |
-
// Update last install sync timestamp
|
9579 |
$this->set_cron_execution_timestamp( 'install_sync' );
|
9580 |
}
|
9581 |
|
@@ -9590,8 +9989,8 @@
|
|
9590 |
// Send updated values to FS.
|
9591 |
$result = $this->get_api_user_scope()->call( "/plugins/{$this->_plugin->id}/installs.json", 'put', $installs_data );
|
9592 |
|
9593 |
-
if (
|
9594 |
-
// I successfully sent
|
9595 |
$this->clear_install_sync_cron();
|
9596 |
}
|
9597 |
|
@@ -9641,10 +10040,10 @@
|
|
9641 |
* @param string[] string $override
|
9642 |
* @param bool $flush
|
9643 |
*/
|
9644 |
-
|
9645 |
$this->_logger->entrance();
|
9646 |
|
9647 |
-
$site = $this->send_install_update( $override, $flush );
|
9648 |
|
9649 |
if ( false === $site ) {
|
9650 |
// No sync required.
|
@@ -9673,7 +10072,7 @@
|
|
9673 |
private function sync_installs( $override = array(), $flush = false ) {
|
9674 |
$this->_logger->entrance();
|
9675 |
|
9676 |
-
$result = $this->send_installs_update( $override, $flush );
|
9677 |
|
9678 |
if ( false === $result ) {
|
9679 |
// No sync required.
|
@@ -9828,8 +10227,8 @@
|
|
9828 |
// Send uninstall event.
|
9829 |
$this->send_installs_update( $params );
|
9830 |
} else {
|
9831 |
-
// Send uninstall event.
|
9832 |
-
$this->
|
9833 |
}
|
9834 |
}
|
9835 |
|
@@ -9926,7 +10325,17 @@
|
|
9926 |
return;
|
9927 |
}
|
9928 |
|
9929 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9930 |
|
9931 |
$fs->do_action( 'after_uninstall' );
|
9932 |
}
|
@@ -10037,7 +10446,7 @@
|
|
10037 |
* @return string
|
10038 |
*/
|
10039 |
function get_premium_slug() {
|
10040 |
-
return is_object( $this->_plugin ) ?
|
10041 |
$this->_plugin->premium_slug :
|
10042 |
"{$this->_slug}-premium";
|
10043 |
}
|
@@ -10090,6 +10499,28 @@
|
|
10090 |
null;
|
10091 |
}
|
10092 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10093 |
/**
|
10094 |
* @author Vova Feldman (@svovaf)
|
10095 |
* @since 1.2.1.5
|
@@ -10134,7 +10565,7 @@
|
|
10134 |
function get_eula_url() {
|
10135 |
return $this->apply_filters(
|
10136 |
'eula_url',
|
10137 |
-
"https://freemius.com/
|
10138 |
);
|
10139 |
}
|
10140 |
|
@@ -10322,7 +10753,7 @@
|
|
10322 |
#endregion ------------------------------------------------------------------
|
10323 |
|
10324 |
/* Account
|
10325 |
-
|
10326 |
|
10327 |
/**
|
10328 |
* Find plugin's slug by plugin's basename.
|
@@ -10386,9 +10817,14 @@
|
|
10386 |
*/
|
10387 |
private static function get_all_sites(
|
10388 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN,
|
10389 |
-
$blog_id = null
|
|
|
10390 |
) {
|
10391 |
-
$sites = self::get_account_option(
|
|
|
|
|
|
|
|
|
10392 |
|
10393 |
if ( ! is_array( $sites ) ) {
|
10394 |
$sites = array();
|
@@ -10748,10 +11184,20 @@
|
|
10748 |
*
|
10749 |
* @author Vova Feldman (@svovaf)
|
10750 |
* @since 1.0.1
|
|
|
|
|
|
|
10751 |
* @return bool
|
10752 |
*/
|
10753 |
-
function is_registered() {
|
10754 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10755 |
}
|
10756 |
|
10757 |
/**
|
@@ -10762,8 +11208,34 @@
|
|
10762 |
*
|
10763 |
* @return bool
|
10764 |
*/
|
10765 |
-
function is_tracking_allowed() {
|
10766 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10767 |
}
|
10768 |
|
10769 |
/**
|
@@ -10799,13 +11271,59 @@
|
|
10799 |
}
|
10800 |
|
10801 |
/**
|
10802 |
-
* @author Vova Feldman (@svovaf)
|
10803 |
-
* @since 1.0.3
|
10804 |
-
*
|
10805 |
-
* @return FS_Site
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10806 |
*/
|
10807 |
-
function
|
10808 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10809 |
}
|
10810 |
|
10811 |
/**
|
@@ -12089,7 +12607,7 @@
|
|
12089 |
} else {
|
12090 |
$url = is_object( $site ) ?
|
12091 |
$site->siteurl :
|
12092 |
-
|
12093 |
|
12094 |
$disconnected_site_ids[] = $blog_id;
|
12095 |
}
|
@@ -12462,7 +12980,21 @@
|
|
12462 |
} else if ( $is_whitelabeled_flag ) {
|
12463 |
$is_whitelabeled = true;
|
12464 |
} else {
|
12465 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12466 |
$installed_addons = $this->get_installed_addons();
|
12467 |
foreach ( $installed_addons as $fs_addon ) {
|
12468 |
$addon_ids[] = $fs_addon->get_id();
|
@@ -12891,6 +13423,75 @@
|
|
12891 |
fs_require_template( 'forms/resend-key.php', $vars );
|
12892 |
}
|
12893 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12894 |
/**
|
12895 |
* Returns a collection of IDs of installs that are associated with the context product and its add-ons, and activated with foreign licenses.
|
12896 |
*
|
@@ -13098,10 +13699,15 @@
|
|
13098 |
( $is_network_admin && $this->is_network_active() && ! $this->is_network_delegated_connection() ) ||
|
13099 |
( ! $is_network_admin && ( ! $this->is_network_active() || $this->is_delegated_connection() ) )
|
13100 |
) {
|
13101 |
-
|
13102 |
-
|
13103 |
-
|
13104 |
-
|
|
|
|
|
|
|
|
|
|
|
13105 |
}
|
13106 |
}
|
13107 |
|
@@ -13273,7 +13879,7 @@
|
|
13273 |
self::shoot_ajax_failure();
|
13274 |
}
|
13275 |
|
13276 |
-
$site = $this->
|
13277 |
'',
|
13278 |
'put',
|
13279 |
array(
|
@@ -13326,7 +13932,8 @@
|
|
13326 |
fs_request_get( 'blog_id', null ),
|
13327 |
fs_request_get( 'module_id', null, 'post' ),
|
13328 |
fs_request_get( 'user_id', null ),
|
13329 |
-
fs_request_get_bool( 'is_extensions_tracking_allowed', null )
|
|
|
13330 |
);
|
13331 |
|
13332 |
if (
|
@@ -13571,6 +14178,9 @@
|
|
13571 |
* @param null|int $blog_id
|
13572 |
* @param null|number $plugin_id
|
13573 |
* @param null|number $license_owner_id
|
|
|
|
|
|
|
13574 |
*
|
13575 |
* @return array {
|
13576 |
* @var bool $success
|
@@ -13585,7 +14195,8 @@
|
|
13585 |
$blog_id = null,
|
13586 |
$plugin_id = null,
|
13587 |
$license_owner_id = null,
|
13588 |
-
$is_extensions_tracking_allowed = null
|
|
|
13589 |
) {
|
13590 |
$this->_logger->entrance();
|
13591 |
|
@@ -13605,7 +14216,10 @@
|
|
13605 |
$this :
|
13606 |
$this->get_addon_instance( $plugin_id );
|
13607 |
|
13608 |
-
$this->
|
|
|
|
|
|
|
13609 |
|
13610 |
$error = false;
|
13611 |
$next_page = false;
|
@@ -13770,8 +14384,8 @@
|
|
13770 |
}
|
13771 |
}
|
13772 |
|
13773 |
-
$all_sites
|
13774 |
-
$
|
13775 |
|
13776 |
/**
|
13777 |
* Check if there are any sites that are not connected, skipped, nor delegated. For every site that falls into that category, if the product is freemium, skip the connection. If the product is premium only, delegate the connection to the site administrator.
|
@@ -13801,14 +14415,14 @@
|
|
13801 |
continue;
|
13802 |
}
|
13803 |
|
13804 |
-
$
|
13805 |
}
|
13806 |
|
13807 |
-
if ( ! empty( $
|
13808 |
if ( $fs->is_freemium() && $fs->is_enable_anonymous() ) {
|
13809 |
-
$fs->skip_connection( $
|
13810 |
} else {
|
13811 |
-
$fs->delegate_connection( $
|
13812 |
}
|
13813 |
}
|
13814 |
}
|
@@ -13886,7 +14500,7 @@
|
|
13886 |
|
13887 |
$addon_info = $fs->_get_addon_info( $addon_id, $is_installed );
|
13888 |
|
13889 |
-
if ( ! $addon_info['is_connected'] ) {
|
13890 |
// Add-on is not associated with an install entity.
|
13891 |
continue;
|
13892 |
}
|
@@ -13944,11 +14558,11 @@
|
|
13944 |
$this->delegate_connection();
|
13945 |
} else {
|
13946 |
if ( ! empty( $sites_by_action['delegate'] ) ) {
|
13947 |
-
$this->delegate_connection( $sites_by_action['delegate'] );
|
13948 |
}
|
13949 |
|
13950 |
if ( ! empty( $sites_by_action['skip'] ) ) {
|
13951 |
-
$this->skip_connection( $sites_by_action['skip'] );
|
13952 |
}
|
13953 |
|
13954 |
if ( empty( $sites_by_action['allow'] ) ) {
|
@@ -14266,15 +14880,37 @@
|
|
14266 |
return $this->_plugin->has_affiliate_program();
|
14267 |
}
|
14268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14269 |
/**
|
14270 |
* @author Leo Fajardo (@leorw)
|
14271 |
* @since 1.2.4
|
14272 |
*/
|
14273 |
private function fetch_affiliate_terms() {
|
14274 |
if ( ! is_object( $this->plugin_affiliate_terms ) ) {
|
14275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14276 |
$affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation', false );
|
14277 |
|
|
|
|
|
|
|
14278 |
if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
|
14279 |
return;
|
14280 |
}
|
@@ -14292,8 +14928,10 @@
|
|
14292 |
$application_data = $this->_storage->affiliate_application_data;
|
14293 |
$flush = ( ! isset( $application_data['status'] ) || 'pending' === $application_data['status'] );
|
14294 |
|
|
|
|
|
14295 |
$users_api = $this->get_api_user_scope();
|
14296 |
-
$result = $users_api->get( "/plugins/{$
|
14297 |
if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
|
14298 |
if ( ! empty( $result->affiliates ) ) {
|
14299 |
$affiliate = new FS_Affiliate( $result->affiliates[0] );
|
@@ -14393,15 +15031,17 @@
|
|
14393 |
var_export( $next_page, true )
|
14394 |
);
|
14395 |
} else if ( $this->is_pending_activation() ) {
|
14396 |
-
self::shoot_ajax_failure( $this->get_text_inline( 'Account is pending activation.', 'account-is-pending-activation' ) );
|
14397 |
}
|
14398 |
}
|
14399 |
|
14400 |
$this->fetch_affiliate_terms();
|
14401 |
|
|
|
|
|
14402 |
$api = $this->get_api_user_scope();
|
14403 |
$result = $api->call(
|
14404 |
-
( "/plugins/{$
|
14405 |
'post',
|
14406 |
$affiliate
|
14407 |
);
|
@@ -14863,6 +15503,16 @@
|
|
14863 |
return ( defined( 'DOING_CRON' ) && DOING_CRON );
|
14864 |
}
|
14865 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14866 |
/**
|
14867 |
* Check if a real user is visiting the admin dashboard.
|
14868 |
*
|
@@ -14876,7 +15526,7 @@
|
|
14876 |
is_admin() &&
|
14877 |
! self::is_ajax() &&
|
14878 |
! self::is_cron() &&
|
14879 |
-
|
14880 |
);
|
14881 |
}
|
14882 |
|
@@ -15028,20 +15678,20 @@
|
|
15028 |
* @author Leo Fajardo (@leorw)
|
15029 |
* @since 2.0.0
|
15030 |
*
|
15031 |
-
* @param
|
15032 |
*/
|
15033 |
-
private function delegate_connection( $
|
15034 |
$this->_logger->entrance();
|
15035 |
|
15036 |
$this->_admin_notices->remove_sticky( 'connect_account' );
|
15037 |
|
15038 |
-
if (
|
15039 |
// All sites delegation.
|
15040 |
-
$this->_storage->store( 'is_delegated_connection', true, true
|
15041 |
} else {
|
15042 |
// Specified sites delegation.
|
15043 |
-
foreach ( $
|
15044 |
-
$this->delegate_site_connection( $
|
15045 |
}
|
15046 |
}
|
15047 |
|
@@ -15057,7 +15707,7 @@
|
|
15057 |
* @param int $blog_id
|
15058 |
*/
|
15059 |
private function delegate_site_connection( $blog_id ) {
|
15060 |
-
$this->_storage->store( 'is_delegated_connection', true, $blog_id
|
15061 |
}
|
15062 |
|
15063 |
/**
|
@@ -15097,7 +15747,7 @@
|
|
15097 |
}
|
15098 |
|
15099 |
/**
|
15100 |
-
* Check if delegated the connection. When running within the
|
15101 |
* and haven't specified the blog ID, checks if network level delegated. If running
|
15102 |
* within a site admin or specified a blog ID, check if delegated the connection for
|
15103 |
* the current context site.
|
@@ -15157,12 +15807,17 @@
|
|
15157 |
}
|
15158 |
|
15159 |
/**
|
|
|
|
|
15160 |
* @author Leo Fajardo (@leorw)
|
15161 |
* @since 2.0.0
|
15162 |
*
|
|
|
|
|
|
|
15163 |
* @return array Active & public sites collection.
|
15164 |
*/
|
15165 |
-
static function get_sites() {
|
15166 |
if ( ! is_multisite() ) {
|
15167 |
return array();
|
15168 |
}
|
@@ -15184,27 +15839,11 @@
|
|
15184 |
'mature' => 0,
|
15185 |
'spam' => 0,
|
15186 |
'deleted' => 0,
|
|
|
|
|
15187 |
);
|
15188 |
|
15189 |
-
|
15190 |
-
// For WP 4.6 and above.
|
15191 |
-
return get_sites( $args );
|
15192 |
-
} else if ( function_exists( 'wp_' . 'get_sites' ) ) {
|
15193 |
-
// For WP 3.7 to WP 4.5.
|
15194 |
-
/**
|
15195 |
-
* This is a hack suggested previously proposed by the TRT. Our SDK is compliant with older WP versions and we'd like to keep it that way.
|
15196 |
-
*
|
15197 |
-
* @todo Remove this hack once this false-positive error is removed from the Theme Sniffer.
|
15198 |
-
*
|
15199 |
-
* @since 2.3.3
|
15200 |
-
* @author Vova Feldman (@svovaf)
|
15201 |
-
*/
|
15202 |
-
$fn = 'wp_' . 'get_sites';
|
15203 |
-
return $fn( $args );
|
15204 |
-
} else {
|
15205 |
-
// For WP 3.6 and below.
|
15206 |
-
return get_blog_list( 0, 'all' );
|
15207 |
-
}
|
15208 |
}
|
15209 |
|
15210 |
/**
|
@@ -15253,7 +15892,7 @@
|
|
15253 |
$address_to_blog_map = array();
|
15254 |
foreach ( $sites as $site ) {
|
15255 |
$blog_id = self::get_site_blog_id( $site );
|
15256 |
-
$address =
|
15257 |
$address_to_blog_map[ $address ] = $blog_id;
|
15258 |
}
|
15259 |
|
@@ -15289,6 +15928,42 @@
|
|
15289 |
return $install_map;
|
15290 |
}
|
15291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15292 |
/**
|
15293 |
* Gets a map of module IDs that the given user has opted-in to.
|
15294 |
*
|
@@ -15373,11 +16048,16 @@
|
|
15373 |
*
|
15374 |
* @param int $blog_id
|
15375 |
* @param FS_Site $install
|
|
|
15376 |
*
|
15377 |
* @return bool Since 2.3.1 returns if a switch was made.
|
15378 |
*/
|
15379 |
-
function switch_to_blog( $blog_id, FS_Site $install = null ) {
|
15380 |
-
if ( ! is_numeric( $blog_id )
|
|
|
|
|
|
|
|
|
15381 |
return false;
|
15382 |
}
|
15383 |
|
@@ -15441,7 +16121,7 @@
|
|
15441 |
unset( $this->_site_api );
|
15442 |
unset( $this->_user_api );
|
15443 |
|
15444 |
-
return
|
15445 |
}
|
15446 |
|
15447 |
/**
|
@@ -15470,21 +16150,41 @@
|
|
15470 |
$site['blog_id'] );
|
15471 |
}
|
15472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15473 |
/**
|
15474 |
* @author Leo Fajardo (@leorw)
|
15475 |
* @since 2.0.0
|
15476 |
*
|
15477 |
* @param array|WP_Site|null $site
|
|
|
15478 |
*
|
15479 |
* @return array
|
15480 |
*/
|
15481 |
-
function get_site_info( $site = null ) {
|
15482 |
$this->_logger->entrance();
|
15483 |
|
15484 |
$switched = false;
|
15485 |
|
|
|
|
|
15486 |
if ( is_null( $site ) ) {
|
15487 |
-
$url =
|
15488 |
$name = get_bloginfo( 'name' );
|
15489 |
$blog_id = null;
|
15490 |
} else {
|
@@ -15496,26 +16196,44 @@
|
|
15496 |
}
|
15497 |
|
15498 |
if ( $site instanceof WP_Site ) {
|
15499 |
-
$url
|
15500 |
-
$name
|
|
|
15501 |
} else {
|
15502 |
-
$url =
|
15503 |
$name = get_bloginfo( 'name' );
|
15504 |
}
|
15505 |
}
|
15506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15507 |
$info = array(
|
15508 |
-
'uid'
|
15509 |
-
'url'
|
15510 |
-
'title' => $name,
|
15511 |
-
'language' => get_bloginfo( 'language' ),
|
15512 |
-
'charset' => get_bloginfo( 'charset' ),
|
15513 |
);
|
15514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15515 |
if ( is_numeric( $blog_id ) ) {
|
15516 |
$info['blog_id'] = $blog_id;
|
15517 |
}
|
15518 |
|
|
|
|
|
|
|
|
|
15519 |
if ( $switched ) {
|
15520 |
restore_current_blog();
|
15521 |
}
|
@@ -15738,6 +16456,10 @@
|
|
15738 |
}
|
15739 |
}
|
15740 |
|
|
|
|
|
|
|
|
|
15741 |
if ( $this->is_sync_cron_scheduled() &&
|
15742 |
$context_blog_id == $this->get_sync_cron_blog_id()
|
15743 |
) {
|
@@ -15771,6 +16493,10 @@
|
|
15771 |
|
15772 |
$this->update_multisite_data_after_site_deactivation( $context_blog_id );
|
15773 |
|
|
|
|
|
|
|
|
|
15774 |
$current_blog_id = get_current_blog_id();
|
15775 |
|
15776 |
$this->switch_to_blog( $context_blog_id );
|
@@ -15804,6 +16530,10 @@
|
|
15804 |
|
15805 |
$this->update_multisite_data_after_site_deactivation( $context_blog_id );
|
15806 |
|
|
|
|
|
|
|
|
|
15807 |
$current_blog_id = get_current_blog_id();
|
15808 |
|
15809 |
$this->switch_to_blog( $context_blog_id );
|
@@ -15821,6 +16551,20 @@
|
|
15821 |
$this->switch_to_blog( $current_blog_id );
|
15822 |
}
|
15823 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15824 |
/**
|
15825 |
* Executed after site re-activation.
|
15826 |
*
|
@@ -15935,9 +16679,17 @@
|
|
15935 |
* @return bool
|
15936 |
*/
|
15937 |
function is_product_settings_page() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15938 |
return fs_starts_with(
|
15939 |
-
|
15940 |
-
$
|
|
|
15941 |
);
|
15942 |
}
|
15943 |
|
@@ -16017,10 +16769,11 @@
|
|
16017 |
*
|
16018 |
* @param bool|string $topic
|
16019 |
* @param bool|string $message
|
|
|
16020 |
*
|
16021 |
* @return string
|
16022 |
*/
|
16023 |
-
function contact_url( $topic = false, $message = false ) {
|
16024 |
$params = array();
|
16025 |
if ( is_string( $topic ) ) {
|
16026 |
$params['topic'] = $topic;
|
@@ -16029,6 +16782,10 @@
|
|
16029 |
$params['message'] = $message;
|
16030 |
}
|
16031 |
|
|
|
|
|
|
|
|
|
16032 |
if ( $this->is_addon() ) {
|
16033 |
$params['addon_id'] = $this->get_id();
|
16034 |
|
@@ -16067,7 +16824,7 @@
|
|
16067 |
}
|
16068 |
|
16069 |
/* Logger
|
16070 |
-
|
16071 |
/**
|
16072 |
* @param string $id
|
16073 |
* @param bool $prefix_slug
|
@@ -16092,7 +16849,7 @@
|
|
16092 |
}
|
16093 |
|
16094 |
/* Security
|
16095 |
-
|
16096 |
private static function _encrypt( $str ) {
|
16097 |
if ( is_null( $str ) ) {
|
16098 |
return null;
|
@@ -16312,20 +17069,6 @@
|
|
16312 |
) {
|
16313 |
// Load site.
|
16314 |
$this->_site = $site;
|
16315 |
-
|
16316 |
-
// Load plans.
|
16317 |
-
$this->_plans = $plans[ $this->_slug ];
|
16318 |
-
if ( ! is_array( $this->_plans ) || empty( $this->_plans ) ) {
|
16319 |
-
$this->_sync_plans();
|
16320 |
-
} else {
|
16321 |
-
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
16322 |
-
if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) {
|
16323 |
-
$this->_plans[ $i ] = self::decrypt_entity( $this->_plans[ $i ] );
|
16324 |
-
} else {
|
16325 |
-
unset( $this->_plans[ $i ] );
|
16326 |
-
}
|
16327 |
-
}
|
16328 |
-
}
|
16329 |
}
|
16330 |
|
16331 |
$user = null;
|
@@ -16354,7 +17097,30 @@
|
|
16354 |
/**
|
16355 |
* This is a special fault tolerance mechanism to handle a scenario that the user data is missing.
|
16356 |
*/
|
16357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16358 |
}
|
16359 |
|
16360 |
$this->_user = ( $user instanceof FS_User ) ?
|
@@ -16368,6 +17134,23 @@
|
|
16368 |
}
|
16369 |
|
16370 |
if ( is_object( $this->_site ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16371 |
$this->_license = $this->_get_license_by_id( $this->_site->license_id );
|
16372 |
|
16373 |
if ( $this->_site->version != $this->get_plugin_version() ) {
|
@@ -16386,6 +17169,15 @@
|
|
16386 |
if ( $this->is_theme() ) {
|
16387 |
$this->_register_account_hooks();
|
16388 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16389 |
}
|
16390 |
|
16391 |
/**
|
@@ -16465,17 +17257,129 @@
|
|
16465 |
*/
|
16466 |
private function get_versions() {
|
16467 |
$versions = array();
|
16468 |
-
$versions['
|
16469 |
-
|
16470 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16471 |
|
16472 |
-
|
16473 |
-
|
16474 |
-
|
16475 |
-
|
|
|
|
|
|
|
16476 |
}
|
16477 |
|
16478 |
-
|
377 |
const REASON_DIDNT_WORK_AS_EXPECTED = 14;
|
378 |
const REASON_TEMPORARY_DEACTIVATION = 15;
|
379 |
|
380 |
+
#endregion
|
381 |
+
|
382 |
/**
|
383 |
* @author Leo Fajardo (@leorw)
|
384 |
* @since 2.3.1
|
394 |
*/
|
395 |
private $_pricing_js_path = null;
|
396 |
|
397 |
+
const VERSION_MAX_CHARS = 16;
|
398 |
+
const LANGUAGE_MAX_CHARS = 8;
|
399 |
|
400 |
/* Ctor
|
401 |
------------------------------------------------------------------------------------------------------------------*/
|
411 |
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
412 |
*/
|
413 |
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
414 |
+
$main_file = false;
|
415 |
+
|
416 |
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
417 |
+
$main_file = $this->store_id_slug_type_path_map( $module_id, $slug );
|
418 |
}
|
419 |
|
420 |
$this->_module_id = $module_id;
|
429 |
|
430 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
431 |
|
432 |
+
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init, $main_file );
|
433 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
434 |
$this->_plugin_basename = $this->get_plugin_basename();
|
435 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
524 |
* @author Leo Fajardo (@leorw)
|
525 |
* @since 1.2.2
|
526 |
*/
|
527 |
+
( is_object( $this->_plugin ) && isset( $this->_plugin->title ) ?
|
528 |
+
$this->_plugin->title :
|
529 |
+
$this->get_plugin_name()
|
530 |
+
),
|
531 |
$this->get_unique_affix()
|
532 |
);
|
533 |
|
941 |
* @param string $sdk_version
|
942 |
*/
|
943 |
function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
|
|
|
|
|
|
|
944 |
if ( empty( $sdk_prev_version ) ) {
|
945 |
return;
|
946 |
}
|
947 |
|
948 |
+
if (
|
949 |
+
version_compare( $sdk_prev_version, '2.5.1', '<' ) &&
|
950 |
+
version_compare( $sdk_version, '2.5.1', '>=' )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
) {
|
952 |
+
if ( $this->is_registered( true ) ) {
|
953 |
+
/**
|
954 |
+
* Migrate to new permissions layer.
|
955 |
+
*/
|
956 |
+
require_once WP_FS__DIR_INCLUDES . '/supplements/fs-migration-2.5.1.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
957 |
|
958 |
+
$install_by_blog_id = is_multisite() ?
|
959 |
+
$this->get_blog_install_map() :
|
960 |
+
array( 0 => $this->_site );
|
961 |
|
962 |
+
fs_migrate_251( $this, $install_by_blog_id );
|
963 |
}
|
964 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
965 |
}
|
966 |
|
967 |
/**
|
1012 |
}
|
1013 |
}
|
1014 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1015 |
/**
|
1016 |
* @author Vova Feldman (@svovaf)
|
1017 |
* @since 1.2.2.7
|
1348 |
}
|
1349 |
}
|
1350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1351 |
/**
|
1352 |
* Opens the support forum subemenu item in a new browser page.
|
1353 |
*
|
1458 |
}
|
1459 |
|
1460 |
if ( $this->is_plugin() ) {
|
1461 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.1', '<' ) ) {
|
1462 |
add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
|
1463 |
+
} else {
|
1464 |
+
add_action( 'wp_initialize_site', array( $this, '_after_wp_initialize_site_callback' ), 11, 2 );
|
1465 |
}
|
1466 |
|
1467 |
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
1471 |
add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1472 |
add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1473 |
add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1474 |
+
|
1475 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.1', '<' ) ) {
|
1476 |
+
add_action( 'deleted_blog', array( $this, '_after_site_deleted_callback' ), 10, 2 );
|
1477 |
+
} else {
|
1478 |
+
add_action( 'wp_delete_site', array( $this, '_after_wpsite_deleted_callback' ) );
|
1479 |
+
}
|
1480 |
|
1481 |
add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1482 |
add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1501 |
add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
|
1502 |
add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
|
1503 |
add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
|
1504 |
+
add_action( 'admin_init', array( &$this, '_add_email_address_update_option' ) );
|
1505 |
|
1506 |
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1507 |
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
1873 |
return;
|
1874 |
}
|
1875 |
|
1876 |
+
if (
|
1877 |
+
( self::is_plugins_page() && $this->is_plugin() ) ||
|
1878 |
+
( self::is_themes_page() && $this->is_theme() ) ||
|
1879 |
+
fs_request_is_action_secure( $this->get_unique_affix() . '_reconnect' )
|
1880 |
+
) {
|
1881 |
+
$this->_add_tracking_links();
|
1882 |
+
}
|
1883 |
|
1884 |
if ( self::is_plugins_page() && $this->is_plugin() ) {
|
1885 |
$this->hook_plugin_action_links();
|
1925 |
/**
|
1926 |
* Leverage backtrace to find caller plugin file path.
|
1927 |
*
|
1928 |
+
* @param bool $is_init Is initiation sequence.
|
1929 |
+
* @param string $main_file Since 2.5.0 expects the module's main file path to potentially purge the cached path.
|
|
|
|
|
1930 |
*
|
1931 |
* @return string
|
1932 |
+
* @since 1.0.6
|
1933 |
+
*
|
1934 |
+
* @author Vova Feldman (@svovaf)
|
1935 |
*/
|
1936 |
+
private function _find_caller_plugin_file( $is_init = false, $main_file = '' ) {
|
1937 |
// Try to load the cached value of the file path.
|
1938 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
1939 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
1940 |
if ( ! empty( $plugin_main_file->path ) ) {
|
1941 |
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
1942 |
if ( file_exists( $absolute_path ) ) {
|
1943 |
+
if ( $is_init && $absolute_path !== $this->get_absolute_path( $main_file ) ) {
|
1944 |
+
// Update cached path if not matching the actual path.
|
1945 |
+
$plugin_main_file->path = $main_file;
|
1946 |
+
$this->_storage->plugin_main_file = $plugin_main_file;
|
1947 |
+
}
|
1948 |
+
|
1949 |
return $absolute_path;
|
1950 |
}
|
1951 |
}
|
1986 |
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
1987 |
*/
|
1988 |
// Find caller module.
|
|
|
1989 |
$this->_storage->plugin_main_file = (object) array(
|
1990 |
+
'path' => $main_file,
|
1991 |
);
|
1992 |
|
1993 |
+
return $this->get_absolute_path( $main_file );
|
1994 |
}
|
1995 |
|
1996 |
/**
|
2052 |
* @param number $module_id
|
2053 |
* @param string $slug
|
2054 |
*
|
2055 |
+
* @return string Since 2.5.0 return the module's main file path.
|
2056 |
+
*
|
2057 |
* @since 1.2.2
|
2058 |
*/
|
2059 |
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
2075 |
$store_option = true;
|
2076 |
}
|
2077 |
|
2078 |
+
$find_caller = empty( $id_slug_type_path_map[ $module_id ]['path'] );
|
2079 |
+
|
2080 |
+
if ( ! $find_caller ) {
|
2081 |
+
/**
|
2082 |
+
* This verification is for cases when suddenly the same module
|
2083 |
+
* is installed but with a different folder name.
|
2084 |
+
*
|
2085 |
+
* @author Vova Feldman (@svovaf)
|
2086 |
+
* @since 1.2.3
|
2087 |
+
*/
|
2088 |
+
$find_caller = ! file_exists( $this->get_absolute_path(
|
2089 |
+
$id_slug_type_path_map[ $module_id ]['path'],
|
2090 |
+
$id_slug_type_path_map[ $module_id ]['type']
|
2091 |
+
) );
|
2092 |
+
}
|
2093 |
+
|
2094 |
+
foreach ( $id_slug_type_path_map as $id => $data ) {
|
2095 |
+
if ( empty( $id ) ) {
|
2096 |
+
// Remove maps with empty module ID.
|
2097 |
+
unset( $id_slug_type_path_map[ $id ] );
|
2098 |
+
$store_option = true;
|
2099 |
+
continue;
|
2100 |
+
}
|
2101 |
+
|
2102 |
+
/**
|
2103 |
+
* If the module's main file path is identical to the main file path of another module then it means that the cached path of the current module or the other one with the same path is wrong, and therefore, we need to recalculate those paths.
|
2104 |
+
*
|
2105 |
+
* @author Vova Feldman (@svovaf)
|
2106 |
+
* @since 2.5.0
|
2107 |
+
*/
|
2108 |
+
if ( ! $find_caller ) {
|
2109 |
+
if ( $id == $module_id ) {
|
2110 |
+
continue;
|
2111 |
+
}
|
2112 |
+
|
2113 |
+
if (
|
2114 |
+
isset( $data['path'] ) &&
|
2115 |
+
$data['path'] === $id_slug_type_path_map[ $module_id ]['path']
|
2116 |
+
) {
|
2117 |
+
$find_caller = true;
|
2118 |
+
}
|
2119 |
+
}
|
2120 |
+
}
|
2121 |
+
|
2122 |
+
if ( $find_caller ) {
|
2123 |
+
$caller_main_file_and_type = $this->get_caller_main_file_and_type( $module_id );
|
2124 |
|
2125 |
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
2126 |
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
2131 |
if ( $store_option ) {
|
2132 |
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
2133 |
}
|
2134 |
+
|
2135 |
+
return $id_slug_type_path_map[ $module_id ]['path'];
|
2136 |
}
|
2137 |
|
2138 |
/**
|
2146 |
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
2147 |
* SDK an internal file instead of directly from functions.php.
|
2148 |
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
2149 |
+
*
|
2150 |
+
* @param number $module_id @since 2.5.0
|
2151 |
*/
|
2152 |
+
private function get_caller_main_file_and_type( $module_id ) {
|
2153 |
self::require_plugin_essentials();
|
2154 |
|
2155 |
$all_plugins = fs_get_plugins( true );
|
2288 |
}
|
2289 |
}
|
2290 |
|
2291 |
+
$caller_main_file_and_type = (object) array(
|
2292 |
'module_type' => $module_type,
|
2293 |
'path' => $caller_file_candidate
|
2294 |
);
|
2295 |
+
|
2296 |
+
return apply_filters( "fs_{$module_id}_caller_main_file_and_type", $caller_main_file_and_type );
|
2297 |
}
|
2298 |
|
2299 |
#----------------------------------------------------------------------------------
|
2310 |
* @since 1.1.2
|
2311 |
*/
|
2312 |
function _add_deactivation_feedback_dialog_box() {
|
2313 |
+
if (
|
2314 |
+
$this->is_clone() ||
|
2315 |
+
( is_object( $this->_site ) && ! $this->is_registered() )
|
2316 |
+
) {
|
2317 |
+
return;
|
2318 |
+
}
|
2319 |
+
|
2320 |
$subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
|
2321 |
$this->_get_subscription_cancellation_dialog_box_template_params() :
|
2322 |
array();
|
2324 |
/**
|
2325 |
* @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
|
2326 |
*/
|
2327 |
+
$show_deactivation_feedback_form = ! self::is_deactivation_snoozed();
|
2328 |
if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
|
2329 |
$show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
|
2330 |
} else if ( $this->is_addon() ) {
|
2429 |
$reason_temporary_deactivation = array(
|
2430 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
2431 |
'text' => sprintf(
|
2432 |
+
$this->get_text_inline( "It's a temporary %s - I'm troubleshooting an issue", 'reason-temporary-x' ),
|
2433 |
strtolower( $this->is_plugin() ?
|
2434 |
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
2435 |
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
2594 |
|
2595 |
$this->_storage->store( 'uninstall_reason', $reason );
|
2596 |
|
2597 |
+
if ( self::REASON_TEMPORARY_DEACTIVATION == $reason->id ) {
|
2598 |
+
$snooze_period = fs_request_get( 'snooze_period' );
|
2599 |
+
|
2600 |
+
if ( is_numeric( $snooze_period ) && 0 < $snooze_period ) {
|
2601 |
+
self::snooze_deactivation_form( (int) $snooze_period );
|
2602 |
+
}
|
2603 |
+
}
|
2604 |
+
|
2605 |
/**
|
2606 |
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
2607 |
* not support uninstall hook.
|
2623 |
exit;
|
2624 |
}
|
2625 |
|
2626 |
+
#--------------------------------------------------------------------------------
|
2627 |
+
#region Deactivation Feedback Snoozing
|
2628 |
+
#--------------------------------------------------------------------------------
|
2629 |
+
|
2630 |
+
/**
|
2631 |
+
* @author Vova Feldman (@svovaf)
|
2632 |
+
* @since 2.4.3
|
2633 |
+
*
|
2634 |
+
* @param int $period
|
2635 |
+
*
|
2636 |
+
* @return bool True if the value was set, false otherwise.
|
2637 |
+
*/
|
2638 |
+
private static function snooze_deactivation_form( $period ) {
|
2639 |
+
return ( 0 < $period && self::reset_deactivation_snoozing( $period ) );
|
2640 |
+
}
|
2641 |
+
|
2642 |
+
/**
|
2643 |
+
* Check if deactivation feedback form is snoozed.
|
2644 |
+
*
|
2645 |
+
* @author Vova Feldman (@svovaf)
|
2646 |
+
* @since 2.4.3
|
2647 |
+
*
|
2648 |
+
* @return bool
|
2649 |
+
*/
|
2650 |
+
static function is_deactivation_snoozed() {
|
2651 |
+
$is_snoozed = ( ! is_multisite() || fs_is_network_admin() ) ?
|
2652 |
+
get_transient( 'fs_snooze_period' ) :
|
2653 |
+
get_site_transient( 'fs_snooze_period' );
|
2654 |
+
|
2655 |
+
|
2656 |
+
return ( 'true' === $is_snoozed );
|
2657 |
+
}
|
2658 |
+
|
2659 |
+
/**
|
2660 |
+
* Reset deactivation snoozing. When `$period` is `0` will stop deactivation snoozing by deleting the transients. Otherwise, will set the transients for the selected period.
|
2661 |
+
*
|
2662 |
+
* @param int $period Period in seconds.
|
2663 |
+
*
|
2664 |
+
* @author Vova Feldman (@svovaf)
|
2665 |
+
* @since 2.4.3
|
2666 |
+
*/
|
2667 |
+
private static function reset_deactivation_snoozing( $period = 0 ) {
|
2668 |
+
$value = ( 0 === $period ) ? null : 'true';
|
2669 |
+
|
2670 |
+
if ( ! is_multisite() || fs_is_network_admin() ) {
|
2671 |
+
return set_transient( 'fs_snooze_period', $value, $period );
|
2672 |
+
} else {
|
2673 |
+
return set_site_transient( 'fs_snooze_period', $value, $period );
|
2674 |
+
}
|
2675 |
+
}
|
2676 |
+
|
2677 |
+
/**
|
2678 |
+
* The deactivation snooze expiration UNIX timestamp (in sec).
|
2679 |
+
*
|
2680 |
+
* @author Vova Feldman (@svovaf)
|
2681 |
+
* @since 2.4.3
|
2682 |
+
*
|
2683 |
+
* @return int
|
2684 |
+
*/
|
2685 |
+
static function deactivation_snooze_expires_at() {
|
2686 |
+
return ( ! is_multisite() || fs_is_network_admin() ) ?
|
2687 |
+
(int) get_option( '_transient_timeout_fs_snooze_period' ) :
|
2688 |
+
(int) get_site_option( '_site_transient_timeout_fs_snooze_period' );
|
2689 |
+
}
|
2690 |
+
|
2691 |
+
#endregion
|
2692 |
+
|
2693 |
/**
|
2694 |
* @author Leo Fajardo (@leorw)
|
2695 |
* @since 2.1.4
|
2886 |
return self::instance( $addon_id );
|
2887 |
}
|
2888 |
|
2889 |
+
/**
|
2890 |
+
* @return Freemius[]
|
2891 |
+
*/
|
2892 |
+
static function _get_all_instances() {
|
2893 |
+
return self::$_instances;
|
2894 |
+
}
|
2895 |
+
|
2896 |
#endregion ------------------------------------------------------------------
|
2897 |
|
2898 |
/**
|
3403 |
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
|
3404 |
}
|
3405 |
|
3406 |
+
$clone_manager = FS_Clone_Manager::instance();
|
3407 |
+
add_action( 'init', array( $clone_manager, '_init' ) );
|
3408 |
+
|
3409 |
add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
|
3410 |
|
3411 |
if ( self::is_plugins_page() || self::is_themes_page() ) {
|
3424 |
self::$_statics_loaded = true;
|
3425 |
}
|
3426 |
|
3427 |
+
#--------------------------------------------------------------------------------
|
3428 |
+
#region Clone
|
3429 |
+
#--------------------------------------------------------------------------------
|
3430 |
+
|
3431 |
/**
|
3432 |
* @author Leo Fajardo (@leorw)
|
3433 |
+
* @since 2.5.0
|
3434 |
*
|
3435 |
+
* @param bool $only_if_manual_resolution_is_not_hidden
|
3436 |
+
*
|
3437 |
+
* @return bool
|
3438 |
*/
|
3439 |
+
private function is_unresolved_clone( $only_if_manual_resolution_is_not_hidden = false ) {
|
3440 |
+
if ( ! $this->is_clone( $only_if_manual_resolution_is_not_hidden ) ) {
|
3441 |
+
return false;
|
3442 |
+
}
|
|
|
|
|
|
|
|
|
|
|
3443 |
|
3444 |
+
return FS_Clone_Manager::instance()->has_temporary_duplicate_mode_expired();
|
3445 |
}
|
3446 |
|
|
|
|
|
|
|
|
|
3447 |
/**
|
3448 |
+
* @author Leo Fajardo (@leorw)
|
3449 |
+
* @since 2.5.0
|
3450 |
*
|
3451 |
+
* @param bool $only_if_manual_resolution_is_not_hidden
|
|
|
3452 |
*/
|
3453 |
+
function is_clone( $only_if_manual_resolution_is_not_hidden = false ) {
|
3454 |
+
if ( ! is_object( $this->_site ) ) {
|
3455 |
+
return false;
|
3456 |
}
|
3457 |
|
3458 |
+
$blog_id = null;
|
3459 |
|
3460 |
+
if (
|
3461 |
+
fs_is_network_admin() &&
|
3462 |
+
FS_Site::is_valid_id( $this->_storage->network_install_blog_id )
|
3463 |
+
) {
|
3464 |
+
// Ensure that we're comparing the network install's URL with the relevant subsite's URL.
|
3465 |
+
$blog_id = $this->_storage->network_install_blog_id;
|
3466 |
+
}
|
3467 |
+
|
3468 |
+
$site_url = Freemius::get_unfiltered_site_url( $blog_id, true, true );
|
3469 |
+
|
3470 |
+
if ( ! $this->_site->is_clone( $site_url ) ) {
|
3471 |
+
return false;
|
3472 |
+
}
|
3473 |
+
|
3474 |
+
return (
|
3475 |
+
! $only_if_manual_resolution_is_not_hidden ||
|
3476 |
+
! FS_Clone_Manager::instance()->should_hide_manual_resolution()
|
3477 |
+
);
|
3478 |
+
}
|
3479 |
+
|
3480 |
+
/**
|
3481 |
+
* @author Leo Fajardo (@leorw)
|
3482 |
+
* @since 2.5.0
|
3483 |
+
*
|
3484 |
+
* @param int|null $blog_id
|
3485 |
+
* @param bool $strip_protocol
|
3486 |
+
* @param bool $add_trailing_slash
|
3487 |
+
*
|
3488 |
+
* @return string
|
3489 |
+
*/
|
3490 |
+
static function get_unfiltered_site_url( $blog_id = null, $strip_protocol = false, $add_trailing_slash = false ) {
|
3491 |
+
global $wp_filter;
|
3492 |
+
|
3493 |
+
$site_url_filters = array(
|
3494 |
+
'site_url' => null,
|
3495 |
+
'pre_option_siteurl' => null,
|
3496 |
+
'default_option_siteurl' => null,
|
3497 |
+
'option_siteurl' => null,
|
3498 |
+
);
|
3499 |
+
|
3500 |
+
// Detach all URL-related filters to get the actual site's URL (stripped of potential manipulations by multilingual plugins).
|
3501 |
+
foreach ( $site_url_filters as $hook_name => $site_url_filter ) {
|
3502 |
+
if ( ! empty( $wp_filter[ $hook_name ] ) ) {
|
3503 |
+
$site_url_filters[ $hook_name ] = $wp_filter[ $hook_name ];
|
3504 |
+
unset( $wp_filter[ $hook_name ] );
|
3505 |
+
}
|
3506 |
+
}
|
3507 |
+
|
3508 |
+
$url = get_site_url( $blog_id );
|
3509 |
+
|
3510 |
+
// Re-attach the filters back.
|
3511 |
+
foreach ( $site_url_filters as $hook_name => $site_url_filter ) {
|
3512 |
+
if ( ! empty( $site_url_filter ) ) {
|
3513 |
+
$wp_filter[ $hook_name ] = $site_url_filter;
|
3514 |
+
}
|
3515 |
+
}
|
3516 |
+
|
3517 |
+
if ( $strip_protocol ) {
|
3518 |
+
$url = fs_strip_url_protocol( $url );
|
3519 |
+
}
|
3520 |
+
|
3521 |
+
if ( $add_trailing_slash ) {
|
3522 |
+
$url = trailingslashit( $url );
|
3523 |
+
}
|
3524 |
+
|
3525 |
+
return $url;
|
3526 |
+
}
|
3527 |
+
|
3528 |
+
/**
|
3529 |
+
* @author Leo Fajardo (@leorw)
|
3530 |
+
* @since 2.5.0
|
3531 |
+
*
|
3532 |
+
* @param number $site_id
|
3533 |
+
*/
|
3534 |
+
function fetch_install_by_id( $site_id ) {
|
3535 |
+
return $this->get_current_or_network_user_api_scope()->get( "/installs/{$site_id}.json" );
|
3536 |
+
}
|
3537 |
+
|
3538 |
+
/**
|
3539 |
+
* @author Leo Fajardo (@leorw)
|
3540 |
+
* @since 2.5.0
|
3541 |
+
*
|
3542 |
+
* @return string|object|bool
|
3543 |
+
*/
|
3544 |
+
function _handle_long_term_duplicate() {
|
3545 |
+
$this->_logger->entrance();
|
3546 |
+
|
3547 |
+
$this->delete_current_install( false );
|
3548 |
+
|
3549 |
+
$license_key = false;
|
3550 |
+
|
3551 |
+
if (
|
3552 |
+
is_object( $this->_license ) &&
|
3553 |
+
! $this->_license->is_utilized(
|
3554 |
+
( WP_FS__IS_LOCALHOST_FOR_SERVER || FS_Site::is_localhost_by_address( self::get_unfiltered_site_url() ) )
|
3555 |
+
)
|
3556 |
+
) {
|
3557 |
+
$license_key = $this->_license->secret_key;
|
3558 |
+
}
|
3559 |
+
|
3560 |
+
return $this->opt_in(
|
3561 |
+
false,
|
3562 |
+
false,
|
3563 |
+
false,
|
3564 |
+
$license_key,
|
3565 |
+
false,
|
3566 |
+
false,
|
3567 |
+
false,
|
3568 |
+
null,
|
3569 |
+
array(),
|
3570 |
+
false
|
3571 |
+
);
|
3572 |
+
}
|
3573 |
+
|
3574 |
+
#endregion
|
3575 |
+
|
3576 |
+
/**
|
3577 |
+
* @author Leo Fajardo (@leorw)
|
3578 |
+
*
|
3579 |
+
* @since 2.1.3
|
3580 |
+
*/
|
3581 |
+
private static function migrate_options_to_network() {
|
3582 |
+
self::migrate_accounts_to_network();
|
3583 |
+
|
3584 |
+
// Migrate API options from site level to network level.
|
3585 |
+
$api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
|
3586 |
+
$api_network_options->migrate_to_network();
|
3587 |
+
|
3588 |
+
// Migrate API cache to network level storage.
|
3589 |
+
FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
|
3590 |
+
|
3591 |
+
self::$_accounts->set_option( 'ms_migration_complete', true, true );
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
#----------------------------------------------------------------------------------
|
3595 |
+
#region Localization
|
3596 |
+
#----------------------------------------------------------------------------------
|
3597 |
+
|
3598 |
+
/**
|
3599 |
+
* Load framework's text domain.
|
3600 |
+
*
|
3601 |
+
* @author Vova Feldman (@svovaf)
|
3602 |
+
* @since 1.2.1
|
3603 |
+
*/
|
3604 |
+
static function _load_textdomain() {
|
3605 |
+
if ( ! is_admin() ) {
|
3606 |
+
return;
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
global $fs_active_plugins;
|
3610 |
+
|
3611 |
+
// Works both for plugins and themes.
|
3612 |
+
load_plugin_textdomain(
|
3613 |
+
'freemius',
|
3614 |
+
false,
|
3615 |
+
$fs_active_plugins->newest->sdk_path . '/languages/'
|
3616 |
+
);
|
3617 |
+
}
|
3618 |
|
3619 |
#endregion
|
3620 |
|
3809 |
|
3810 |
switch_to_blog( $current_blog_id );
|
3811 |
}
|
3812 |
+
} else if ( fs_request_is_action( 'reset_deactivation_snoozing' ) ) {
|
3813 |
+
check_admin_referer( 'reset_deactivation_snoozing' );
|
3814 |
+
|
3815 |
+
self::reset_deactivation_snoozing();
|
3816 |
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
3817 |
check_admin_referer( 'simulate_trial' );
|
3818 |
|
3861 |
}
|
3862 |
|
3863 |
/**
|
3864 |
+
* @author Leo Fajardo (@leorw)
|
3865 |
+
* @since 2.5.0
|
3866 |
+
*
|
3867 |
+
* @return array
|
3868 |
*/
|
3869 |
+
static function get_all_modules_sites() {
|
3870 |
self::$_static_logger->entrance();
|
3871 |
|
3872 |
+
$sites_by_type = array(
|
3873 |
+
WP_FS__MODULE_TYPE_PLUGIN => array(),
|
3874 |
+
WP_FS__MODULE_TYPE_THEME => array(),
|
3875 |
+
);
|
3876 |
+
|
3877 |
+
$module_types = array_keys( $sites_by_type );
|
3878 |
+
|
3879 |
if ( ! is_multisite() ) {
|
3880 |
+
foreach ( $module_types as $type ) {
|
3881 |
+
$sites_by_type[ $type ] = self::get_all_sites( $type );
|
3882 |
+
|
3883 |
+
foreach ( $sites_by_type[ $type ] as $slug => $install ) {
|
3884 |
+
$sites_by_type[ $type ][ $slug ] = array( $install );
|
3885 |
+
}
|
3886 |
+
}
|
3887 |
} else {
|
3888 |
$sites = self::get_sites();
|
3889 |
|
|
|
|
|
|
|
3890 |
foreach ( $sites as $site ) {
|
3891 |
$blog_id = self::get_site_blog_id( $site );
|
3892 |
|
3893 |
+
foreach ( $module_types as $type ) {
|
3894 |
+
$installs = self::get_all_sites( $type, $blog_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
3895 |
|
3896 |
+
foreach ( $installs as $slug => $install ) {
|
3897 |
+
if ( ! isset( $sites_by_type[ $type ][ $slug ] ) ) {
|
3898 |
+
$sites_by_type[ $type ][ $slug ] = array();
|
3899 |
+
}
|
3900 |
|
3901 |
+
$install->blog_id = $blog_id;
|
3902 |
|
3903 |
+
$sites_by_type[ $type ][ $slug ][] = $install;
|
|
|
|
|
3904 |
}
|
3905 |
|
|
|
|
|
|
|
3906 |
}
|
3907 |
}
|
3908 |
}
|
3909 |
|
3910 |
+
return $sites_by_type;
|
3911 |
+
}
|
3912 |
+
|
3913 |
+
/**
|
3914 |
+
* @author Vova Feldman (@svovaf)
|
3915 |
+
* @since 1.0.8
|
3916 |
+
*/
|
3917 |
+
static function _debug_page_render() {
|
3918 |
+
self::$_static_logger->entrance();
|
3919 |
+
|
3920 |
+
$all_modules_sites = self::get_all_modules_sites();
|
3921 |
+
|
3922 |
$licenses_by_module_type = self::get_all_licenses_by_module_type();
|
3923 |
|
3924 |
$vars = array(
|
3925 |
+
'plugin_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_PLUGIN ],
|
3926 |
+
'theme_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_THEME ],
|
3927 |
'users' => self::get_all_users(),
|
3928 |
'addons' => self::get_all_addons(),
|
3929 |
'account_addons' => self::get_all_account_addons(),
|
3955 |
function is_on() {
|
3956 |
self::$_static_logger->entrance();
|
3957 |
|
3958 |
+
if ( is_object( $this->_site ) && ! $this->is_registered() ) {
|
3959 |
+
return false;
|
3960 |
+
}
|
3961 |
+
|
3962 |
if ( isset( $this->_is_on ) ) {
|
3963 |
return $this->_is_on;
|
3964 |
}
|
4047 |
|
4048 |
$is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
|
4049 |
|
4050 |
+
$params = array(
|
4051 |
+
'is_update' => json_encode( $is_update ),
|
4052 |
+
'version' => $version,
|
4053 |
+
'sdk' => $this->version,
|
4054 |
+
'is_admin' => json_encode( is_admin() ),
|
4055 |
+
'is_ajax' => json_encode( self::is_ajax() ),
|
4056 |
+
'is_cron' => json_encode( self::is_cron() ),
|
4057 |
+
'is_gdpr_test' => $is_gdpr_test,
|
4058 |
+
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
4059 |
+
);
|
4060 |
+
|
4061 |
+
if ( is_multisite() && function_exists( 'get_network' ) ) {
|
4062 |
+
$params['network_uid'] = $this->get_anonymous_network_id();
|
4063 |
+
}
|
4064 |
+
|
4065 |
return $this->get_api_plugin_scope()->ping(
|
4066 |
$this->get_anonymous_id( $blog_id ),
|
4067 |
+
$params
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4068 |
);
|
4069 |
}
|
4070 |
|
4201 |
$unique_id = self::$_accounts->get_option( 'unique_id', null, $blog_id );
|
4202 |
|
4203 |
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
4204 |
+
$key = self::get_unfiltered_site_url( $blog_id, true );
|
4205 |
|
4206 |
$secure_auth = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
|
4207 |
if ( empty( $secure_auth ) ||
|
4230 |
return $unique_id;
|
4231 |
}
|
4232 |
|
4233 |
+
/**
|
4234 |
+
* Returns anonymous network ID.
|
4235 |
+
*
|
4236 |
+
* @since 2.4.3
|
4237 |
+
*
|
4238 |
+
* @return string
|
4239 |
+
*/
|
4240 |
+
function get_anonymous_network_id() {
|
4241 |
+
return $this->get_anonymous_id( get_network()->site_id );
|
4242 |
+
}
|
4243 |
+
|
4244 |
/**
|
4245 |
* @author Vova Feldman (@svovaf)
|
4246 |
* @since 1.1.7.4
|
4389 |
$install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
|
4390 |
$fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
|
4391 |
$fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
|
4392 |
+
/* translators: %s: product title (e.g. "Awesome Plugin" requires access to...) */
|
4393 |
+
$x_requires_access_to_api = $this->esc_html_inline( '%s requires access to our API.', 'x-requires-access-to-api' );
|
4394 |
$sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
|
4395 |
$happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
|
4396 |
|
4397 |
+
if ( $this->is_premium() ) {
|
4398 |
+
/* translators: This string is optionally prepended to 'plugin requires access to our API.' */
|
4399 |
+
$x_requires_access_to_api = $this->esc_html_inline( 'For automatic delivery of security & feature updates,', 'requires-api-for' ) . ' ' . $x_requires_access_to_api;
|
4400 |
+
}
|
4401 |
+
|
4402 |
$message = false;
|
4403 |
if ( is_object( $api_result ) &&
|
4404 |
isset( $api_result->error ) &&
|
5030 |
|
5031 |
/**
|
5032 |
* This should be executed even if Freemius is off for the core module,
|
5033 |
+
* otherwise, the add-ons dialog box won't work properly. This is especially
|
5034 |
* relevant when the developer decided to turn FS off for existing users.
|
5035 |
*
|
5036 |
* @author Vova Feldman (@svovaf)
|
5068 |
* @since 1.1.7.3
|
5069 |
*
|
5070 |
*/
|
5071 |
+
if ( $this->is_registered() && $this->is_tracking_allowed() ) {
|
5072 |
+
$this->maybe_schedule_sync_cron();
|
|
|
|
|
5073 |
}
|
5074 |
|
5075 |
/**
|
5076 |
* Check if requested for manual blocking background sync.
|
5077 |
*/
|
5078 |
if ( fs_request_has( 'background_sync' ) ) {
|
5079 |
+
self::require_pluggable_essentials();
|
5080 |
+
self::wp_cookie_constants();
|
5081 |
+
|
5082 |
$this->run_manual_sync();
|
5083 |
}
|
5084 |
}
|
5085 |
}
|
5086 |
|
5087 |
if ( $this->is_registered() ) {
|
5088 |
+
FS_Clone_Manager::instance()->maybe_resolve_new_subsite_install_automatically( $this );
|
5089 |
+
|
5090 |
$this->hook_callback_to_install_sync();
|
5091 |
}
|
5092 |
|
5101 |
}
|
5102 |
|
5103 |
if ( $this->is_user_in_admin() ) {
|
5104 |
+
if ( $this->is_registered() && fs_request_has( 'purchase_completed' ) ) {
|
5105 |
+
$this->_admin_notices->add_sticky(
|
5106 |
+
sprintf(
|
5107 |
+
/* translators: %s: License type (e.g. you have a professional license) */
|
5108 |
+
$this->get_text_inline( 'You have purchased a %s license.', 'you-have-x-license' ),
|
5109 |
+
fs_request_get( 'purchased_plan' )
|
5110 |
+
) .
|
5111 |
+
sprintf(
|
5112 |
+
$this->get_text_inline(" The %s's %sdownload link%s, license key, and installation instructions have been sent to %s. If you can't find the email after 5 min, please check your spam box.", 'post-purchase-email-sent-message' ),
|
5113 |
+
$this->get_module_label( true ),
|
5114 |
+
( FS_Plugin::is_valid_id( $this->get_bundle_id() ) ? "products' " : '' ),
|
5115 |
+
( FS_Plugin::is_valid_id( $this->get_bundle_id() ) ? 's' : '' ),
|
5116 |
+
sprintf(
|
5117 |
+
'<strong>%s</strong>',
|
5118 |
+
fs_request_get( 'purchase_email' )
|
5119 |
+
)
|
5120 |
+
),
|
5121 |
+
'plan_purchased',
|
5122 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
5123 |
+
);
|
5124 |
+
}
|
5125 |
+
|
5126 |
if ( $this->is_addon() ) {
|
5127 |
if ( ! $this->is_parent_plugin_installed() ) {
|
5128 |
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
5227 |
* because the updater has some logic that needs to be executed
|
5228 |
* during AJAX calls.
|
5229 |
*
|
5230 |
+
* Currently, we need to hook to the `http_request_host_is_external` filter.
|
5231 |
* In the future, there might be additional logic added.
|
5232 |
*
|
5233 |
* @author Vova Feldman
|
5246 |
*/
|
5247 |
( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->premium_plugin_basename() ) ) )
|
5248 |
) &&
|
5249 |
+
$this->has_release_on_freemius() &&
|
5250 |
+
( ! $this->is_unresolved_clone( true ) )
|
5251 |
) {
|
5252 |
FS_Plugin_Updater::instance( $this );
|
5253 |
}
|
5316 |
}
|
5317 |
|
5318 |
/**
|
5319 |
+
* @param string[] $permissions
|
5320 |
+
* @param bool $is_enabled
|
5321 |
+
* @param int|null $blog_id
|
5322 |
*
|
5323 |
+
* @return true|object `true` on success, API error object on failure.
|
5324 |
*/
|
5325 |
+
private function update_site_permissions( array $permissions, $is_enabled, $blog_id = null ) {
|
5326 |
$this->_logger->entrance();
|
5327 |
|
5328 |
+
$params = array(
|
5329 |
+
'permissions' => implode( ',', $permissions ),
|
5330 |
+
'is_enabled' => $is_enabled,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5331 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5332 |
|
5333 |
+
$current_blog_id = get_current_blog_id();
|
5334 |
+
$is_blog_switched = false;
|
5335 |
+
if ( is_numeric( $blog_id ) && $current_blog_id != $blog_id ) {
|
5336 |
+
$is_blog_switched = $this->switch_to_blog( $blog_id );
|
5337 |
}
|
5338 |
|
5339 |
+
$result = $this->api_site_call( '/permissions.json', 'put', $params );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5340 |
|
5341 |
+
if ( $is_blog_switched ) {
|
5342 |
+
$this->switch_to_blog( $current_blog_id );
|
|
|
5343 |
}
|
5344 |
|
5345 |
+
if (
|
5346 |
+
! $this->is_api_result_object( $result ) ||
|
5347 |
+
! isset( $result->install_id )
|
|
|
|
|
|
|
|
|
|
|
5348 |
) {
|
5349 |
$this->_logger->api_error( $result );
|
5350 |
|
5351 |
return $result;
|
5352 |
}
|
5353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5354 |
return true;
|
5355 |
}
|
5356 |
|
5357 |
/**
|
5358 |
+
* @param string[] $permissions
|
5359 |
+
* @param bool $is_enabled
|
5360 |
+
* @param bool $has_site_delegated_connection
|
5361 |
*
|
5362 |
+
* @return true|object `true` on success, API error object on failure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5363 |
*/
|
5364 |
+
private function update_network_permissions(
|
5365 |
+
array $permissions,
|
5366 |
+
$is_enabled,
|
5367 |
+
&$has_site_delegated_connection
|
5368 |
+
) {
|
5369 |
$this->_logger->entrance();
|
5370 |
|
|
|
|
|
|
|
|
|
|
|
5371 |
$install_id_2_blog_id = array();
|
5372 |
+
$install_by_blog_id = $this->get_blog_install_map();
|
|
|
|
|
5373 |
|
5374 |
+
$has_site_delegated_connection = false;
|
|
|
|
|
|
|
|
|
|
|
5375 |
|
5376 |
+
foreach ( $install_by_blog_id as $blog_id => $install ) {
|
5377 |
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
5378 |
+
// Only update permissions of non-delegated installs.
|
5379 |
+
$has_site_delegated_connection = true;
|
5380 |
continue;
|
5381 |
}
|
5382 |
|
|
|
|
|
5383 |
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
5384 |
}
|
5385 |
|
5387 |
return true;
|
5388 |
}
|
5389 |
|
5390 |
+
$params = array(
|
5391 |
+
'permissions' => implode( ',', $permissions ),
|
5392 |
+
'is_enabled' => $is_enabled,
|
5393 |
+
'install_ids' => implode( ',', array_keys( $install_id_2_blog_id ) ),
|
5394 |
+
);
|
5395 |
|
5396 |
// Send update to FS.
|
5397 |
+
$result = $this->get_current_or_network_user_api_scope()->call(
|
5398 |
+
"/plugins/{$this->_module_id}/installs/permissions.json",
|
5399 |
+
'put',
|
5400 |
+
$params
|
5401 |
+
);
|
5402 |
|
5403 |
+
if ( ! $this->is_api_result_object( $result, 'installs_metadata' ) ) {
|
5404 |
$this->_logger->api_error( $result );
|
5405 |
|
5406 |
return $result;
|
5407 |
}
|
5408 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5409 |
return true;
|
5410 |
}
|
5411 |
|
5412 |
/**
|
5413 |
+
* @param mixed $result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5414 |
*
|
5415 |
+
* @return string
|
5416 |
*/
|
5417 |
+
private function get_api_error_message( $result ) {
|
5418 |
+
$error_message = sprintf( $this->get_text_inline( 'There was an unexpected API error while processing your request. Please try again in a few minutes and if it still doesn\'t work, contact the %s\'s author with the following:',
|
5419 |
+
'unexpected-api-error' ), $this->_module_type ) . ' ';
|
5420 |
+
|
5421 |
+
if (
|
5422 |
+
$this->is_api_error( $result ) &&
|
5423 |
+
isset( $result->error )
|
5424 |
+
) {
|
5425 |
+
$code = empty( $result->error->code ) ? '' : " Code: {$result->error->code}";
|
5426 |
+
|
5427 |
+
$error_message .= "<b>{$result->error->message}{$code}</b>";
|
5428 |
+
} else {
|
5429 |
+
$error_message .= var_export( $result, true );
|
5430 |
+
}
|
5431 |
|
5432 |
+
return $error_message;
|
|
|
|
|
5433 |
}
|
5434 |
|
5435 |
/**
|
5436 |
+
* @author Vova Feldman (@svovaf)
|
5437 |
+
* @since 2.5.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5438 |
*/
|
5439 |
+
function _toggle_permission_tracking_callback() {
|
5440 |
$this->_logger->entrance();
|
5441 |
|
5442 |
+
$this->check_ajax_referer( 'toggle_permission_tracking' );
|
|
|
|
|
|
|
5443 |
|
5444 |
+
if ( ! $this->is_registered( true ) ) {
|
5445 |
+
self::shoot_ajax_failure( 'User never opted-in.' );
|
|
|
5446 |
}
|
5447 |
|
5448 |
+
$is_enabled = fs_request_get_bool( 'is_enabled' );
|
5449 |
+
$permissions = fs_request_get( 'permissions' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5450 |
|
5451 |
+
if ( ! is_string( $permissions ) ) {
|
5452 |
+
self::shoot_ajax_failure( 'The permissions param must be a string.' );
|
5453 |
}
|
5454 |
|
5455 |
+
$permissions = explode( ',', $permissions );
|
|
|
5456 |
|
5457 |
+
$result = $this->toggle_permission_tracking( $permissions, $is_enabled );
|
5458 |
|
5459 |
+
if ( true !== $result ) {
|
5460 |
+
self::shoot_ajax_failure( $this->get_api_error_message( $result ) );
|
5461 |
+
}
|
5462 |
+
|
5463 |
+
self::shoot_ajax_success();
|
5464 |
}
|
5465 |
|
5466 |
/**
|
5467 |
+
* @param string[] $permissions
|
5468 |
+
* @param bool $is_enabled
|
5469 |
+
* @param int|null $blog_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5470 |
*
|
5471 |
+
* @return bool|mixed `true` if updated successfully or no update is needed.
|
5472 |
*/
|
5473 |
+
private function toggle_permission_tracking( $permissions, $is_enabled, $blog_id = null ) {
|
5474 |
+
if ( ! $this->is_registered( true ) ) {
|
|
|
|
|
5475 |
// User never opted-in.
|
5476 |
return false;
|
5477 |
}
|
5478 |
|
5479 |
+
// Check if permissions are already set as needed.
|
5480 |
+
if ( FS_Permission_Manager::instance( $this )->are_permissions( $permissions, $is_enabled, $blog_id ) ) {
|
5481 |
+
/**
|
5482 |
+
* Note:
|
5483 |
+
* When running on the network admin, there's no need to iterate through all the installs individually since network opt-in permissions are managed for ALL non-delegated installs through a single option (per permission) on the network-level storage.
|
5484 |
+
*/
|
5485 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
5486 |
}
|
5487 |
|
5488 |
+
$api_managed_permissions = array_intersect(
|
5489 |
+
$permissions,
|
5490 |
+
FS_Permission_Manager::get_api_managed_permission_ids()
|
5491 |
+
);
|
5492 |
+
|
5493 |
+
if (
|
5494 |
+
in_array( FS_Permission_Manager::PERMISSION_ESSENTIALS, $permissions ) &&
|
5495 |
+
! in_array( FS_Permission_Manager::PERMISSION_SITE, $permissions )
|
5496 |
+
) {
|
5497 |
+
$api_managed_permissions[] = FS_Permission_Manager::PERMISSION_SITE;
|
5498 |
}
|
5499 |
|
5500 |
+
if ( ! empty( $api_managed_permissions ) ) {
|
5501 |
+
$has_site_delegated_connection = false;
|
5502 |
|
5503 |
+
if (
|
5504 |
+
! $is_enabled &&
|
5505 |
+
! in_array( FS_Permission_Manager::PERMISSION_EXTENSIONS, $api_managed_permissions ) &&
|
5506 |
+
false === FS_Permission_Manager::instance( $this )->is_extensions_tracking_allowed( $blog_id )
|
5507 |
+
) {
|
5508 |
+
/**
|
5509 |
+
* If we are turning off a permission and the extensions permission is off too, enrich the permissions update request to also turn off extensions tracking, as currently when opting in with extensions tracking disabled the extensions tracking is off but the API isn't aware of it.
|
5510 |
+
*
|
5511 |
+
* @todo Remove this entire `if` after implementing granular opt-in that also sends the permissions to the API when opting in.
|
5512 |
+
*/
|
5513 |
+
$api_managed_permissions[] = FS_Permission_Manager::PERMISSION_EXTENSIONS;
|
5514 |
+
}
|
5515 |
|
5516 |
+
if ( is_null( $blog_id ) && fs_is_network_admin() ) {
|
5517 |
+
$result = $this->update_network_permissions(
|
5518 |
+
$api_managed_permissions,
|
5519 |
+
$is_enabled,
|
5520 |
+
$has_site_delegated_connection
|
5521 |
+
);
|
5522 |
+
} else {
|
5523 |
+
$result = $this->update_site_permissions(
|
5524 |
+
$api_managed_permissions,
|
5525 |
+
$is_enabled,
|
5526 |
+
$blog_id
|
5527 |
+
);
|
5528 |
+
}
|
5529 |
|
5530 |
+
if ( true !== $result ) {
|
5531 |
+
return $result;
|
5532 |
+
}
|
5533 |
|
5534 |
+
if ( in_array( FS_Permission_Manager::PERMISSION_SITE, $api_managed_permissions ) ) {
|
5535 |
+
if ( $is_enabled ) {
|
5536 |
+
$this->schedule_sync_cron();
|
5537 |
+
} else {
|
5538 |
+
$this->clear_sync_cron( ! $has_site_delegated_connection );
|
5539 |
+
}
|
5540 |
+
}
|
5541 |
|
5542 |
+
if ( in_array( FS_Permission_Manager::PERMISSION_USER, $api_managed_permissions ) ) {
|
5543 |
+
$this->toggle_user_permission( $is_enabled, $blog_id );
|
5544 |
+
}
|
|
|
|
|
5545 |
}
|
5546 |
|
5547 |
+
$this->update_tracking_permissions(
|
5548 |
+
$permissions,
|
5549 |
+
$is_enabled,
|
5550 |
+
$blog_id
|
5551 |
+
);
|
5552 |
|
|
|
5553 |
return true;
|
5554 |
}
|
5555 |
|
5556 |
+
/**
|
5557 |
+
* @param bool $is_enabled
|
5558 |
+
* @param int|null $blog_id
|
5559 |
+
*/
|
5560 |
+
private function toggle_user_permission( $is_enabled, $blog_id = null ) {
|
5561 |
+
$network_or_blog_ids = is_numeric( $blog_id ) ?
|
5562 |
+
$blog_id :
|
5563 |
+
fs_is_network_admin();
|
5564 |
+
|
5565 |
+
if ( $is_enabled ) {
|
5566 |
+
$this->reset_anonymous_mode( $network_or_blog_ids );
|
5567 |
+
} else {
|
5568 |
+
$this->skip_connection( $network_or_blog_ids );
|
5569 |
+
}
|
5570 |
+
}
|
5571 |
+
|
5572 |
/**
|
5573 |
* Opt-in back into usage tracking.
|
5574 |
*
|
5582 |
* @author Leo Fajardo (@leorw)
|
5583 |
* @since 1.2.1.5
|
5584 |
*
|
5585 |
+
* @bool $is_enabled
|
5586 |
*
|
5587 |
* @return bool|object
|
5588 |
*/
|
5589 |
+
private function toggle_site_tracking( $is_enabled, $blog_id = null ) {
|
5590 |
$this->_logger->entrance();
|
5591 |
|
5592 |
+
return $this->toggle_permission_tracking(
|
5593 |
+
FS_Permission_Manager::instance( $this )->get_site_tracking_permission_names(),
|
5594 |
+
$is_enabled,
|
5595 |
+
$blog_id
|
5596 |
+
);
|
5597 |
}
|
5598 |
|
5599 |
/**
|
5614 |
|
5615 |
if ( ! fs_is_network_admin() || $is_context_single_site ) {
|
5616 |
if ( $this->is_tracking_prohibited() ) {
|
5617 |
+
FS_Permission_Manager::instance( $this )->update_site_tracking( true );
|
|
|
5618 |
}
|
5619 |
} else {
|
5620 |
$installs_map = $this->get_blog_install_map();
|
5622 |
/**
|
5623 |
* @var FS_Site $install
|
5624 |
*/
|
5625 |
+
if ( ! $this->is_tracking_allowed( $blog_id, $install ) ) {
|
5626 |
+
FS_Permission_Manager::instance( $this )->update_site_tracking( true, $blog_id );
|
|
|
5627 |
}
|
5628 |
}
|
5629 |
}
|
5630 |
}
|
5631 |
|
5632 |
/**
|
5633 |
+
* Update permission tracking flags. When updating in a network context, in addition to updating the network-level flags, also update the permissions on the site-level for all non-delegated sites.
|
|
|
5634 |
*
|
5635 |
+
* @param string[] $permissions
|
5636 |
+
* @param bool $is_enabled
|
5637 |
+
* @param int|null $blog_id
|
5638 |
+
*
|
5639 |
+
* @return array
|
5640 |
*/
|
5641 |
+
private function update_tracking_permissions( $permissions, $is_enabled, $blog_id = null ) {
|
5642 |
+
// Alias.
|
5643 |
+
$permission_manager = FS_Permission_Manager::instance( $this );
|
|
|
|
|
|
|
5644 |
|
5645 |
+
$network_or_blog_ids = is_numeric( $blog_id ) ?
|
5646 |
+
$blog_id :
|
5647 |
+
fs_is_network_admin();
|
|
|
|
|
|
|
5648 |
|
5649 |
+
if ( true === $network_or_blog_ids ) {
|
5650 |
+
// Update the permission for all non-delegated sub-sites.
|
5651 |
+
$blog_ids = $this->get_non_delegated_blog_ids();
|
5652 |
|
5653 |
+
// Add the network-level to the array, to update the permission on the network-level storage.
|
5654 |
+
array_unshift( $blog_ids, null );
|
5655 |
+
}
|
5656 |
+
else
|
5657 |
+
{
|
5658 |
+
if ( false === $network_or_blog_ids ) {
|
5659 |
+
$network_or_blog_ids = null;
|
5660 |
+
}
|
5661 |
|
5662 |
+
$blog_ids = is_array( $network_or_blog_ids ) ?
|
5663 |
+
$network_or_blog_ids :
|
5664 |
+
array( $network_or_blog_ids );
|
5665 |
}
|
5666 |
|
5667 |
+
$result = array();
|
5668 |
+
foreach ( $permissions as $permission ) {
|
5669 |
+
$permission = trim( $permission );
|
5670 |
+
$is_permission_supported = true;
|
5671 |
+
|
5672 |
+
foreach ( $blog_ids as $id ) {
|
5673 |
+
$is_permission_supported = $permission_manager->update_permission_tracking_flag(
|
5674 |
+
$permission,
|
5675 |
+
$is_enabled,
|
5676 |
+
$id
|
5677 |
+
);
|
5678 |
+
}
|
5679 |
|
5680 |
+
if ( ! $is_permission_supported ) {
|
|
|
|
|
|
|
|
|
5681 |
$permission = 'no_match';
|
5682 |
+
}
|
5683 |
|
5684 |
+
$result[ $permission ] = $is_enabled;
|
|
|
5685 |
}
|
5686 |
|
5687 |
+
return $result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5688 |
}
|
5689 |
|
5690 |
/**
|
5890 |
if ( $this->is_activation_mode() ) {
|
5891 |
if ( ! is_admin() ) {
|
5892 |
/**
|
5893 |
+
* If in activation mode, don't execute Freemius outside the admin dashboard.
|
|
|
5894 |
*
|
5895 |
* @author Vova Feldman (@svovaf)
|
5896 |
* @since 1.1.7.3
|
6437 |
if ( ! isset( $this->_is_anonymous ) ) {
|
6438 |
if ( $this->is_network_anonymous() ) {
|
6439 |
$this->_is_anonymous = true;
|
6440 |
+
} else if ( fs_is_network_admin() ) {
|
6441 |
+
/**
|
6442 |
+
* When not-network-anonymous, yet, running in the network admin, consider as anonymous only when ALL non-delegated sites are set to anonymous.
|
6443 |
+
*/
|
6444 |
+
$non_delegated_sites = $this->get_non_delegated_blog_ids();
|
6445 |
+
|
6446 |
+
foreach ( $non_delegated_sites as $blog_id ) {
|
6447 |
+
$is_anonymous = $this->_storage->get( 'is_anonymous', false, $blog_id );
|
6448 |
+
|
6449 |
+
if ( empty( $is_anonymous ) || false === $is_anonymous[ 'is' ] ) {
|
6450 |
+
$this->_is_anonymous = false;
|
6451 |
+
break;
|
6452 |
+
}
|
6453 |
+
}
|
6454 |
+
|
6455 |
+
if ( false !== $this->_is_anonymous ) {
|
6456 |
+
$this->_is_anonymous = true;
|
6457 |
+
}
|
6458 |
+
} else {
|
6459 |
if ( ! isset( $this->_storage->is_anonymous ) ) {
|
6460 |
// Not skipped.
|
6461 |
$this->_is_anonymous = false;
|
6511 |
return $this->_storage->get( 'is_pending_activation', false );
|
6512 |
}
|
6513 |
|
6514 |
+
/**
|
6515 |
+
* @author Leo Fajardo (@leorw)
|
6516 |
+
* @since 2.5.0
|
6517 |
+
*/
|
6518 |
+
private function clear_pending_activation_mode() {
|
6519 |
+
// Remove the pending activation sticky notice (if it still exists).
|
6520 |
+
$this->_admin_notices->remove_sticky( 'activation_pending' );
|
6521 |
+
|
6522 |
+
// Clear the plugin's pending activation mode.
|
6523 |
+
unset( $this->_storage->is_pending_activation );
|
6524 |
+
}
|
6525 |
+
|
6526 |
/**
|
6527 |
* Check if plugin must be WordPress.org compliant.
|
6528 |
*
|
6599 |
private function get_cron_blog_id( $name ) {
|
6600 |
$this->_logger->entrance( $name );
|
6601 |
|
6602 |
+
if ( ! is_multisite() ) {
|
6603 |
+
// Not a multisite.
|
6604 |
+
return 0;
|
6605 |
+
}
|
6606 |
+
|
6607 |
$cron_data = $this->get_cron_data( $name );
|
6608 |
|
6609 |
return ( is_object( $cron_data ) && is_numeric( $cron_data->blog_id ) ) ?
|
6714 |
return 0;
|
6715 |
}
|
6716 |
|
6717 |
+
if ( $this->_is_network_active ) {
|
6718 |
+
$network_install_blog_id = $this->_storage->network_install_blog_id;
|
|
|
|
|
|
|
|
|
|
|
6719 |
|
6720 |
+
if (
|
6721 |
+
is_numeric( $network_install_blog_id ) &&
|
6722 |
+
$except_blog_id != $network_install_blog_id &&
|
6723 |
+
self::is_site_active( $network_install_blog_id )
|
6724 |
) {
|
6725 |
+
// Try to run cron from the main network blog.
|
6726 |
+
$install = $this->get_install_by_blog_id( $network_install_blog_id );
|
6727 |
+
|
6728 |
+
if (
|
6729 |
+
is_object( $install ) &&
|
6730 |
+
$this->is_tracking_allowed( $network_install_blog_id, $install )
|
6731 |
+
) {
|
6732 |
+
return $network_install_blog_id;
|
6733 |
+
}
|
6734 |
}
|
6735 |
}
|
6736 |
|
6739 |
foreach ( $installs as $blog_id => $install ) {
|
6740 |
if ( $except_blog_id != $blog_id &&
|
6741 |
self::is_site_active( $blog_id ) &&
|
6742 |
+
$this->is_tracking_allowed( $blog_id, $install )
|
6743 |
) {
|
6744 |
return $blog_id;
|
6745 |
}
|
6771 |
/**
|
6772 |
* @var FS_Site $install
|
6773 |
*/
|
6774 |
+
if ( $this->is_tracking_allowed( $blog_id, $install ) ) {
|
6775 |
$clear_cron = false;
|
6776 |
break;
|
6777 |
}
|
6782 |
return;
|
6783 |
}
|
6784 |
|
6785 |
+
$cron_blog_id = $this->get_cron_blog_id( $name );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6786 |
|
6787 |
$this->clear_cron_data( $name );
|
6788 |
|
6819 |
return false;
|
6820 |
}
|
6821 |
|
6822 |
+
$cron_blog_id = $this->get_cron_blog_id( $name );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6823 |
|
6824 |
if ( 0 < $cron_blog_id ) {
|
6825 |
switch_to_blog( $cron_blog_id );
|
6930 |
} else {
|
6931 |
$installs = $this->get_blog_install_map();
|
6932 |
foreach ( $installs as $blog_id => $install ) {
|
6933 |
+
if ( $this->is_tracking_allowed( $blog_id, $install ) ) {
|
6934 |
if ( ! isset( $users_2_blog_ids[ $install->user_id ] ) ) {
|
6935 |
$users_2_blog_ids[ $install->user_id ] = array();
|
6936 |
}
|
6995 |
* @since 1.1.7.3
|
6996 |
*/
|
6997 |
private function run_manual_sync() {
|
|
|
|
|
6998 |
if ( ! $this->is_user_admin() ) {
|
6999 |
return;
|
7000 |
}
|
7078 |
return $this->is_cron_on( 'sync' );
|
7079 |
}
|
7080 |
|
7081 |
+
/**
|
7082 |
+
* @author Leo Fajardo (@leorw)
|
7083 |
+
* @since 2.5.0
|
7084 |
+
*/
|
7085 |
+
private function maybe_schedule_sync_cron() {
|
7086 |
+
$next_schedule = $this->next_sync_cron();
|
7087 |
+
|
7088 |
+
// The event is properly scheduled, so no need to reschedule it.
|
7089 |
+
if (
|
7090 |
+
is_numeric( $next_schedule ) &&
|
7091 |
+
$next_schedule > time()
|
7092 |
+
) {
|
7093 |
+
return;
|
7094 |
+
}
|
7095 |
+
|
7096 |
+
$this->schedule_sync_cron();
|
7097 |
+
}
|
7098 |
+
|
7099 |
/**
|
7100 |
* @author Vova Feldman (@svovaf)
|
7101 |
* @since 1.1.7.3
|
7202 |
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
|
7203 |
*/
|
7204 |
private function schedule_install_sync( $except_blog_id = 0 ) {
|
7205 |
+
if ( $this->is_clone() ) {
|
7206 |
+
return;
|
7207 |
+
}
|
7208 |
+
|
7209 |
$this->schedule_cron( 'install_sync', 'install_sync', 'single', WP_FS__SCRIPT_START_TIME, false, $except_blog_id );
|
7210 |
}
|
7211 |
|
7294 |
/**
|
7295 |
* Show a notice that activation is currently pending.
|
7296 |
*
|
7297 |
+
* @todo Add some sort of mechanism to allow users to update the email address they would like to opt-in with when $is_suspicious_email is true.
|
7298 |
+
*
|
7299 |
* @author Vova Feldman (@svovaf)
|
7300 |
* @since 1.0.7
|
7301 |
*
|
7302 |
* @param bool|string $email
|
7303 |
* @param bool $is_pending_trial Since 1.2.1.5
|
7304 |
+
* @param bool $is_suspicious_email Since 2.5.0 Set to true when there's an indication that email address the user opted in with is fake/dummy/placeholder.
|
7305 |
*/
|
7306 |
+
function _add_pending_activation_notice(
|
7307 |
+
$email = false,
|
7308 |
+
$is_pending_trial = false,
|
7309 |
+
$is_suspicious_email = false
|
7310 |
+
) {
|
7311 |
if ( ! is_string( $email ) ) {
|
7312 |
$current_user = self::_get_current_wp_user();
|
7313 |
$email = $current_user->user_email;
|
7363 |
/**
|
7364 |
* Don't redirect if activating multiple plugins at once (bulk activation).
|
7365 |
*/
|
7366 |
+
} else if (
|
7367 |
+
self::is_deactivation_snoozed() &&
|
7368 |
+
(
|
7369 |
+
// Either running the free code base.
|
7370 |
+
! $this->is_premium() ||
|
7371 |
+
// Or if has a free version.
|
7372 |
+
! $this->is_only_premium() ||
|
7373 |
+
// If premium only, don't redirect if license is activated.
|
7374 |
+
( $this->is_registered() && ! $this->can_use_premium_code() )
|
7375 |
+
)
|
7376 |
+
) {
|
7377 |
+
/**
|
7378 |
+
* Don't redirect if activating during the deactivation snooze period (aka troubleshooting), unless activating a paid product version that the admin didn't enter its license key yet.
|
7379 |
+
*/
|
7380 |
} else if ( ! $is_migration ) {
|
7381 |
$this->_redirect_on_activation_hook();
|
7382 |
return;
|
7390 |
if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
|
7391 |
check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
|
7392 |
|
7393 |
+
$this->skip_connection( fs_is_network_admin() );
|
7394 |
|
7395 |
fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) );
|
7396 |
}
|
7563 |
|
7564 |
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
7565 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
|
|
|
|
7566 |
}
|
7567 |
|
7568 |
/**
|
7598 |
<?php
|
7599 |
echo $this->apply_filters( 'optin_pointer_execute', "
|
7600 |
|
7601 |
+
optin.pointer('open');
|
7602 |
|
7603 |
+
// Tag the opt-in pointer with custom class.
|
7604 |
+
$('.wp-pointer #fs_connect')
|
7605 |
+
.parents('.wp-pointer.wp-pointer-top')
|
7606 |
+
.addClass('fs-opt-in-pointer');
|
7607 |
|
7608 |
+
", 'element', 'optin' ) ?>
|
7609 |
}
|
7610 |
}
|
7611 |
});
|
7621 |
*
|
7622 |
* @return string
|
7623 |
*/
|
7624 |
+
static function current_page_url() {
|
7625 |
$url = 'http';
|
7626 |
|
7627 |
if ( isset( $_SERVER["HTTPS"] ) ) {
|
7653 |
}
|
7654 |
|
7655 |
/* Events
|
7656 |
+
------------------------------------------------------------------------------------------------------------------*/
|
7657 |
/**
|
7658 |
* Delete site install from Database.
|
7659 |
*
|
7817 |
|
7818 |
/**
|
7819 |
* @author Leo Fajardo (@leorw)
|
7820 |
+
* @since 1.2.2
|
7821 |
+
*
|
7822 |
+
* @return bool
|
7823 |
+
*/
|
7824 |
+
private function can_activate_previous_theme() {
|
7825 |
+
return $this->can_activate_theme( $this->get_previous_theme_slug() );
|
7826 |
+
}
|
7827 |
+
|
7828 |
+
/**
|
7829 |
+
* @author Leo Fajardo (@leorw)
|
7830 |
+
* @since 2.5.0
|
7831 |
*
|
7832 |
+
* @return bool
|
7833 |
*/
|
7834 |
+
private function can_activate_theme( $slug ) {
|
|
|
7835 |
if ( false !== $slug && current_user_can( 'switch_themes' ) ) {
|
7836 |
$theme_instance = wp_get_theme( $slug );
|
7837 |
|
7928 |
( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ) :
|
7929 |
$this->is_premium();
|
7930 |
|
7931 |
+
if ( $is_premium_version_activation && $this->is_pending_activation() ) {
|
7932 |
+
$this->clear_pending_activation_mode();
|
7933 |
+
}
|
7934 |
+
|
7935 |
$this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
|
7936 |
|
7937 |
if ( $this->is_plugin() ) {
|
7998 |
$plugin_version = $this->_storage->is_anonymous_ms['version'];
|
7999 |
$network = true;
|
8000 |
} else {
|
8001 |
+
$plugin_version = isset( $this->_storage->is_anonymous ) ?
|
8002 |
+
$this->_storage->is_anonymous['version'] :
|
8003 |
+
null;
|
8004 |
$network = false;
|
8005 |
}
|
8006 |
|
8148 |
);
|
8149 |
} else {
|
8150 |
// Activate the license.
|
8151 |
+
$install = $this->api_site_call(
|
8152 |
'/',
|
8153 |
'put',
|
8154 |
array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
|
8807 |
$this->_is_anonymous = $is_anonymous;
|
8808 |
}
|
8809 |
|
8810 |
+
/**
|
8811 |
+
* @author Vova Feldman (@svovaf)
|
8812 |
+
* @since 2.5.1
|
8813 |
+
*
|
8814 |
+
* @param bool|int $network_or_blog_id
|
8815 |
+
*/
|
8816 |
+
private function unset_anonymous_mode( $network_or_blog_id = 0 ) {
|
8817 |
+
if ( true === $network_or_blog_id ) {
|
8818 |
+
unset( $this->_storage->is_anonymous_ms );
|
8819 |
+
} else {
|
8820 |
+
$this->_storage->remove( 'is_anonymous', true, $network_or_blog_id );
|
8821 |
+
}
|
8822 |
+
}
|
8823 |
+
|
8824 |
/**
|
8825 |
* @author Vova Feldman (@svovaf)
|
8826 |
* @since 2.0.0
|
8837 |
* @uses Freemius::is_network_anonymous() to check if the super-admin network skipped.
|
8838 |
* @uses Freemius::is_network_delegated_connection() to check if the super-admin network delegated the connection to the site admins.
|
8839 |
*/
|
8840 |
+
public function _after_new_blog_callback( $blog_id, $user_id, $domain, $path, $network_id, $meta ) {
|
8841 |
$this->_logger->entrance();
|
8842 |
|
8843 |
+
if ( ! $this->_is_network_active ) {
|
8844 |
+
FS_Clone_Manager::instance()->store_blog_install_info( $blog_id );
|
8845 |
+
return;
|
8846 |
+
}
|
8847 |
+
|
8848 |
+
$site = null;
|
8849 |
+
$new_blog_id = $blog_id;
|
8850 |
+
|
8851 |
if ( $this->is_premium() &&
|
8852 |
$this->is_network_connected() &&
|
8853 |
is_object( $this->_license ) &&
|
8881 |
}
|
8882 |
}
|
8883 |
|
8884 |
+
$site = $this->_site;
|
8885 |
+
|
8886 |
$this->switch_to_blog( $current_blog_id );
|
8887 |
|
8888 |
+
if ( is_object( $site ) ) {
|
8889 |
+
FS_Clone_Manager::instance()->store_blog_install_info( $blog_id, $site );
|
8890 |
+
|
8891 |
// Already connected (with or without a license), so no need to continue.
|
8892 |
return;
|
8893 |
}
|
8920 |
false
|
8921 |
);
|
8922 |
|
8923 |
+
$site = $this->_site;
|
8924 |
+
|
8925 |
$this->switch_to_blog( $current_blog_id );
|
8926 |
} else {
|
8927 |
/**
|
8932 |
$has_delegated_site = false;
|
8933 |
|
8934 |
$sites = self::get_sites();
|
8935 |
+
foreach ( $sites as $wp_site ) {
|
8936 |
+
$blog_id = self::get_site_blog_id( $wp_site );
|
8937 |
|
8938 |
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
8939 |
$has_delegated_site = true;
|
8947 |
$this->skip_site_connection( $blog_id );
|
8948 |
}
|
8949 |
}
|
8950 |
+
|
8951 |
+
/**
|
8952 |
+
* Store the new blog's information even if there's no install so that when a clone install is stored in the new blog's storage, we can try to resolve it automatically.
|
8953 |
+
*
|
8954 |
+
* @author Leo Fajardo (@leorw)
|
8955 |
+
* @since 2.5.0
|
8956 |
+
*/
|
8957 |
+
FS_Clone_Manager::instance()->store_blog_install_info( $new_blog_id, $site );
|
8958 |
+
}
|
8959 |
+
|
8960 |
+
/**
|
8961 |
+
* @author Vova Feldman (@svovaf)
|
8962 |
+
* @since 2.5.0
|
8963 |
+
*
|
8964 |
+
* @param \WP_Site $new_site
|
8965 |
+
* @param array $args
|
8966 |
+
*/
|
8967 |
+
public function _after_wp_initialize_site_callback( WP_Site $new_site, $args ) {
|
8968 |
+
$this->_logger->entrance();
|
8969 |
+
|
8970 |
+
$this->_after_new_blog_callback(
|
8971 |
+
$new_site->id,
|
8972 |
+
// Dummy user ID (not in use).
|
8973 |
+
0,
|
8974 |
+
$new_site->domain,
|
8975 |
+
$new_site->path,
|
8976 |
+
$new_site->network_id,
|
8977 |
+
// Dummy meta, not in use.
|
8978 |
+
array()
|
8979 |
+
);
|
8980 |
}
|
8981 |
|
8982 |
/**
|
8983 |
* @author Vova Feldman (@svovaf)
|
8984 |
* @since 1.1.3
|
8985 |
*
|
8986 |
+
* @param bool|int|int[] $network_or_blog_ids Since 2.0.0.
|
8987 |
*/
|
8988 |
+
private function reset_anonymous_mode( $network_or_blog_ids = false ) {
|
8989 |
+
if ( true === $network_or_blog_ids ) {
|
8990 |
+
$this->unset_anonymous_mode( true );
|
8991 |
+
|
8992 |
+
if ( fs_is_network_admin() ) {
|
8993 |
+
$this->_is_anonymous = null;
|
8994 |
+
}
|
8995 |
+
|
8996 |
+
// Rest anonymous mode for all non-delegated sub-sites.
|
8997 |
+
$blog_ids = $this->get_non_delegated_blog_ids();
|
8998 |
+
}
|
8999 |
+
else
|
9000 |
+
{
|
9001 |
+
if ( false === $network_or_blog_ids ) {
|
9002 |
+
$network_or_blog_ids = 0;
|
9003 |
+
}
|
9004 |
+
|
9005 |
+
$blog_ids = is_array( $network_or_blog_ids ) ?
|
9006 |
+
$network_or_blog_ids :
|
9007 |
+
array( $network_or_blog_ids );
|
9008 |
+
|
9009 |
+
foreach ( $blog_ids as $blog_id ) {
|
9010 |
+
if ( 0 === $blog_id || get_current_blog_id() == $blog_id ) {
|
9011 |
+
$this->_is_anonymous = null;
|
9012 |
+
}
|
9013 |
+
}
|
9014 |
+
}
|
9015 |
+
|
9016 |
+
foreach ( $blog_ids as $blog_id ) {
|
9017 |
+
$this->unset_anonymous_mode( $blog_id );
|
9018 |
}
|
9019 |
|
9020 |
/**
|
9025 |
* @author Leo Fajardo (@leorw)
|
9026 |
* @since 1.2.2
|
9027 |
*/
|
9028 |
+
if ( ! $this->_is_network_active ) {
|
|
|
|
|
|
|
|
|
9029 |
$this->_is_anonymous = null;
|
9030 |
}
|
9031 |
}
|
9071 |
* @author Vova Feldman (@svovaf)
|
9072 |
* @since 1.1.1
|
9073 |
*
|
9074 |
+
* @param bool|int|int[] $network_or_blog_ids Since 2.5.1
|
|
|
9075 |
*/
|
9076 |
+
function skip_connection( $network_or_blog_ids = false ) {
|
9077 |
$this->_logger->entrance();
|
9078 |
|
9079 |
$this->_admin_notices->remove_sticky( 'connect_account' );
|
9080 |
|
9081 |
+
if ( true === $network_or_blog_ids ) {
|
9082 |
$this->set_anonymous_mode( true, true );
|
|
|
9083 |
|
9084 |
+
if ( fs_is_network_admin() ) {
|
9085 |
+
$this->_is_anonymous = null;
|
9086 |
+
}
|
9087 |
+
|
9088 |
+
// Rest anonymous mode for all non-delegated sub-sites.
|
9089 |
+
$blog_ids = $this->get_non_delegated_blog_ids();
|
9090 |
+
}
|
9091 |
+
else
|
9092 |
+
{
|
9093 |
+
if ( false === $network_or_blog_ids ) {
|
9094 |
+
$network_or_blog_ids = 0;
|
9095 |
+
}
|
9096 |
|
9097 |
+
$blog_ids = is_array( $network_or_blog_ids ) ?
|
9098 |
+
$network_or_blog_ids :
|
9099 |
+
array( $network_or_blog_ids );
|
9100 |
|
9101 |
+
foreach ( $blog_ids as $blog_id ) {
|
9102 |
+
if ( 0 === $blog_id || get_current_blog_id() == $blog_id ) {
|
9103 |
+
$this->_is_anonymous = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9104 |
}
|
9105 |
}
|
9106 |
+
}
|
9107 |
|
9108 |
+
foreach ( $blog_ids as $blog_id ) {
|
9109 |
+
$this->skip_site_connection( $blog_id );
|
|
|
|
|
|
|
9110 |
}
|
9111 |
|
9112 |
$this->network_upgrade_mode_completed();
|
9121 |
* @param int|null $blog_id
|
9122 |
* @param bool $send_skip
|
9123 |
*/
|
9124 |
+
private function skip_site_connection( $blog_id = null ) {
|
9125 |
$this->_logger->entrance();
|
9126 |
|
9127 |
$this->_admin_notices->remove_sticky( 'connect_account', $blog_id );
|
9128 |
|
9129 |
$this->set_anonymous_mode( true, $blog_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
9130 |
}
|
9131 |
|
9132 |
/**
|
9498 |
* @param string[] $override
|
9499 |
* @param bool $include_plugins Since 1.1.8 by default include plugin changes.
|
9500 |
* @param bool $include_themes Since 1.1.8 by default include plugin changes.
|
9501 |
+
* @param bool $include_blog_data Since 2.3.0 by default include the current blog's data (language, title, and URL).
|
9502 |
*
|
9503 |
* @return array
|
9504 |
*/
|
9508 |
$include_themes = true,
|
9509 |
$include_blog_data = true
|
9510 |
) {
|
9511 |
+
// Alias.
|
9512 |
+
$permissions = FS_Permission_Manager::instance( $this );
|
9513 |
+
|
9514 |
+
if ( $permissions->is_extensions_tracking_allowed() ) {
|
9515 |
if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
|
9516 |
/**
|
9517 |
* @since 1.1.8 Also send plugin updates.
|
9539 |
|
9540 |
$versions = $this->get_versions();
|
9541 |
|
9542 |
+
$blog_data = array();
|
9543 |
+
if ( $include_blog_data ) {
|
9544 |
+
$blog_data['url'] = self::get_unfiltered_site_url();
|
9545 |
+
|
9546 |
+
if ( $permissions->is_diagnostic_tracking_allowed() ) {
|
9547 |
+
$blog_data = array_merge( $blog_data, array(
|
9548 |
+
'language' => self::get_sanitized_language(),
|
9549 |
+
'title' => get_bloginfo( 'name' ),
|
9550 |
+
) );
|
9551 |
+
}
|
9552 |
+
}
|
9553 |
|
9554 |
return array_merge( $versions, $blog_data, array(
|
9555 |
'version' => $this->get_plugin_version(),
|
9556 |
'is_premium' => $this->is_premium(),
|
9557 |
// Special params.
|
9558 |
'is_active' => true,
|
|
|
9559 |
'is_uninstalled' => false,
|
9560 |
), $override );
|
9561 |
}
|
9570 |
*
|
9571 |
* @param string[] string $override
|
9572 |
* @param bool $only_diff
|
9573 |
+
* @param bool $is_keepalive
|
9574 |
* @param bool $include_plugins Since 1.1.8 by default include plugin changes.
|
9575 |
* @param bool $include_themes Since 1.1.8 by default include plugin changes.
|
9576 |
*
|
9579 |
private function get_installs_data_for_api(
|
9580 |
array $override,
|
9581 |
$only_diff = false,
|
9582 |
+
$is_keepalive = false,
|
9583 |
$include_plugins = true,
|
9584 |
$include_themes = true
|
9585 |
) {
|
9617 |
|
9618 |
$sites = self::get_sites();
|
9619 |
|
9620 |
+
$subsite_data_for_api_by_install_id = array();
|
9621 |
+
$install_url_by_install_id = array();
|
9622 |
+
$subsite_registration_date_by_install_id = array();
|
9623 |
+
|
9624 |
foreach ( $sites as $site ) {
|
9625 |
$blog_id = self::get_site_blog_id( $site );
|
9626 |
|
9632 |
continue;
|
9633 |
}
|
9634 |
|
9635 |
+
if ( ! $this->is_tracking_allowed( $blog_id, $install ) ) {
|
9636 |
// Don't send updates regarding opted-out installs.
|
9637 |
continue;
|
9638 |
}
|
9639 |
|
9640 |
+
$install_data = $this->get_site_info( $site, true );
|
9641 |
+
|
9642 |
+
if ( FS_Clone_Manager::instance()->is_temporary_duplicate_by_blog_id( $install_data['blog_id'] ) ) {
|
9643 |
+
continue;
|
9644 |
+
}
|
9645 |
+
|
9646 |
+
$uid = $install_data['uid'];
|
9647 |
+
$url = $install_data['url'];
|
9648 |
+
$registration_date = $install_data['registration_date'];
|
9649 |
+
|
9650 |
+
if ( isset( $subsite_data_for_api_by_install_id[ $install->id ] ) ) {
|
9651 |
+
$clone_subsite_data = $subsite_data_for_api_by_install_id[ $install->id ];
|
9652 |
+
$clone_install_url = $install_url_by_install_id[ $install->id ];
|
9653 |
+
$clone_subsite_registration_date = $subsite_registration_date_by_install_id[ $install->id ];
|
9654 |
+
|
9655 |
+
$skip = false;
|
9656 |
+
|
9657 |
+
if (
|
9658 |
+
! empty( $install_data['registration_date'] ) &&
|
9659 |
+
! empty( $clone_subsite_registration_date )
|
9660 |
+
) {
|
9661 |
+
/**
|
9662 |
+
* If the current subsite was created after the other subsite that is also linked to the same install ID, we assume that it's a clone (not the original), and therefore, would skip its processing.
|
9663 |
+
*
|
9664 |
+
* @author Leo Fajardo (@leorw)
|
9665 |
+
* @since 2.5.1
|
9666 |
+
*/
|
9667 |
+
$skip = ( strtotime( $install_data['registration_date'] ) > strtotime( $clone_subsite_registration_date ) );
|
9668 |
+
} else if (
|
9669 |
+
/**
|
9670 |
+
* If we already have an install with the same URL as the subsite it's stored in, skip the current subsite. Otherwise, replace the existing install's data with the current subsite's install's data if the URLs match.
|
9671 |
+
*
|
9672 |
+
* @author Leo Fajardo (@leorw)
|
9673 |
+
* @since 2.5.0
|
9674 |
+
*/
|
9675 |
+
fs_strip_url_protocol( untrailingslashit( $clone_install_url ) ) === fs_strip_url_protocol( untrailingslashit( $clone_subsite_data['url'] ) ) ||
|
9676 |
+
fs_strip_url_protocol( untrailingslashit( $install->url ) ) !== fs_strip_url_protocol( untrailingslashit( $url ) )
|
9677 |
+
) {
|
9678 |
+
$skip = true;
|
9679 |
+
}
|
9680 |
|
9681 |
+
if ( $skip ) {
|
9682 |
+
// Store the skipped subsite's ID so that the clone resolution manager can try to resolve the clone install that is stored in that subsite later on.
|
9683 |
+
FS_Clone_Manager::instance()->store_blog_install_info( $blog_id );
|
9684 |
+
continue;
|
9685 |
+
}
|
9686 |
+
}
|
9687 |
|
9688 |
unset( $install_data['blog_id'] );
|
9689 |
unset( $install_data['uid'] );
|
9690 |
+
unset( $install_data['url'] );
|
9691 |
+
unset( $install_data['registration_date'] );
|
9692 |
|
|
|
9693 |
$install_data['is_active'] = $this->is_active_for_site( $blog_id );
|
9694 |
$install_data['is_uninstalled'] = $install->is_uninstalled;
|
9695 |
|
9712 |
$is_common_diff_for_any_site = $is_common_diff_for_any_site || $is_common_diff;
|
9713 |
}
|
9714 |
|
9715 |
+
if ( ! empty( $install_data ) || $is_common_diff || $is_keepalive ) {
|
9716 |
// Add install ID and site unique ID.
|
9717 |
$install_data['id'] = $install->id;
|
9718 |
$install_data['uid'] = $uid;
|
9719 |
+
$install_data['url'] = $url;
|
9720 |
|
9721 |
+
$subsite_data_for_api_by_install_id[ $install->id ] = $install_data;
|
9722 |
+
$install_url_by_install_id[ $install->id ] = $install->url;
|
9723 |
+
$subsite_registration_date_by_install_id[ $install->id ] = $registration_date;
|
9724 |
}
|
9725 |
}
|
9726 |
}
|
9727 |
|
9728 |
restore_current_blog();
|
9729 |
|
9730 |
+
$installs_data = array_merge(
|
9731 |
+
$installs_data,
|
9732 |
+
array_values( $subsite_data_for_api_by_install_id )
|
9733 |
+
);
|
9734 |
+
|
9735 |
if ( 0 < count( $installs_data ) && ( $is_common_diff_for_any_site || ! $only_diff ) ) {
|
9736 |
if ( ! $only_diff ) {
|
9737 |
$installs_data[] = $common;
|
9769 |
if ( ( is_bool( $install->{$p} ) || ! empty( $install->{$p} ) ) &&
|
9770 |
$install->{$p} != $v
|
9771 |
) {
|
9772 |
+
$val = self::get_api_sanitized_property( $p, $v );
|
9773 |
+
|
9774 |
+
if ( $install->{$p} != $val ) {
|
9775 |
+
$install->{$p} = $val;
|
9776 |
+
$diff[ $p ] = $val;
|
9777 |
+
}
|
9778 |
}
|
9779 |
} else {
|
9780 |
$special[ $p ] = $v;
|
9799 |
return $diff;
|
9800 |
}
|
9801 |
|
9802 |
+
/**
|
9803 |
+
* @author Leo Fajardo (@leorw)
|
9804 |
+
* @since 2.5.1
|
9805 |
+
*/
|
9806 |
+
private function send_pending_clone_update_once() {
|
9807 |
+
$this->_logger->entrance();
|
9808 |
+
|
9809 |
+
if ( ! empty( $this->_storage->clone_id ) ) {
|
9810 |
+
return;
|
9811 |
+
}
|
9812 |
+
|
9813 |
+
$install_clone = $this->get_api_site_scope()->call(
|
9814 |
+
'/clones',
|
9815 |
+
'post',
|
9816 |
+
array( 'site_url' => self::get_unfiltered_site_url() )
|
9817 |
+
);
|
9818 |
+
|
9819 |
+
if ( $this->is_api_result_entity( $install_clone ) ) {
|
9820 |
+
$this->_storage->clone_id = $install_clone->id;
|
9821 |
+
}
|
9822 |
+
}
|
9823 |
+
|
9824 |
+
/**
|
9825 |
+
* @author Leo Fajardo (@leorw)
|
9826 |
+
* @since 2.5.1
|
9827 |
+
*
|
9828 |
+
* @param string $resolution_type
|
9829 |
+
* @param FS_Site $clone_context_install
|
9830 |
+
*/
|
9831 |
+
function send_clone_resolution_update( $resolution_type, $clone_context_install ) {
|
9832 |
+
$this->_logger->entrance();
|
9833 |
+
|
9834 |
+
if ( empty( $this->_storage->clone_id ) ) {
|
9835 |
+
return;
|
9836 |
+
}
|
9837 |
+
|
9838 |
+
$new_install_id = null;
|
9839 |
+
$current_site = null;
|
9840 |
+
|
9841 |
+
$flush = false;
|
9842 |
+
|
9843 |
+
/**
|
9844 |
+
* If the current site is now different from the context install before the clone resolution, we need to override `$this->_site` so that the API call below will be made with the right install scope entity.
|
9845 |
+
*/
|
9846 |
+
if ( $clone_context_install->id != $this->_site->id ) {
|
9847 |
+
$new_install_id = $this->_site->id;
|
9848 |
+
$current_site = $this->_site;
|
9849 |
+
$this->_site = $clone_context_install;
|
9850 |
+
|
9851 |
+
$flush = true;
|
9852 |
+
}
|
9853 |
+
|
9854 |
+
$this->get_api_site_scope( $flush )->call(
|
9855 |
+
"/clones/{$this->_storage->clone_id}",
|
9856 |
+
'put',
|
9857 |
+
array(
|
9858 |
+
'resolution' => $resolution_type,
|
9859 |
+
'new_install_id' => $new_install_id,
|
9860 |
+
)
|
9861 |
+
);
|
9862 |
+
|
9863 |
+
if ( is_object( $current_site ) ) {
|
9864 |
+
/**
|
9865 |
+
* Ensure that the install scope entity is updated back to the previous install entity.
|
9866 |
+
*/
|
9867 |
+
$this->_site = $current_site;
|
9868 |
+
|
9869 |
+
// Restore the previous install scope entity of the API.
|
9870 |
+
$this->get_api_site_scope( true );
|
9871 |
+
}
|
9872 |
+
}
|
9873 |
+
|
9874 |
/**
|
9875 |
* Update install only if changed.
|
9876 |
*
|
9879 |
*
|
9880 |
* @param string[] string $override
|
9881 |
* @param bool $flush
|
9882 |
+
* @param bool $is_two_way_sync @since 2.5.0 If true and there's a successful API request, the install sync cron will be cleared.
|
9883 |
*
|
9884 |
* @return false|object|string
|
9885 |
*/
|
9886 |
+
private function send_install_update( $override = array(), $flush = false, $is_two_way_sync = false ) {
|
9887 |
$this->_logger->entrance();
|
9888 |
|
9889 |
$check_properties = $this->get_install_data_for_api( $override );
|
9894 |
$params = $this->get_install_diff_for_api( $check_properties, $this->_site, $override );
|
9895 |
}
|
9896 |
|
|
|
9897 |
if ( empty( $params ) ) {
|
9898 |
$keepalive_only_update = $this->should_send_keepalive_update();
|
9899 |
|
9908 |
}
|
9909 |
}
|
9910 |
|
9911 |
+
if ( $is_two_way_sync ) {
|
9912 |
/**
|
9913 |
+
* Update last install sync timestamp during a two-way sync call as we expect that updates are sent during this call.
|
|
|
9914 |
*
|
9915 |
* @author Leo Fajardo (@leorw)
|
9916 |
* @since 2.2.3
|
9926 |
$this->set_keepalive_timestamp();
|
9927 |
|
9928 |
// Send updated values to FS.
|
9929 |
+
$site = $this->api_site_call( '/', 'put', $params, true );
|
9930 |
|
9931 |
+
if ( $is_two_way_sync && $this->is_api_result_entity( $site ) ) {
|
9932 |
/**
|
9933 |
+
* Clear scheduled install sync after a two-way sync call.
|
9934 |
*
|
9935 |
* @author Leo Fajardo (@leorw)
|
9936 |
* @since 2.2.3
|
9952 |
*
|
9953 |
* @param string[] string $override
|
9954 |
* @param bool $flush
|
9955 |
+
* @param bool $is_two_way_sync @since 2.5.0 If true and there's a successful API request, the install sync cron will be cleared.
|
9956 |
*
|
9957 |
* @return false|object|string
|
9958 |
*/
|
9959 |
+
private function send_installs_update( $override = array(), $flush = false, $is_two_way_sync = false ) {
|
9960 |
$this->_logger->entrance();
|
9961 |
|
9962 |
+
/**
|
9963 |
+
* Pass `true` to use the network level storage since the update is for many installs.
|
9964 |
+
*
|
9965 |
+
* @author Leo Fajardo (@leorw)
|
9966 |
+
* @since 2.2.3
|
9967 |
+
*/
|
9968 |
+
$should_send_keepalive = $this->should_send_keepalive_update( true );
|
9969 |
|
9970 |
+
$installs_data = $this->get_installs_data_for_api( $override, ! $flush, $should_send_keepalive );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9971 |
|
9972 |
+
if ( empty( $installs_data ) ) {
|
9973 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9974 |
}
|
9975 |
|
9976 |
+
if ( $is_two_way_sync ) {
|
9977 |
+
// Update last install sync timestamp during a two-way sync call as we expect that updates are sent during this call.
|
9978 |
$this->set_cron_execution_timestamp( 'install_sync' );
|
9979 |
}
|
9980 |
|
9989 |
// Send updated values to FS.
|
9990 |
$result = $this->get_api_user_scope()->call( "/plugins/{$this->_plugin->id}/installs.json", 'put', $installs_data );
|
9991 |
|
9992 |
+
if ( $is_two_way_sync && $this->is_api_result_object( $result, 'installs' ) ) {
|
9993 |
+
// I successfully sent a two-way installs update, clear the scheduled install sync if it exists.
|
9994 |
$this->clear_install_sync_cron();
|
9995 |
}
|
9996 |
|
10040 |
* @param string[] string $override
|
10041 |
* @param bool $flush
|
10042 |
*/
|
10043 |
+
function sync_install( $override = array(), $flush = false ) {
|
10044 |
$this->_logger->entrance();
|
10045 |
|
10046 |
+
$site = $this->send_install_update( $override, $flush, true );
|
10047 |
|
10048 |
if ( false === $site ) {
|
10049 |
// No sync required.
|
10072 |
private function sync_installs( $override = array(), $flush = false ) {
|
10073 |
$this->_logger->entrance();
|
10074 |
|
10075 |
+
$result = $this->send_installs_update( $override, $flush, true );
|
10076 |
|
10077 |
if ( false === $result ) {
|
10078 |
// No sync required.
|
10227 |
// Send uninstall event.
|
10228 |
$this->send_installs_update( $params );
|
10229 |
} else {
|
10230 |
+
// Send uninstall event and handle the result.
|
10231 |
+
$this->sync_install( $params );
|
10232 |
}
|
10233 |
}
|
10234 |
|
10325 |
return;
|
10326 |
}
|
10327 |
|
10328 |
+
if (
|
10329 |
+
! $fs->is_clone() &&
|
10330 |
+
/**
|
10331 |
+
* If there's a context install, run this method only when there's also a context user (e.g., when cloning a subsite of a multisite network into a single-site installation, it's possible for an install to be associated with a non-existing user entity; we want Freemius to be off in this case, while we are trying to recover the user).
|
10332 |
+
*
|
10333 |
+
* @author Leo Fajardo
|
10334 |
+
*/
|
10335 |
+
( ! is_object( $fs->_site ) || $fs->is_registered() )
|
10336 |
+
) {
|
10337 |
+
$fs->_uninstall_plugin_event();
|
10338 |
+
}
|
10339 |
|
10340 |
$fs->do_action( 'after_uninstall' );
|
10341 |
}
|
10446 |
* @return string
|
10447 |
*/
|
10448 |
function get_premium_slug() {
|
10449 |
+
return ( is_object( $this->_plugin ) && ! empty( $this->_plugin->premium_slug ) ) ?
|
10450 |
$this->_plugin->premium_slug :
|
10451 |
"{$this->_slug}-premium";
|
10452 |
}
|
10499 |
null;
|
10500 |
}
|
10501 |
|
10502 |
+
/**
|
10503 |
+
* Get whether the SDK has been initiated in the context of a Bundle.
|
10504 |
+
*
|
10505 |
+
* This will return true, if `bundle_id` is present in the SDK init parameters.
|
10506 |
+
*
|
10507 |
+
* ```php
|
10508 |
+
* $my_fs = fs_dynamic_init( array(
|
10509 |
+
* // ...
|
10510 |
+
* 'bundle_id' => 'XXXX', // Will return true since we have bundle id.
|
10511 |
+
* 'bundle_public_key' => 'pk_XXXX',
|
10512 |
+
* ) );
|
10513 |
+
* ```
|
10514 |
+
*
|
10515 |
+
* @author Swashata Ghosh (@swashata)
|
10516 |
+
* @since 2.5.0
|
10517 |
+
*
|
10518 |
+
* @return bool True if we are running in bundle context, false otherwise.
|
10519 |
+
*/
|
10520 |
+
private function has_bundle_context() {
|
10521 |
+
return ! is_null( $this->get_bundle_id() );
|
10522 |
+
}
|
10523 |
+
|
10524 |
/**
|
10525 |
* @author Vova Feldman (@svovaf)
|
10526 |
* @since 1.2.1.5
|
10565 |
function get_eula_url() {
|
10566 |
return $this->apply_filters(
|
10567 |
'eula_url',
|
10568 |
+
"https://freemius.com/product/{$this->_plugin->id}/{$this->_slug}/legal/eula/"
|
10569 |
);
|
10570 |
}
|
10571 |
|
10753 |
#endregion ------------------------------------------------------------------
|
10754 |
|
10755 |
/* Account
|
10756 |
+
------------------------------------------------------------------------------------------------------------------*/
|
10757 |
|
10758 |
/**
|
10759 |
* Find plugin's slug by plugin's basename.
|
10817 |
*/
|
10818 |
private static function get_all_sites(
|
10819 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN,
|
10820 |
+
$blog_id = null,
|
10821 |
+
$is_backup = false
|
10822 |
) {
|
10823 |
+
$sites = self::get_account_option(
|
10824 |
+
( $is_backup ? 'prev_' : '' ) . 'sites',
|
10825 |
+
$module_type,
|
10826 |
+
$blog_id
|
10827 |
+
);
|
10828 |
|
10829 |
if ( ! is_array( $sites ) ) {
|
10830 |
$sites = array();
|
11184 |
*
|
11185 |
* @author Vova Feldman (@svovaf)
|
11186 |
* @since 1.0.1
|
11187 |
+
*
|
11188 |
+
* @param bool $ignore_anonymous_state Since 2.5.1
|
11189 |
+
*
|
11190 |
* @return bool
|
11191 |
*/
|
11192 |
+
function is_registered( $ignore_anonymous_state = false ) {
|
11193 |
+
return (
|
11194 |
+
is_object( $this->_user ) &&
|
11195 |
+
(
|
11196 |
+
$this->is_premium() ||
|
11197 |
+
$ignore_anonymous_state ||
|
11198 |
+
! $this->is_anonymous()
|
11199 |
+
)
|
11200 |
+
);
|
11201 |
}
|
11202 |
|
11203 |
/**
|
11208 |
*
|
11209 |
* @return bool
|
11210 |
*/
|
11211 |
+
function is_tracking_allowed( $blog_id = null, $install = null ) {
|
11212 |
+
if ( is_null( $install ) ) {
|
11213 |
+
$install = is_null( $blog_id ) ?
|
11214 |
+
$this->_site :
|
11215 |
+
$this->get_install_by_blog_id( $blog_id );
|
11216 |
+
}
|
11217 |
+
|
11218 |
+
return (
|
11219 |
+
is_object( $install ) &&
|
11220 |
+
FS_Permission_Manager::instance( $this )->is_homepage_url_tracking_allowed( $blog_id )
|
11221 |
+
);
|
11222 |
+
}
|
11223 |
+
|
11224 |
+
/**
|
11225 |
+
* Returns TRUE if the user never opted-in or manually opted-out.
|
11226 |
+
*
|
11227 |
+
* @author Vova Feldman (@svovaf)
|
11228 |
+
* @since 1.2.1.5
|
11229 |
+
*
|
11230 |
+
* @param int|null $blog_id
|
11231 |
+
*
|
11232 |
+
* @return bool
|
11233 |
+
*/
|
11234 |
+
function is_tracking_prohibited( $blog_id = null ) {
|
11235 |
+
return (
|
11236 |
+
! $this->is_registered( true ) ||
|
11237 |
+
! $this->is_tracking_allowed( $blog_id )
|
11238 |
+
);
|
11239 |
}
|
11240 |
|
11241 |
/**
|
11271 |
}
|
11272 |
|
11273 |
/**
|
11274 |
+
* @author Vova Feldman (@svovaf)
|
11275 |
+
* @since 1.0.3
|
11276 |
+
*
|
11277 |
+
* @return FS_Site
|
11278 |
+
*/
|
11279 |
+
function get_site() {
|
11280 |
+
return $this->_site;
|
11281 |
+
}
|
11282 |
+
|
11283 |
+
/**
|
11284 |
+
* @author Leo Fajardo (@leorw)
|
11285 |
+
* @since 2.5.0
|
11286 |
+
*/
|
11287 |
+
function store_site( $site ) {
|
11288 |
+
$this->_site = $site;
|
11289 |
+
$this->_store_site( true );
|
11290 |
+
}
|
11291 |
+
|
11292 |
+
/**
|
11293 |
+
* Deletes the current install with an option to back it up in case restoration will be needed (e.g., if the automatic clone resolution attempt fails).
|
11294 |
+
*
|
11295 |
+
* @author Leo Fajardo (@leorw)
|
11296 |
+
* @since 2.5.0
|
11297 |
+
*/
|
11298 |
+
function delete_current_install( $back_up ) {
|
11299 |
+
// Back up and delete the unique ID.
|
11300 |
+
if ( $back_up ) {
|
11301 |
+
self::$_accounts->set_option( 'prev_unique_id', $this->get_anonymous_id() );
|
11302 |
+
}
|
11303 |
+
|
11304 |
+
self::$_accounts->set_option( 'unique_id', null );
|
11305 |
+
|
11306 |
+
if ( $back_up ) {
|
11307 |
+
// Back up the install before deleting it so that it can be restored later on if necessary (e.g., if the automatic clone resolution attempt fails).
|
11308 |
+
$this->back_up_site();
|
11309 |
+
}
|
11310 |
+
|
11311 |
+
$this->_delete_site();
|
11312 |
+
$this->_site = null;
|
11313 |
+
}
|
11314 |
+
|
11315 |
+
/**
|
11316 |
+
* @author Leo Fajardo (@leorw)
|
11317 |
+
* @since 2.5.0
|
11318 |
*/
|
11319 |
+
function restore_backup_site() {
|
11320 |
+
self::$_accounts->set_option(
|
11321 |
+
'unique_id',
|
11322 |
+
self::$_accounts->get_option( 'prev_unique_id' )
|
11323 |
+
);
|
11324 |
+
|
11325 |
+
$sites = self::get_all_sites( $this->_module_type, null, true );
|
11326 |
+
$this->store_site( clone $sites[ $this->_slug ] );
|
11327 |
}
|
11328 |
|
11329 |
/**
|
12607 |
} else {
|
12608 |
$url = is_object( $site ) ?
|
12609 |
$site->siteurl :
|
12610 |
+
self::get_unfiltered_site_url( $blog_id );
|
12611 |
|
12612 |
$disconnected_site_ids[] = $blog_id;
|
12613 |
}
|
12980 |
} else if ( $is_whitelabeled_flag ) {
|
12981 |
$is_whitelabeled = true;
|
12982 |
} else {
|
12983 |
+
if ( $this->is_registered() || $this->is_premium() ) {
|
12984 |
+
$addon_ids = $this->get_updated_account_addons();
|
12985 |
+
} else {
|
12986 |
+
$addons = self::get_all_addons();
|
12987 |
+
|
12988 |
+
$plugin_addons = isset( $addons[ $this->_plugin->id ] ) ?
|
12989 |
+
$addons[ $this->_plugin->id ] :
|
12990 |
+
array();
|
12991 |
+
|
12992 |
+
$addon_ids = array();
|
12993 |
+
foreach ( $plugin_addons as $addon ) {
|
12994 |
+
$addon_ids[] = $addon->id;
|
12995 |
+
}
|
12996 |
+
}
|
12997 |
+
|
12998 |
$installed_addons = $this->get_installed_addons();
|
12999 |
foreach ( $installed_addons as $fs_addon ) {
|
13000 |
$addon_ids[] = $fs_addon->get_id();
|
13423 |
fs_require_template( 'forms/resend-key.php', $vars );
|
13424 |
}
|
13425 |
|
13426 |
+
/**
|
13427 |
+
* Displays an email address update dialog box when the user clicks on the email address "Edit" button on the "Account" page.
|
13428 |
+
*
|
13429 |
+
* @author Leo Fajardo (@leorw)
|
13430 |
+
* @since 2.5.0
|
13431 |
+
*/
|
13432 |
+
function _add_email_address_update_dialog_box() {
|
13433 |
+
$vars = array( 'id' => $this->_module_id );
|
13434 |
+
|
13435 |
+
fs_require_template( 'forms/email-address-update.php', $vars );
|
13436 |
+
}
|
13437 |
+
|
13438 |
+
/**
|
13439 |
+
* @author Leo Fajardo (@leorw)
|
13440 |
+
* @since 2.5.0
|
13441 |
+
*/
|
13442 |
+
function _add_email_address_update_option() {
|
13443 |
+
if ( ! $this->should_handle_user_change() ) {
|
13444 |
+
return;
|
13445 |
+
}
|
13446 |
+
|
13447 |
+
// Add email address update AJAX handler.
|
13448 |
+
$this->add_ajax_action( 'update_email_address', array( &$this, '_email_address_update_ajax_handler' ) );
|
13449 |
+
}
|
13450 |
+
|
13451 |
+
/**
|
13452 |
+
* @author Leo Fajardo (@leorw)
|
13453 |
+
* @since 2.5.0
|
13454 |
+
*/
|
13455 |
+
function _email_address_update_ajax_handler() {
|
13456 |
+
$this->check_ajax_referer( 'update_email_address' );
|
13457 |
+
|
13458 |
+
$new_email_address = fs_request_get( 'email_address' );
|
13459 |
+
$transfer_type = fs_request_get( 'transfer_type' );
|
13460 |
+
|
13461 |
+
$result = $this->update_email( $new_email_address );
|
13462 |
+
|
13463 |
+
if ( ! FS_Api::is_api_error( $result ) ) {
|
13464 |
+
self::shoot_ajax_success();
|
13465 |
+
}
|
13466 |
+
|
13467 |
+
$error = '';
|
13468 |
+
|
13469 |
+
if ( FS_Api::is_api_error_object( $result ) ) {
|
13470 |
+
switch ( $result->error->code ) {
|
13471 |
+
case 'user_exist':
|
13472 |
+
case 'account_verification_required':
|
13473 |
+
$error = array(
|
13474 |
+
'code' => 'change_ownership',
|
13475 |
+
'url' => $this->get_account_url( 'change_owner', array(
|
13476 |
+
'state' => 'init',
|
13477 |
+
'candidate_email' => $new_email_address,
|
13478 |
+
'transfer_type' => $transfer_type,
|
13479 |
+
) ),
|
13480 |
+
);
|
13481 |
+
|
13482 |
+
break;
|
13483 |
+
}
|
13484 |
+
}
|
13485 |
+
|
13486 |
+
if ( empty( $error ) ) {
|
13487 |
+
$error = is_object( $result ) ?
|
13488 |
+
var_export( $result->error, true ) :
|
13489 |
+
$result;
|
13490 |
+
}
|
13491 |
+
|
13492 |
+
self::shoot_ajax_failure( $error );
|
13493 |
+
}
|
13494 |
+
|
13495 |
/**
|
13496 |
* Returns a collection of IDs of installs that are associated with the context product and its add-ons, and activated with foreign licenses.
|
13497 |
*
|
13699 |
( $is_network_admin && $this->is_network_active() && ! $this->is_network_delegated_connection() ) ||
|
13700 |
( ! $is_network_admin && ( ! $this->is_network_active() || $this->is_delegated_connection() ) )
|
13701 |
) {
|
13702 |
+
if (
|
13703 |
+
$this->is_premium() ||
|
13704 |
+
( $this->has_paid_plan() && ! $this->has_premium_version() )
|
13705 |
+
) {
|
13706 |
+
/**
|
13707 |
+
* @since 1.2.0 Add license action link only on plugins page.
|
13708 |
+
*/
|
13709 |
+
$this->_add_license_action_link();
|
13710 |
+
}
|
13711 |
}
|
13712 |
}
|
13713 |
|
13879 |
self::shoot_ajax_failure();
|
13880 |
}
|
13881 |
|
13882 |
+
$site = $this->api_site_call(
|
13883 |
'',
|
13884 |
'put',
|
13885 |
array(
|
13932 |
fs_request_get( 'blog_id', null ),
|
13933 |
fs_request_get( 'module_id', null, 'post' ),
|
13934 |
fs_request_get( 'user_id', null ),
|
13935 |
+
fs_request_get_bool( 'is_extensions_tracking_allowed', null ),
|
13936 |
+
fs_request_get_bool( 'is_diagnostic_tracking_allowed', null )
|
13937 |
);
|
13938 |
|
13939 |
if (
|
14178 |
* @param null|int $blog_id
|
14179 |
* @param null|number $plugin_id
|
14180 |
* @param null|number $license_owner_id
|
14181 |
+
* @param bool|null $is_extensions_tracking_allowed
|
14182 |
+
* @param bool|null $is_diagnostic_tracking_allowed Since 2.5.0.2 to allow license activation with minimal data footprint.
|
14183 |
+
*
|
14184 |
*
|
14185 |
* @return array {
|
14186 |
* @var bool $success
|
14195 |
$blog_id = null,
|
14196 |
$plugin_id = null,
|
14197 |
$license_owner_id = null,
|
14198 |
+
$is_extensions_tracking_allowed = null,
|
14199 |
+
$is_diagnostic_tracking_allowed = null
|
14200 |
) {
|
14201 |
$this->_logger->entrance();
|
14202 |
|
14216 |
$this :
|
14217 |
$this->get_addon_instance( $plugin_id );
|
14218 |
|
14219 |
+
FS_Permission_Manager::instance( $this )->update_permissions_tracking_flag( array(
|
14220 |
+
FS_Permission_Manager::PERMISSION_DIAGNOSTIC => $is_diagnostic_tracking_allowed,
|
14221 |
+
FS_Permission_Manager::PERMISSION_EXTENSIONS => $is_extensions_tracking_allowed,
|
14222 |
+
) );
|
14223 |
|
14224 |
$error = false;
|
14225 |
$next_page = false;
|
14384 |
}
|
14385 |
}
|
14386 |
|
14387 |
+
$all_sites = self::get_sites();
|
14388 |
+
$pending_blog_ids = array();
|
14389 |
|
14390 |
/**
|
14391 |
* Check if there are any sites that are not connected, skipped, nor delegated. For every site that falls into that category, if the product is freemium, skip the connection. If the product is premium only, delegate the connection to the site administrator.
|
14415 |
continue;
|
14416 |
}
|
14417 |
|
14418 |
+
$pending_blog_ids[] = $blog_id;
|
14419 |
}
|
14420 |
|
14421 |
+
if ( ! empty( $pending_blog_ids ) ) {
|
14422 |
if ( $fs->is_freemium() && $fs->is_enable_anonymous() ) {
|
14423 |
+
$fs->skip_connection( $pending_blog_ids );
|
14424 |
} else {
|
14425 |
+
$fs->delegate_connection( $pending_blog_ids );
|
14426 |
}
|
14427 |
}
|
14428 |
}
|
14500 |
|
14501 |
$addon_info = $fs->_get_addon_info( $addon_id, $is_installed );
|
14502 |
|
14503 |
+
if ( ! isset( $addon_info['is_connected'] ) || ! $addon_info['is_connected'] ) {
|
14504 |
// Add-on is not associated with an install entity.
|
14505 |
continue;
|
14506 |
}
|
14558 |
$this->delegate_connection();
|
14559 |
} else {
|
14560 |
if ( ! empty( $sites_by_action['delegate'] ) ) {
|
14561 |
+
$this->delegate_connection( self::get_sites_blog_ids( $sites_by_action['delegate'] ) );
|
14562 |
}
|
14563 |
|
14564 |
if ( ! empty( $sites_by_action['skip'] ) ) {
|
14565 |
+
$this->skip_connection( self::get_sites_blog_ids( $sites_by_action['skip'] ) );
|
14566 |
}
|
14567 |
|
14568 |
if ( empty( $sites_by_action['allow'] ) ) {
|
14880 |
return $this->_plugin->has_affiliate_program();
|
14881 |
}
|
14882 |
|
14883 |
+
/**
|
14884 |
+
* Get Plugin ID under which we will track affiliate application.
|
14885 |
+
*
|
14886 |
+
* This could either be the Bundle ID or the main plugin ID.
|
14887 |
+
*
|
14888 |
+
* @return number Bundle ID if developer has provided one, else the main plugin ID.
|
14889 |
+
*/
|
14890 |
+
private function get_plugin_id_for_affiliate_terms() {
|
14891 |
+
return $this->has_bundle_context() ?
|
14892 |
+
$this->get_bundle_id() :
|
14893 |
+
$this->_plugin_id;
|
14894 |
+
}
|
14895 |
+
|
14896 |
/**
|
14897 |
* @author Leo Fajardo (@leorw)
|
14898 |
* @since 1.2.4
|
14899 |
*/
|
14900 |
private function fetch_affiliate_terms() {
|
14901 |
if ( ! is_object( $this->plugin_affiliate_terms ) ) {
|
14902 |
+
/**
|
14903 |
+
* In case we have a bundle set in SDK configuration, we would like to use that for affiliates, not the main plugin.
|
14904 |
+
*/
|
14905 |
+
$plugins_api = $this->has_bundle_context() ?
|
14906 |
+
$this->get_api_bundle_scope() :
|
14907 |
+
$this->get_api_plugin_scope();
|
14908 |
+
|
14909 |
$affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation', false );
|
14910 |
|
14911 |
+
/**
|
14912 |
+
* At this point, we intentionally don't fallback to the main plugin, because the developer has chosen to use bundle. So it makes sense the affiliate program should be in context to the bundle too.
|
14913 |
+
*/
|
14914 |
if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
|
14915 |
return;
|
14916 |
}
|
14928 |
$application_data = $this->_storage->affiliate_application_data;
|
14929 |
$flush = ( ! isset( $application_data['status'] ) || 'pending' === $application_data['status'] );
|
14930 |
|
14931 |
+
$plugin_id_for_affiliate = $this->get_plugin_id_for_affiliate_terms();
|
14932 |
+
|
14933 |
$users_api = $this->get_api_user_scope();
|
14934 |
+
$result = $users_api->get( "/plugins/{$plugin_id_for_affiliate}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json", $flush );
|
14935 |
if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
|
14936 |
if ( ! empty( $result->affiliates ) ) {
|
14937 |
$affiliate = new FS_Affiliate( $result->affiliates[0] );
|
15031 |
var_export( $next_page, true )
|
15032 |
);
|
15033 |
} else if ( $this->is_pending_activation() ) {
|
15034 |
+
self::shoot_ajax_failure( $this->get_text_inline( 'Account is pending activation. Please check your email and click the link to activate your account and then submit the affiliate form again.', 'account-is-pending-activation' ) );
|
15035 |
}
|
15036 |
}
|
15037 |
|
15038 |
$this->fetch_affiliate_terms();
|
15039 |
|
15040 |
+
$plugin_id_for_affiliate = $this->get_plugin_id_for_affiliate_terms();
|
15041 |
+
|
15042 |
$api = $this->get_api_user_scope();
|
15043 |
$result = $api->call(
|
15044 |
+
( "/plugins/{$plugin_id_for_affiliate}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
|
15045 |
'post',
|
15046 |
$affiliate
|
15047 |
);
|
15503 |
return ( defined( 'DOING_CRON' ) && DOING_CRON );
|
15504 |
}
|
15505 |
|
15506 |
+
/**
|
15507 |
+
* @author Leo Fajardo (@leorw)
|
15508 |
+
* @since 2.5.0
|
15509 |
+
*
|
15510 |
+
* @return bool
|
15511 |
+
*/
|
15512 |
+
static function is_admin_post() {
|
15513 |
+
return ( 'admin-post.php' === self::get_current_page() );
|
15514 |
+
}
|
15515 |
+
|
15516 |
/**
|
15517 |
* Check if a real user is visiting the admin dashboard.
|
15518 |
*
|
15526 |
is_admin() &&
|
15527 |
! self::is_ajax() &&
|
15528 |
! self::is_cron() &&
|
15529 |
+
! self::is_admin_post()
|
15530 |
);
|
15531 |
}
|
15532 |
|
15678 |
* @author Leo Fajardo (@leorw)
|
15679 |
* @since 2.0.0
|
15680 |
*
|
15681 |
+
* @param bool|int[] $all_or_blog_ids
|
15682 |
*/
|
15683 |
+
private function delegate_connection( $all_or_blog_ids = true ) {
|
15684 |
$this->_logger->entrance();
|
15685 |
|
15686 |
$this->_admin_notices->remove_sticky( 'connect_account' );
|
15687 |
|
15688 |
+
if ( true === $all_or_blog_ids ) {
|
15689 |
// All sites delegation.
|
15690 |
+
$this->_storage->store( 'is_delegated_connection', true, true );
|
15691 |
} else {
|
15692 |
// Specified sites delegation.
|
15693 |
+
foreach ( $all_or_blog_ids as $blog_id ) {
|
15694 |
+
$this->delegate_site_connection( $blog_id );
|
15695 |
}
|
15696 |
}
|
15697 |
|
15707 |
* @param int $blog_id
|
15708 |
*/
|
15709 |
private function delegate_site_connection( $blog_id ) {
|
15710 |
+
$this->_storage->store( 'is_delegated_connection', true, $blog_id );
|
15711 |
}
|
15712 |
|
15713 |
/**
|
15747 |
}
|
15748 |
|
15749 |
/**
|
15750 |
+
* Check if delegated the connection. When running within the network admin,
|
15751 |
* and haven't specified the blog ID, checks if network level delegated. If running
|
15752 |
* within a site admin or specified a blog ID, check if delegated the connection for
|
15753 |
* the current context site.
|
15807 |
}
|
15808 |
|
15809 |
/**
|
15810 |
+
* @todo Implement pagination when accessing the subsites collection.
|
15811 |
+
*
|
15812 |
* @author Leo Fajardo (@leorw)
|
15813 |
* @since 2.0.0
|
15814 |
*
|
15815 |
+
* @param int $limit Default to 1,000
|
15816 |
+
* @param int $offset Default to 0
|
15817 |
+
*
|
15818 |
* @return array Active & public sites collection.
|
15819 |
*/
|
15820 |
+
static function get_sites( $limit = 1000, $offset = 0 ) {
|
15821 |
if ( ! is_multisite() ) {
|
15822 |
return array();
|
15823 |
}
|
15839 |
'mature' => 0,
|
15840 |
'spam' => 0,
|
15841 |
'deleted' => 0,
|
15842 |
+
'number' => $limit,
|
15843 |
+
'offset' => $offset,
|
15844 |
);
|
15845 |
|
15846 |
+
return get_sites( $args );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15847 |
}
|
15848 |
|
15849 |
/**
|
15892 |
$address_to_blog_map = array();
|
15893 |
foreach ( $sites as $site ) {
|
15894 |
$blog_id = self::get_site_blog_id( $site );
|
15895 |
+
$address = self::get_unfiltered_site_url( $blog_id, true, true );
|
15896 |
$address_to_blog_map[ $address ] = $blog_id;
|
15897 |
}
|
15898 |
|
15928 |
return $install_map;
|
15929 |
}
|
15930 |
|
15931 |
+
/**
|
15932 |
+
* @author Vova Feldman (@svovaf)
|
15933 |
+
* @since 2.5.1
|
15934 |
+
*
|
15935 |
+
* @param bool|null $is_delegated When `true`, returns only connection delegated blog IDs. When `false`, only non-delegated blog IDs.
|
15936 |
+
*
|
15937 |
+
* @return int[]
|
15938 |
+
*/
|
15939 |
+
private function get_blog_ids( $is_delegated = null ) {
|
15940 |
+
$blog_ids = array();
|
15941 |
+
|
15942 |
+
$sites = self::get_sites();
|
15943 |
+
foreach ( $sites as $site ) {
|
15944 |
+
$blog_id = self::get_site_blog_id( $site );
|
15945 |
+
|
15946 |
+
if (
|
15947 |
+
is_null( $is_delegated ) ||
|
15948 |
+
$is_delegated === $this->is_site_delegated_connection( $blog_id )
|
15949 |
+
) {
|
15950 |
+
$blog_ids[] = $blog_id;
|
15951 |
+
}
|
15952 |
+
}
|
15953 |
+
|
15954 |
+
return $blog_ids;
|
15955 |
+
}
|
15956 |
+
|
15957 |
+
/**
|
15958 |
+
* @author Vova Feldman (@svovaf)
|
15959 |
+
* @since 2.5.1
|
15960 |
+
*
|
15961 |
+
* @return int[]
|
15962 |
+
*/
|
15963 |
+
private function get_non_delegated_blog_ids() {
|
15964 |
+
return $this->get_blog_ids( false );
|
15965 |
+
}
|
15966 |
+
|
15967 |
/**
|
15968 |
* Gets a map of module IDs that the given user has opted-in to.
|
15969 |
*
|
16048 |
*
|
16049 |
* @param int $blog_id
|
16050 |
* @param FS_Site $install
|
16051 |
+
* @param bool $flush
|
16052 |
*
|
16053 |
* @return bool Since 2.3.1 returns if a switch was made.
|
16054 |
*/
|
16055 |
+
function switch_to_blog( $blog_id, FS_Site $install = null, $flush = false ) {
|
16056 |
+
if ( ! is_numeric( $blog_id ) ) {
|
16057 |
+
return false;
|
16058 |
+
}
|
16059 |
+
|
16060 |
+
if ( ! $flush && $blog_id == $this->_context_is_network_or_blog_id ) {
|
16061 |
return false;
|
16062 |
}
|
16063 |
|
16121 |
unset( $this->_site_api );
|
16122 |
unset( $this->_user_api );
|
16123 |
|
16124 |
+
return true;
|
16125 |
}
|
16126 |
|
16127 |
/**
|
16150 |
$site['blog_id'] );
|
16151 |
}
|
16152 |
|
16153 |
+
/**
|
16154 |
+
* @author Vova Feldman (@svovaf)
|
16155 |
+
* @since 2.5.1
|
16156 |
+
*
|
16157 |
+
* @param WP_Site[]|array[] $sites
|
16158 |
+
*
|
16159 |
+
* @return int[]
|
16160 |
+
*/
|
16161 |
+
static function get_sites_blog_ids( $sites ) {
|
16162 |
+
$blog_ids = array();
|
16163 |
+
foreach ( $sites as $site ) {
|
16164 |
+
$blog_ids[] = self::get_site_blog_id( $site );
|
16165 |
+
}
|
16166 |
+
|
16167 |
+
return $blog_ids;
|
16168 |
+
}
|
16169 |
+
|
16170 |
/**
|
16171 |
* @author Leo Fajardo (@leorw)
|
16172 |
* @since 2.0.0
|
16173 |
*
|
16174 |
* @param array|WP_Site|null $site
|
16175 |
+
* @param bool $load_registration Since 2.5.1 When set to `true` the method will attempt to return the subsite's registration date, regardless of the `$site` type and value. In most calls, the registration date will be returned anyway, even when the value is `false`. This param is purely for performance optimization.
|
16176 |
*
|
16177 |
* @return array
|
16178 |
*/
|
16179 |
+
function get_site_info( $site = null, $load_registration = false ) {
|
16180 |
$this->_logger->entrance();
|
16181 |
|
16182 |
$switched = false;
|
16183 |
|
16184 |
+
$registration_date = null;
|
16185 |
+
|
16186 |
if ( is_null( $site ) ) {
|
16187 |
+
$url = self::get_unfiltered_site_url();
|
16188 |
$name = get_bloginfo( 'name' );
|
16189 |
$blog_id = null;
|
16190 |
} else {
|
16196 |
}
|
16197 |
|
16198 |
if ( $site instanceof WP_Site ) {
|
16199 |
+
$url = $site->siteurl;
|
16200 |
+
$name = $site->blogname;
|
16201 |
+
$registration_date = $site->registered;
|
16202 |
} else {
|
16203 |
+
$url = self::get_unfiltered_site_url( $blog_id );
|
16204 |
$name = get_bloginfo( 'name' );
|
16205 |
}
|
16206 |
}
|
16207 |
|
16208 |
+
if ( empty( $registration_date ) && $load_registration ) {
|
16209 |
+
$blog_details = get_blog_details( $blog_id, false );
|
16210 |
+
|
16211 |
+
if ( is_object( $blog_details ) && isset( $blog_details->registered ) ) {
|
16212 |
+
$registration_date = $blog_details->registered;
|
16213 |
+
}
|
16214 |
+
}
|
16215 |
+
|
16216 |
$info = array(
|
16217 |
+
'uid' => $this->get_anonymous_id( $blog_id ),
|
16218 |
+
'url' => $url,
|
|
|
|
|
|
|
16219 |
);
|
16220 |
|
16221 |
+
// Add these diagnostic information only if user allowed to track.
|
16222 |
+
if ( FS_Permission_Manager::instance( $this )->is_diagnostic_tracking_allowed() ) {
|
16223 |
+
$info = array_merge( $info, array(
|
16224 |
+
'title' => $name,
|
16225 |
+
'language' => self::get_sanitized_language(),
|
16226 |
+
) );
|
16227 |
+
}
|
16228 |
+
|
16229 |
if ( is_numeric( $blog_id ) ) {
|
16230 |
$info['blog_id'] = $blog_id;
|
16231 |
}
|
16232 |
|
16233 |
+
if ( ! empty( $registration_date ) ) {
|
16234 |
+
$info[ 'registration_date' ] = $registration_date;
|
16235 |
+
}
|
16236 |
+
|
16237 |
if ( $switched ) {
|
16238 |
restore_current_blog();
|
16239 |
}
|
16456 |
}
|
16457 |
}
|
16458 |
|
16459 |
+
if ( ! $this->is_registered() ) {
|
16460 |
+
return;
|
16461 |
+
}
|
16462 |
+
|
16463 |
if ( $this->is_sync_cron_scheduled() &&
|
16464 |
$context_blog_id == $this->get_sync_cron_blog_id()
|
16465 |
) {
|
16493 |
|
16494 |
$this->update_multisite_data_after_site_deactivation( $context_blog_id );
|
16495 |
|
16496 |
+
if ( ! $this->is_registered() ) {
|
16497 |
+
return;
|
16498 |
+
}
|
16499 |
+
|
16500 |
$current_blog_id = get_current_blog_id();
|
16501 |
|
16502 |
$this->switch_to_blog( $context_blog_id );
|
16530 |
|
16531 |
$this->update_multisite_data_after_site_deactivation( $context_blog_id );
|
16532 |
|
16533 |
+
if ( ! $this->is_registered() ) {
|
16534 |
+
return;
|
16535 |
+
}
|
16536 |
+
|
16537 |
$current_blog_id = get_current_blog_id();
|
16538 |
|
16539 |
$this->switch_to_blog( $context_blog_id );
|
16551 |
$this->switch_to_blog( $current_blog_id );
|
16552 |
}
|
16553 |
|
16554 |
+
/**
|
16555 |
+
* Executed after site deletion, called from wp_delete_site
|
16556 |
+
*
|
16557 |
+
* @author Dario Curvino (@dudo)
|
16558 |
+
* @since 2.5.0
|
16559 |
+
*
|
16560 |
+
* @param WP_Site $old_site
|
16561 |
+
*/
|
16562 |
+
public function _after_wpsite_deleted_callback( WP_Site $old_site ) {
|
16563 |
+
$this->_logger->entrance();
|
16564 |
+
|
16565 |
+
$this->_after_site_deleted_callback( $old_site->blog_id, true );
|
16566 |
+
}
|
16567 |
+
|
16568 |
/**
|
16569 |
* Executed after site re-activation.
|
16570 |
*
|
16679 |
* @return bool
|
16680 |
*/
|
16681 |
function is_product_settings_page() {
|
16682 |
+
$page = fs_request_get( 'page', '', 'get' );
|
16683 |
+
$menu_slug = $this->_menu->get_slug();
|
16684 |
+
|
16685 |
+
if ( $page === $menu_slug ) {
|
16686 |
+
return true;
|
16687 |
+
}
|
16688 |
+
|
16689 |
return fs_starts_with(
|
16690 |
+
// e.g., {$menu_slug}-account, {$menu_slug}-affiliation, etc.
|
16691 |
+
$page,
|
16692 |
+
( $menu_slug . '-' )
|
16693 |
);
|
16694 |
}
|
16695 |
|
16769 |
*
|
16770 |
* @param bool|string $topic
|
16771 |
* @param bool|string $message
|
16772 |
+
* @param bool|string $summary Since 2.5.1.
|
16773 |
*
|
16774 |
* @return string
|
16775 |
*/
|
16776 |
+
function contact_url( $topic = false, $message = false, $summary = false ) {
|
16777 |
$params = array();
|
16778 |
if ( is_string( $topic ) ) {
|
16779 |
$params['topic'] = $topic;
|
16782 |
$params['message'] = $message;
|
16783 |
}
|
16784 |
|
16785 |
+
if ( is_string( $summary ) ) {
|
16786 |
+
$params['summary'] = $summary;
|
16787 |
+
}
|
16788 |
+
|
16789 |
if ( $this->is_addon() ) {
|
16790 |
$params['addon_id'] = $this->get_id();
|
16791 |
|
16824 |
}
|
16825 |
|
16826 |
/* Logger
|
16827 |
+
------------------------------------------------------------------------------------------------------------------*/
|
16828 |
/**
|
16829 |
* @param string $id
|
16830 |
* @param bool $prefix_slug
|
16849 |
}
|
16850 |
|
16851 |
/* Security
|
16852 |
+
------------------------------------------------------------------------------------------------------------------*/
|
16853 |
private static function _encrypt( $str ) {
|
16854 |
if ( is_null( $str ) ) {
|
16855 |
return null;
|
17069 |
) {
|
17070 |
// Load site.
|
17071 |
$this->_site = $site;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17072 |
}
|
17073 |
|
17074 |
$user = null;
|
17097 |
/**
|
17098 |
* This is a special fault tolerance mechanism to handle a scenario that the user data is missing.
|
17099 |
*/
|
17100 |
+
if (
|
17101 |
+
! isset( $this->_storage->user_recovery_from_install_last_attempt_timestamp ) ||
|
17102 |
+
time() > ( $this->_storage->user_recovery_from_install_last_attempt_timestamp + FS_Clone_Manager::CLONE_RESOLUTION_MAX_EXECUTION_TIME )
|
17103 |
+
) {
|
17104 |
+
$user = $this->sync_user_by_current_install();
|
17105 |
+
} else {
|
17106 |
+
return;
|
17107 |
+
}
|
17108 |
+
|
17109 |
+
if ( is_object( $user ) ) {
|
17110 |
+
$this->_storage->user_was_recovered_from_install = true;
|
17111 |
+
} else {
|
17112 |
+
$this->_storage->user_recovery_from_install_attempts = isset( $this->_storage->user_recovery_from_install_attempts ) ?
|
17113 |
+
( $this->_storage->user_recovery_from_install_attempts + 1 ) :
|
17114 |
+
1;
|
17115 |
+
|
17116 |
+
if ( $this->_storage->user_recovery_from_install_attempts >= 3 ) {
|
17117 |
+
$this->delete_current_install( false );
|
17118 |
+
} else {
|
17119 |
+
$this->_storage->user_recovery_from_install_last_attempt_timestamp = time();
|
17120 |
+
|
17121 |
+
return;
|
17122 |
+
}
|
17123 |
+
}
|
17124 |
}
|
17125 |
|
17126 |
$this->_user = ( $user instanceof FS_User ) ?
|
17134 |
}
|
17135 |
|
17136 |
if ( is_object( $this->_site ) ) {
|
17137 |
+
// Load plans.
|
17138 |
+
$this->_plans = isset( $plans[ $this->_slug ] ) ?
|
17139 |
+
$plans[ $this->_slug ] :
|
17140 |
+
array();
|
17141 |
+
|
17142 |
+
if ( ! is_array( $this->_plans ) || empty( $this->_plans ) ) {
|
17143 |
+
$this->_sync_plans();
|
17144 |
+
} else {
|
17145 |
+
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
17146 |
+
if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) {
|
17147 |
+
$this->_plans[ $i ] = self::decrypt_entity( $this->_plans[ $i ] );
|
17148 |
+
} else {
|
17149 |
+
unset( $this->_plans[ $i ] );
|
17150 |
+
}
|
17151 |
+
}
|
17152 |
+
}
|
17153 |
+
|
17154 |
$this->_license = $this->_get_license_by_id( $this->_site->license_id );
|
17155 |
|
17156 |
if ( $this->_site->version != $this->get_plugin_version() ) {
|
17169 |
if ( $this->is_theme() ) {
|
17170 |
$this->_register_account_hooks();
|
17171 |
}
|
17172 |
+
|
17173 |
+
if ( $this->is_user_in_admin() && $this->is_clone() ) {
|
17174 |
+
if ( empty( FS_Clone_Manager::instance()->get_clone_identification_timestamp() ) ) {
|
17175 |
+
FS_Clone_Manager::instance()->store_clone_identification_timestamp();
|
17176 |
+
}
|
17177 |
+
|
17178 |
+
FS_Clone_Manager::instance()->maybe_update_clone_resolution_support_flag( $this->_storage->sdk_last_version );
|
17179 |
+
$this->send_pending_clone_update_once();
|
17180 |
+
}
|
17181 |
}
|
17182 |
|
17183 |
/**
|
17257 |
*/
|
17258 |
private function get_versions() {
|
17259 |
$versions = array();
|
17260 |
+
$versions['sdk_version'] = $this->version;
|
17261 |
+
|
17262 |
+
// Collect these diagnostic information only if it's allowed.
|
17263 |
+
if ( FS_Permission_Manager::instance( $this )->is_diagnostic_tracking_allowed() ) {
|
17264 |
+
$versions['platform_version'] = get_bloginfo( 'version' );
|
17265 |
+
$versions['programming_language_version'] = phpversion();
|
17266 |
+
}
|
17267 |
+
|
17268 |
+
foreach ( $versions as $k => $version ) {
|
17269 |
+
$versions[ $k ] = self::get_api_sanitized_property( $k, $version );
|
17270 |
+
}
|
17271 |
+
|
17272 |
+
return $versions;
|
17273 |
+
}
|
17274 |
+
|
17275 |
+
/**
|
17276 |
+
* Get sanitized site language.
|
17277 |
+
*
|
17278 |
+
* @param string $language
|
17279 |
+
* @param int $max_len
|
17280 |
+
*
|
17281 |
+
* @since 2.5.1
|
17282 |
+
* @author Vova Feldman (@svovaf)
|
17283 |
+
*
|
17284 |
+
* @return string
|
17285 |
+
*/
|
17286 |
+
private static function get_sanitized_language( $language = '', $max_len = self::LANGUAGE_MAX_CHARS ) {
|
17287 |
+
if ( empty( $language ) ) {
|
17288 |
+
$language = get_bloginfo( 'language' );
|
17289 |
+
}
|
17290 |
+
|
17291 |
+
return substr( $language, 0, $max_len );
|
17292 |
+
}
|
17293 |
+
|
17294 |
+
/**
|
17295 |
+
* Get core version stripped from pre-release and build.
|
17296 |
+
*
|
17297 |
+
* @since 2.5.1
|
17298 |
+
* @author Vova Feldman (@svovaf)
|
17299 |
+
*
|
17300 |
+
* @param string $version
|
17301 |
+
* @param int $parts
|
17302 |
+
* @param int $max_len
|
17303 |
+
* @param bool $include_pre_release
|
17304 |
+
*
|
17305 |
+
* @return string
|
17306 |
+
*/
|
17307 |
+
private static function get_core_version(
|
17308 |
+
$version,
|
17309 |
+
$parts = 3,
|
17310 |
+
$max_len = self::VERSION_MAX_CHARS,
|
17311 |
+
$include_pre_release = false
|
17312 |
+
) {
|
17313 |
+
if ( empty( $version ) ) {
|
17314 |
+
// Version is empty.
|
17315 |
+
return '';
|
17316 |
+
}
|
17317 |
+
|
17318 |
+
if ( is_numeric( $version ) ) {
|
17319 |
+
$is_float_version = is_float( $version );
|
17320 |
+
|
17321 |
+
$version = (string) $version;
|
17322 |
+
|
17323 |
+
/**
|
17324 |
+
* Casting a whole float number to a string cuts the decimal point. This part make sure to add the missing decimal part to the version.
|
17325 |
+
*/
|
17326 |
+
if ( $is_float_version && false === strpos( $version, '.' ) ) {
|
17327 |
+
$version .= '.0';
|
17328 |
+
}
|
17329 |
+
}
|
17330 |
+
|
17331 |
+
if ( ! is_string( $version ) ) {
|
17332 |
+
return '';
|
17333 |
+
}
|
17334 |
+
|
17335 |
+
if ( $parts < 1 ) {
|
17336 |
+
return '';
|
17337 |
+
}
|
17338 |
|
17339 |
+
$pre_release_regex = $include_pre_release ?
|
17340 |
+
'(\-(alpha|beta|RC)([0-9]+)?)?' :
|
17341 |
+
'';
|
17342 |
+
|
17343 |
+
if ( 0 === preg_match( '/^([0-9]+(\.[0-9]+){0,' . ( $parts - 1 ) . '}' . $pre_release_regex . ')/i', $version, $matches ) ) {
|
17344 |
+
// Version is not starting with a digit.
|
17345 |
+
return '';
|
17346 |
}
|
17347 |
|
17348 |
+
retu
|