Version Description
- 2017-05-30 =
- Fixed fields sorting bug
- Integrated WP Desk Tracker class to help us understand how you use the plugin (you need to opt in to enable it)
- Added upgrade link to quick links
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.5.1
- class/tracker.php +188 -0
- flexible-checkout-fields.php +36 -7
- inc/wpdesk-tracker/assets/css/tracker.css +99 -0
- inc/wpdesk-tracker/assets/css/tracker.min.css +1 -0
- inc/wpdesk-tracker/assets/images/logo.png +0 -0
- inc/wpdesk-tracker/assets/images/logo@2x.png +0 -0
- inc/wpdesk-tracker/class-wpdesk-tracker.php +804 -0
- inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.mo +0 -0
- inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.po +472 -0
- inc/wpdesk-tracker/views/tracker-connect.php +84 -0
- inc/wpdesk-tracker/views/tracker-deactivate.php +136 -0
- inc/wpdesk-tracker/views/tracker-notice.php +81 -0
- inc/wpdesk-tracker/views/tracker-opt-out-notice.php +4 -0
- inc/wpdesk-tracker/views/tracker-plugins-footer.php +24 -0
- inc/wpdesk-woo27-functions.php +24 -0
- lang/flexible-checkout-fields-pl_PL.mo +0 -0
- lang/flexible-checkout-fields-pl_PL.po +52 -48
- readme.txt +33 -5
class/tracker.php
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
+
if ( ! class_exists( 'WPDesk_Flexible_Checkout_Fields_Tracker' ) ) {
|
6 |
+
class WPDesk_Flexible_Checkout_Fields_Tracker {
|
7 |
+
|
8 |
+
public static $script_version = '11';
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$this->hooks();
|
12 |
+
}
|
13 |
+
|
14 |
+
public function hooks() {
|
15 |
+
add_filter( 'wpdesk_tracker_data', array( $this, 'wpdesk_tracker_data' ), 11 );
|
16 |
+
add_filter( 'wpdesk_tracker_notice_screens', array( $this, 'wpdesk_tracker_notice_screens' ) );
|
17 |
+
add_filter( 'wpdesk_track_plugin_deactivation', array( $this, 'wpdesk_track_plugin_deactivation' ) );
|
18 |
+
|
19 |
+
add_filter( 'plugin_action_links_flexible-checkout-fields/flexible-checkout-fields.php', array( $this, 'plugin_action_links' ) );
|
20 |
+
add_action( 'activated_plugin', array( $this, 'activated_plugin' ), 10, 2 );
|
21 |
+
}
|
22 |
+
|
23 |
+
public function wpdesk_track_plugin_deactivation( $plugins ) {
|
24 |
+
$plugins['flexible-checkout-fields/flexible-checkout-fields.php'] = 'flexible-checkout-fields/flexible-checkout-fields.php';
|
25 |
+
return $plugins;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function wpdesk_tracker_data( $data ) {
|
29 |
+
$plugin_data = array(
|
30 |
+
'fields' => array(),
|
31 |
+
'custom_sections' => array(),
|
32 |
+
'conditional_logic_for_fields' => 0,
|
33 |
+
'conditional_logic_fields_action' => array(),
|
34 |
+
'conditional_logic_fields_operator' => array(),
|
35 |
+
'conditional_logic_for_fields_rules' => 0,
|
36 |
+
'conditional_logic' => 0,
|
37 |
+
'conditional_logic_what' => array(),
|
38 |
+
'conditional_logic_action' => array(),
|
39 |
+
'conditional_logic_operator' => array(),
|
40 |
+
'conditional_logic_rules' => 0,
|
41 |
+
);
|
42 |
+
|
43 |
+
if ( is_flexible_checkout_fields_pro_active() ) {
|
44 |
+
$plugin_data['pro'] = 'yes';
|
45 |
+
}
|
46 |
+
else {
|
47 |
+
$plugin_data['pro'] = 'no';
|
48 |
+
}
|
49 |
+
|
50 |
+
$settings = get_option('inspire_checkout_fields_settings', array() );
|
51 |
+
if ( !is_array( $settings )) {
|
52 |
+
$settings = array();
|
53 |
+
}
|
54 |
+
foreach ( $settings as $section => $fields ) {
|
55 |
+
foreach ( $fields as $field ) {
|
56 |
+
if ( isset( $field['conditional_logic_fields'] ) ) {
|
57 |
+
$plugin_data['conditional_logic_for_fields']++;
|
58 |
+
if ( empty( $plugin_data['conditional_logic_fields_action'][$field['conditional_logic_fields_action']] ) ) {
|
59 |
+
$plugin_data['conditional_logic_fields_action'][$field['conditional_logic_fields_action']] = 0;
|
60 |
+
}
|
61 |
+
$plugin_data['conditional_logic_fields_action'][$field['conditional_logic_fields_action']]++;
|
62 |
+
if ( empty( $plugin_data['conditional_logic_fields_operator'][$field['conditional_logic_fields_operator']] ) ) {
|
63 |
+
$plugin_data['conditional_logic_fields_operator'][$field['conditional_logic_fields_operator']] = 0;
|
64 |
+
}
|
65 |
+
$plugin_data['conditional_logic_fields_operator'][$field['conditional_logic_fields_operator']]++;
|
66 |
+
if ( isset( $field['conditional_logic_fields_rules'] ) ) {
|
67 |
+
$plugin_data['conditional_logic_for_fields_rules'] = $plugin_data['conditional_logic_for_fields_rules'] + count( $field['conditional_logic_fields_rules'] );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
if ( isset( $field['conditional_logic'] ) ) {
|
71 |
+
$plugin_data['conditional_logic']++;
|
72 |
+
if ( empty( $plugin_data['conditional_logic_action'][$field['conditional_logic_action']] ) ) {
|
73 |
+
$plugin_data['conditional_logic_action'][$field['conditional_logic_action']] = 0;
|
74 |
+
}
|
75 |
+
$plugin_data['conditional_logic_action'][$field['conditional_logic_action']]++;
|
76 |
+
if ( empty( $plugin_data['conditional_logic_operator'][$field['conditional_logic_operator']] ) ) {
|
77 |
+
$plugin_data['conditional_logic_operator'][$field['conditional_logic_operator']] = 0;
|
78 |
+
}
|
79 |
+
$plugin_data['conditional_logic_operator'][$field['conditional_logic_operator']]++;
|
80 |
+
if ( isset( $field['conditional_logic_rules'] ) ) {
|
81 |
+
$plugin_data['conditional_logic_rules'] = $plugin_data['conditional_logic_rules'] + count( $field['conditional_logic_rules'] );
|
82 |
+
foreach ( $field['conditional_logic_rules'] as $rule ) {
|
83 |
+
if ( !isset( $plugin_data['conditional_logic_what'][$rule['what']] ) ) {
|
84 |
+
$plugin_data['conditional_logic_what'][$rule['what']] = 0;
|
85 |
+
}
|
86 |
+
$plugin_data['conditional_logic_what'][$rule['what']]++;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
if ( isset( $field['custom_field'] ) && $field['custom_field'] == '1' ) {
|
91 |
+
if ( isset( $field['type'] ) ) {
|
92 |
+
if ( empty( $plugin_data['fields'][$field['type']] ) ) {
|
93 |
+
$plugin_data['fields'][$field['type']] = 0;
|
94 |
+
}
|
95 |
+
$plugin_data['fields'][$field['type']]++;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
$plugin_data['inspire_checkout_fields_css_disable'] = get_option( 'inspire_checkout_fields_css_disable', '0' );
|
102 |
+
|
103 |
+
$plugin_data['custom_sections']['before_customer_details'] = get_option( 'inspire_checkout_fields_before_customer_details', '0' );
|
104 |
+
$plugin_data['custom_sections']['after_customer_details'] = get_option( 'inspire_checkout_fields_after_customer_details', '0' );
|
105 |
+
$plugin_data['custom_sections']['before_checkout_billing_form'] = get_option( 'inspire_checkout_fields_before_checkout_billing_form', '0' );
|
106 |
+
$plugin_data['custom_sections']['after_checkout_billing_form'] = get_option( 'inspire_checkout_fields_after_checkout_billing_form', '0' );
|
107 |
+
$plugin_data['custom_sections']['before_checkout_shipping_form'] = get_option( 'inspire_checkout_fields_before_checkout_shipping_form', '0' );
|
108 |
+
$plugin_data['custom_sections']['after_checkout_shipping_form'] = get_option( 'inspire_checkout_fields_after_checkout_shipping_form', '0' );
|
109 |
+
$plugin_data['custom_sections']['before_checkout_registration_form'] = get_option( 'inspire_checkout_fields_before_checkout_registration_form', '0' );
|
110 |
+
$plugin_data['custom_sections']['after_checkout_registration_form'] = get_option( 'inspire_checkout_fields_after_checkout_registration_form', '0' );
|
111 |
+
$plugin_data['custom_sections']['before_order_notes'] = get_option( 'inspire_checkout_fields_before_order_notes', '0' );
|
112 |
+
$plugin_data['custom_sections']['after_order_notes'] = get_option( 'inspire_checkout_fields_after_order_notes', '0' );
|
113 |
+
$plugin_data['custom_sections']['review_order_before_submit'] = get_option( 'inspire_checkout_fields_review_order_before_submit', '0' );
|
114 |
+
$plugin_data['custom_sections']['review_order_after_submit'] = get_option( 'inspire_checkout_fields_review_order_after_submit', '0' );
|
115 |
+
|
116 |
+
$data['flexible_checkout_fields'] = $plugin_data;
|
117 |
+
|
118 |
+
return $data;
|
119 |
+
}
|
120 |
+
|
121 |
+
public function wpdesk_tracker_notice_screens( $screens ) {
|
122 |
+
$current_screen = get_current_screen();
|
123 |
+
if ( $current_screen->id == 'woocommerce_page_inspire_checkout_fields_settings' ) {
|
124 |
+
$screens[] = $current_screen->id;
|
125 |
+
}
|
126 |
+
return $screens;
|
127 |
+
}
|
128 |
+
|
129 |
+
public function plugin_action_links( $links ) {
|
130 |
+
if ( !wpdesk_tracker_enabled() ) {
|
131 |
+
return $links;
|
132 |
+
}
|
133 |
+
$options = get_option('wpdesk_helper_options', array() );
|
134 |
+
if ( empty( $options['wpdesk_tracker_agree'] ) ) {
|
135 |
+
$options['wpdesk_tracker_agree'] = '0';
|
136 |
+
}
|
137 |
+
$plugin_links = array();
|
138 |
+
if ( $options['wpdesk_tracker_agree'] == '0' ) {
|
139 |
+
$opt_in_link = admin_url( 'admin.php?page=wpdesk_tracker&plugin=flexible-checkout-fields/flexible-checkout-fields.php' );
|
140 |
+
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-in', 'flexible-checkout-fields' ) . '</a>';
|
141 |
+
}
|
142 |
+
else {
|
143 |
+
$opt_in_link = admin_url( 'plugins.php?wpdesk_tracker_opt_out=1&plugin=flexible-checkout-fields/flexible-checkout-fields.php' );
|
144 |
+
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-out', 'flexible-checkout-fields' ) . '</a>';
|
145 |
+
}
|
146 |
+
return array_merge( $plugin_links, $links );
|
147 |
+
}
|
148 |
+
|
149 |
+
public function activated_plugin( $plugin, $network_wide ) {
|
150 |
+
if ( !wpdesk_tracker_enabled() ) {
|
151 |
+
return;
|
152 |
+
}
|
153 |
+
if ( $plugin == 'flexible-checkout-fields/flexible-checkout-fields.php' ) {
|
154 |
+
$options = get_option('wpdesk_helper_options', array() );
|
155 |
+
|
156 |
+
if ( empty( $options ) ) {
|
157 |
+
$options = array();
|
158 |
+
}
|
159 |
+
if ( empty( $options['wpdesk_tracker_agree'] ) ) {
|
160 |
+
$options['wpdesk_tracker_agree'] = '0';
|
161 |
+
}
|
162 |
+
$wpdesk_tracker_skip_plugin = get_option( 'wpdesk_tracker_skip_flexible_checkout_fields', '0' );
|
163 |
+
if ( $options['wpdesk_tracker_agree'] == '0' && $wpdesk_tracker_skip_plugin == '0' ) {
|
164 |
+
update_option( 'wpdesk_tracker_notice', '1' );
|
165 |
+
update_option( 'wpdesk_tracker_skip_flexible_checkout_fields', '1' );
|
166 |
+
wp_redirect( admin_url( 'admin.php?page=wpdesk_tracker&plugin=flexible-checkout-fields/flexible-checkout-fields.php' ) );
|
167 |
+
exit;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
new WPDesk_Flexible_Checkout_Fields_Tracker();
|
175 |
+
|
176 |
+
}
|
177 |
+
|
178 |
+
if ( !function_exists( 'wpdesk_activated_plugin_activation_date' ) ) {
|
179 |
+
function wpdesk_activated_plugin_activation_date( $plugin, $network_wide ) {
|
180 |
+
$option_name = 'plugin_activation_' . $plugin;
|
181 |
+
$activation_date = get_option( $option_name, '' );
|
182 |
+
if ( $activation_date == '' ) {
|
183 |
+
$activation_date = current_time( 'mysql' );
|
184 |
+
update_option( $option_name, $activation_date );
|
185 |
+
}
|
186 |
+
}
|
187 |
+
add_action( 'activated_plugin', 'wpdesk_activated_plugin_activation_date', 10, 2 );
|
188 |
+
}
|
flexible-checkout-fields.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Flexible Checkout Fields
|
4 |
Plugin URI: https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/
|
5 |
Description: Manage your WooCommerce checkout fields. Change order, labels, placeholders and add new fields.
|
6 |
-
Version: 1.5
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
@@ -51,6 +51,8 @@
|
|
51 |
|
52 |
require_once('inc/wpdesk-woo27-functions.php');
|
53 |
|
|
|
|
|
54 |
class inspireCheckoutFields extends inspire_Plugin3 {
|
55 |
private static $_oInstance = false;
|
56 |
|
@@ -354,6 +356,7 @@
|
|
354 |
$checkout_field_type = $this->get_fields();
|
355 |
if ( !empty( $settings ) ) {
|
356 |
$new = array();
|
|
|
357 |
foreach ( $settings as $key => $type ) {
|
358 |
if ( $key != 'billing' && $key != 'shipping' && $key != 'order' ) {
|
359 |
if ( get_option('inspire_checkout_fields_' . $key, '0' ) == '0' ) {
|
@@ -424,6 +427,8 @@
|
|
424 |
}
|
425 |
|
426 |
$new[$key][$field['name']]['custom_attributes'] = apply_filters( 'flexible_checkout_fields_custom_attributes', array(), $field );
|
|
|
|
|
427 |
|
428 |
}
|
429 |
}
|
@@ -439,6 +444,7 @@
|
|
439 |
}
|
440 |
}
|
441 |
}
|
|
|
442 |
if ( $request_type == null ) {
|
443 |
if ( !empty($fields['account'] ) ) {
|
444 |
$new['account'] = $fields['account'];
|
@@ -851,11 +857,17 @@
|
|
851 |
*/
|
852 |
public function linksFilter( $links ) {
|
853 |
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
859 |
|
860 |
return array_merge( $plugin_links, $links );
|
861 |
}
|
@@ -884,7 +896,6 @@
|
|
884 |
}
|
885 |
|
886 |
public function woocommerce_get_country_locale_default( $address_fields ) {
|
887 |
-
error_log( print_r( $address_fields, true ) );
|
888 |
return $address_fields;
|
889 |
}
|
890 |
|
@@ -916,5 +927,23 @@ error_log( print_r( $address_fields, true ) );
|
|
916 |
}
|
917 |
}
|
918 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
919 |
|
920 |
$_GLOBALS['inspire_checkout_fields'] = $inspire_checkout_fields = inspireCheckoutFields::getInstance();
|
3 |
Plugin Name: Flexible Checkout Fields
|
4 |
Plugin URI: https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/
|
5 |
Description: Manage your WooCommerce checkout fields. Change order, labels, placeholders and add new fields.
|
6 |
+
Version: 1.5.1
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
51 |
|
52 |
require_once('inc/wpdesk-woo27-functions.php');
|
53 |
|
54 |
+
require_once('class/tracker.php');
|
55 |
+
|
56 |
class inspireCheckoutFields extends inspire_Plugin3 {
|
57 |
private static $_oInstance = false;
|
58 |
|
356 |
$checkout_field_type = $this->get_fields();
|
357 |
if ( !empty( $settings ) ) {
|
358 |
$new = array();
|
359 |
+
$priority = 0;
|
360 |
foreach ( $settings as $key => $type ) {
|
361 |
if ( $key != 'billing' && $key != 'shipping' && $key != 'order' ) {
|
362 |
if ( get_option('inspire_checkout_fields_' . $key, '0' ) == '0' ) {
|
427 |
}
|
428 |
|
429 |
$new[$key][$field['name']]['custom_attributes'] = apply_filters( 'flexible_checkout_fields_custom_attributes', array(), $field );
|
430 |
+
$priority = $priority + 10;
|
431 |
+
$new[$key][$field['name']]['priority'] = $priority;
|
432 |
|
433 |
}
|
434 |
}
|
444 |
}
|
445 |
}
|
446 |
}
|
447 |
+
|
448 |
if ( $request_type == null ) {
|
449 |
if ( !empty($fields['account'] ) ) {
|
450 |
$new['account'] = $fields['account'];
|
857 |
*/
|
858 |
public function linksFilter( $links ) {
|
859 |
|
860 |
+
$plugin_links = array(
|
861 |
+
'<a href="' . admin_url( 'admin.php?page=inspire_checkout_fields_settings') . '">' . __( 'Settings', 'flexible-checkout-fields' ) . '</a>',
|
862 |
+
'<a href="' . __('https://www.wpdesk.net/docs/flexible-checkout-fields-docs/', 'flexible-checkout-fields' ) . '">' . __( 'Docs', 'flexible-checkout-fields' ) . '</a>',
|
863 |
+
'<a href="https://wordpress.org/support/plugin/flexible-checkout-fields/">' . __( 'Support', 'flexible-checkout-fields' ) . '</a>',
|
864 |
+
);
|
865 |
+
|
866 |
+
$pro_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/woocommerce-checkout-fields/' : 'https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/';
|
867 |
+
$utm = '?utm_source=wp-admin-plugins&utm_medium=link&utm_campaign=flexible-checkout-fields-plugins-upgrade-link';
|
868 |
+
|
869 |
+
if ( ! wpdesk_is_plugin_active( 'flexible-checkout-fields-pro/flexible-checkout-fields-pro.php' ) )
|
870 |
+
$plugin_links[] = '<a href="' . $pro_link . $utm . '" target="_blank" style="color:#d64e07;font-weight:bold;">' . __( 'Upgrade', 'flexible-checkout-fields' ) . '</a>';
|
871 |
|
872 |
return array_merge( $plugin_links, $links );
|
873 |
}
|
896 |
}
|
897 |
|
898 |
public function woocommerce_get_country_locale_default( $address_fields ) {
|
|
|
899 |
return $address_fields;
|
900 |
}
|
901 |
|
927 |
}
|
928 |
}
|
929 |
|
930 |
+
if ( !function_exists( 'wpdesk_tracker_enabled' ) ) {
|
931 |
+
function wpdesk_tracker_enabled() {
|
932 |
+
$tracker_enabled = true;
|
933 |
+
if ( !empty( $_SERVER['SERVER_ADDR'] ) && $_SERVER['SERVER_ADDR'] == '127.0.0.1' ) {
|
934 |
+
$tracker_enabled = false;
|
935 |
+
}
|
936 |
+
return apply_filters( 'wpdesk_tracker_enabled', $tracker_enabled );
|
937 |
+
// add_filter( 'wpdesk_tracker_enabled', '__return_true' );
|
938 |
+
}
|
939 |
+
}
|
940 |
+
|
941 |
+
add_action( 'plugins_loaded', 'flexible_chekout_fields_plugins_loaded', 9 );
|
942 |
+
function flexible_chekout_fields_plugins_loaded() {
|
943 |
+
if ( !class_exists( 'WPDesk_Tracker' ) ) {
|
944 |
+
include( 'inc/wpdesk-tracker/class-wpdesk-tracker.php' );
|
945 |
+
WPDesk_Tracker::init( basename( dirname( __FILE__ ) ) );
|
946 |
+
}
|
947 |
+
}
|
948 |
|
949 |
$_GLOBALS['inspire_checkout_fields'] = $inspire_checkout_fields = inspireCheckoutFields::getInstance();
|
inc/wpdesk-tracker/assets/css/tracker.css
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Connect */
|
2 |
+
#wpdesk_tracker_connect {
|
3 |
+
margin-top: 30px;
|
4 |
+
}
|
5 |
+
|
6 |
+
#wpdesk_tracker_connect .wpdesk-logo {
|
7 |
+
background-image: url(../images/logo.png);
|
8 |
+
background-repeat: no-repeat;
|
9 |
+
background-size: 215px 62px;
|
10 |
+
display: block;
|
11 |
+
height: 62px;
|
12 |
+
margin: 0 auto;
|
13 |
+
width: 215px;
|
14 |
+
}
|
15 |
+
|
16 |
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
17 |
+
#wpdesk_tracker_connect .wpdesk-logo {
|
18 |
+
background-image: url(../images/logo@2x.png);
|
19 |
+
background-size: 215px 62px;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
#wpdesk_tracker_connect .message p {
|
24 |
+
font-size: 14px;
|
25 |
+
}
|
26 |
+
|
27 |
+
#wpdesk_tracker_connect .plugin-card-bottom {
|
28 |
+
border-bottom: 1px solid #ddd;
|
29 |
+
margin-bottom: 10px;
|
30 |
+
}
|
31 |
+
|
32 |
+
#wpdesk_tracker_connect .button-allow {
|
33 |
+
float: right;
|
34 |
+
}
|
35 |
+
|
36 |
+
#wpdesk_tracker_connect .permissions .trigger {
|
37 |
+
display: block;
|
38 |
+
font-size: .9em;
|
39 |
+
text-align: center;
|
40 |
+
margin-bottom: 10px;
|
41 |
+
text-decoration: none;
|
42 |
+
}
|
43 |
+
|
44 |
+
#wpdesk_tracker_connect .permissions .permissions-details {
|
45 |
+
height: 0;
|
46 |
+
overflow: hidden;
|
47 |
+
margin: 0;
|
48 |
+
}
|
49 |
+
|
50 |
+
#wpdesk_tracker_connect .permissions.open .permissions-details {
|
51 |
+
height: auto;
|
52 |
+
padding: 10px 20px;
|
53 |
+
}
|
54 |
+
|
55 |
+
#wpdesk_tracker_connect .permissions ul {
|
56 |
+
margin: 0;
|
57 |
+
}
|
58 |
+
|
59 |
+
#wpdesk_tracker_connect .permissions ul li {
|
60 |
+
margin-bottom: 12px;
|
61 |
+
}
|
62 |
+
|
63 |
+
#wpdesk_tracker_connect .permissions ul li i.dashicons {
|
64 |
+
float: left;
|
65 |
+
font-size: 40px;
|
66 |
+
width: 40px;
|
67 |
+
height: 40px;
|
68 |
+
}
|
69 |
+
|
70 |
+
#wpdesk_tracker_connect .permissions ul li div {
|
71 |
+
margin-left: 55px;
|
72 |
+
}
|
73 |
+
|
74 |
+
#wpdesk_tracker_connect .permissions ul li div span {
|
75 |
+
font-weight: bold;
|
76 |
+
}
|
77 |
+
|
78 |
+
#wpdesk_tracker_connect .permissions ul li div p {
|
79 |
+
margin: 2px 0 0 0;
|
80 |
+
}
|
81 |
+
|
82 |
+
#wpdesk_tracker_connect .terms {
|
83 |
+
font-size: .9em;
|
84 |
+
padding: 5px;
|
85 |
+
}
|
86 |
+
|
87 |
+
#wpdesk_tracker_connect .terms a {
|
88 |
+
color: #999;
|
89 |
+
}
|
90 |
+
|
91 |
+
/* Deactivate */
|
92 |
+
.wpdesk_tracker_deactivate .reason-input {
|
93 |
+
display: none;
|
94 |
+
}
|
95 |
+
|
96 |
+
.wpdesk_tracker_deactivate .reason-input input[type=text] {
|
97 |
+
margin-left: 25px;
|
98 |
+
width: 350px;
|
99 |
+
}
|
inc/wpdesk-tracker/assets/css/tracker.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#wpdesk_tracker_connect{margin-top:30px}#wpdesk_tracker_connect .wpdesk-logo{background-image:url(../images/logo.png);background-repeat:no-repeat;background-size:215px 62px;display:block;height:62px;margin:0 auto;width:215px}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){#wpdesk_tracker_connect .wpdesk-logo{background-image:url(../images/logo@2x.png);background-size:215px 62px}}#wpdesk_tracker_connect .message p{font-size:14px}#wpdesk_tracker_connect .plugin-card-bottom{border-bottom:1px solid #ddd;margin-bottom:10px}#wpdesk_tracker_connect .button-allow{float:right}#wpdesk_tracker_connect .permissions .trigger{display:block;font-size:.9em;text-align:center;margin-bottom:10px;text-decoration:none}#wpdesk_tracker_connect .permissions .permissions-details{height:0;overflow:hidden;margin:0}#wpdesk_tracker_connect .permissions.open .permissions-details{height:auto;padding:10px 20px}#wpdesk_tracker_connect .permissions ul{margin:0}#wpdesk_tracker_connect .permissions ul li{margin-bottom:12px}#wpdesk_tracker_connect .permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#wpdesk_tracker_connect .permissions ul li div{margin-left:55px}#wpdesk_tracker_connect .permissions ul li div span{font-weight:bold}#wpdesk_tracker_connect .permissions ul li div p{margin:2px 0 0 0}#wpdesk_tracker_connect .terms{font-size:.9em;padding:5px}#wpdesk_tracker_connect .terms a{color:#999}.wpdesk_tracker_deactivate .reason-input{display:none}.wpdesk_tracker_deactivate .reason-input input[type=text]{margin-left:25px;width:350px}
|
inc/wpdesk-tracker/assets/images/logo.png
ADDED
Binary file
|
inc/wpdesk-tracker/assets/images/logo@2x.png
ADDED
Binary file
|
inc/wpdesk-tracker/class-wpdesk-tracker.php
ADDED
@@ -0,0 +1,804 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WP Desk Tracker
|
4 |
+
*
|
5 |
+
* @class WPDESK_Tracker
|
6 |
+
* @version 2.3.0
|
7 |
+
* @package WPDESK/Helper
|
8 |
+
* @category Class
|
9 |
+
* @author WP Desk
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
if ( !class_exists( 'WPDesk_Tracker' ) ) {
|
17 |
+
|
18 |
+
class WPDesk_Tracker {
|
19 |
+
|
20 |
+
public static $script_version = '11';
|
21 |
+
|
22 |
+
public static $request_coupon = false;
|
23 |
+
|
24 |
+
public static $plugin_basename = '';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* URL to the WP Desk Tracker API endpoint.
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private static $api_url = 'https://data.wpdesk.org/?track=1';
|
31 |
+
//private static $api_url = 'http://woo271.grola.pl/?track=1';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Hook into cron event.
|
35 |
+
*/
|
36 |
+
public static function init( $plugin_basename ) {
|
37 |
+
self::$plugin_basename = $plugin_basename;
|
38 |
+
add_action( 'plugins_loaded', array( __CLASS__, 'load_plugin_text_domain') );
|
39 |
+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_enqueue_scripts' ), 100 );
|
40 |
+
add_action( 'wpdesk_tracker_send_event', array( __CLASS__, 'send_tracking_data' ) );
|
41 |
+
add_action( 'admin_menu', array( __CLASS__, 'admin_menu' ) );
|
42 |
+
add_action( 'admin_init', array( __CLASS__, 'admin_init' ) );
|
43 |
+
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
|
44 |
+
add_action( 'wp_ajax_wpdesk_tracker_notice_handler', array( __CLASS__, 'wp_ajax_wpdesk_tracker_notice_handler' ) );
|
45 |
+
add_action( 'wp_ajax_wpdesk_tracker_deactivation_handler', array( __CLASS__, 'wp_ajax_wpdesk_tracker_deactivation_handler' ) );
|
46 |
+
add_action( 'update_option_wpdesk_helper_options', array( __CLASS__, 'update_option_wpdesk_helper_options' ), 10, 3 );
|
47 |
+
|
48 |
+
add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_data_license_emails' ) );
|
49 |
+
add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_data_shipping_country_per_order' ) );
|
50 |
+
add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_data_shipping_classes' ) );
|
51 |
+
add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_data_product_variations' ) );
|
52 |
+
add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_data_orders_per_month' ) );
|
53 |
+
|
54 |
+
global $pagenow;
|
55 |
+
if ( 'plugins.php' === $pagenow ) {
|
56 |
+
add_action( 'admin_footer', array( __CLASS__, 'admin_footer' ) );
|
57 |
+
}
|
58 |
+
|
59 |
+
$options = get_option('wpdesk_helper_options', array() );
|
60 |
+
if ( !is_array( $options ) ) {
|
61 |
+
$options = array();
|
62 |
+
}
|
63 |
+
if ( empty( $options['wpdesk_tracker_agree'] ) ) {
|
64 |
+
$options['wpdesk_tracker_agree'] = '0';
|
65 |
+
}
|
66 |
+
$wpdesk_tracker_agree = $options['wpdesk_tracker_agree'];
|
67 |
+
$wp_next_scheduled = wp_next_scheduled( 'wpdesk_tracker_send_event' );
|
68 |
+
if ( $wpdesk_tracker_agree == '1' && !$wp_next_scheduled ) {
|
69 |
+
wp_schedule_event( time(), 'daily', 'wpdesk_tracker_send_event' );
|
70 |
+
}
|
71 |
+
if ( $wpdesk_tracker_agree == '0' && $wp_next_scheduled ) {
|
72 |
+
wp_clear_scheduled_hook( 'wpdesk_tracker_send_event' );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
public static function load_plugin_text_domain() {
|
77 |
+
$wpdesk_translation = load_plugin_textdomain( 'wpdesk-tracker', FALSE, self::$plugin_basename . '/inc/wpdesk-tracker/lang' );
|
78 |
+
}
|
79 |
+
|
80 |
+
public static function admin_footer() {
|
81 |
+
if ( wpdesk_tracker_enabled() ) {
|
82 |
+
$plugins = array(
|
83 |
+
'wpdesk-helper/wpdesk-helper.php' => 'wpdesk-helper/wpdesk-helper.php'
|
84 |
+
);
|
85 |
+
$plugins = apply_filters( 'wpdesk_track_plugin_deactivation', $plugins );
|
86 |
+
include( 'views/tracker-plugins-footer.php' );
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
public static function admin_enqueue_scripts() {
|
91 |
+
$screen = get_current_screen();
|
92 |
+
if ( $screen->id == 'admin_page_wpdesk_tracker' || $screen->id == 'admin_page_wpdesk_tracker_deactivate' ) {
|
93 |
+
wp_register_style( 'wpdesk-helper-tracker', plugin_dir_url( __FILE__ ) . 'assets/css/tracker.css', array(), self::$script_version, 'all' );
|
94 |
+
wp_enqueue_style( 'wpdesk-helper-tracker' );
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
public static function admin_menu() {
|
99 |
+
add_submenu_page(
|
100 |
+
null,
|
101 |
+
'WP Desk Tracker',
|
102 |
+
'WP Desk Tracker',
|
103 |
+
'manage_options',
|
104 |
+
'wpdesk_tracker',
|
105 |
+
array( __CLASS__, 'wpdesk_tracker_page' )
|
106 |
+
);
|
107 |
+
add_submenu_page(
|
108 |
+
null,
|
109 |
+
'Deactivate plugin',
|
110 |
+
'Deactivate plugin',
|
111 |
+
'manage_options',
|
112 |
+
'wpdesk_tracker_deactivate',
|
113 |
+
array( __CLASS__, 'wpdesk_tracker_deactivate' )
|
114 |
+
);
|
115 |
+
}
|
116 |
+
|
117 |
+
public static function wp_ajax_wpdesk_tracker_deactivation_handler() {
|
118 |
+
self::send_deactivation_data();
|
119 |
+
}
|
120 |
+
|
121 |
+
|
122 |
+
public static function wp_ajax_wpdesk_tracker_notice_handler() {
|
123 |
+
$type = '';
|
124 |
+
if ( isset( $_REQUEST['type'] ) ) {
|
125 |
+
$type = $_REQUEST['type'];
|
126 |
+
}
|
127 |
+
if ( $type == 'allow' ) {
|
128 |
+
$options = get_option('wpdesk_helper_options', array() );
|
129 |
+
if ( !is_array( $options ) ) {
|
130 |
+
$options = array();
|
131 |
+
}
|
132 |
+
update_option( 'wpdesk_helper_options', $options );
|
133 |
+
delete_option( 'wpdesk_tracker_notice' );
|
134 |
+
$options['wpdesk_tracker_agree'] = '1';
|
135 |
+
update_option( 'wpdesk_helper_options', $options );
|
136 |
+
}
|
137 |
+
if ( $type == 'dismiss' ) {
|
138 |
+
$options = get_option('wpdesk_helper_options', array() );
|
139 |
+
if ( !is_array( $options ) ) {
|
140 |
+
$options = array();
|
141 |
+
}
|
142 |
+
delete_option( 'wpdesk_tracker_notice' );
|
143 |
+
$options['wpdesk_tracker_agree'] = '0';
|
144 |
+
update_option( 'wpdesk_helper_options', $options );
|
145 |
+
update_option( 'wpdesk_tracker_notice', '1' );
|
146 |
+
}
|
147 |
+
if ( $type == 'allow_coupon' ) {
|
148 |
+
self::$request_coupon = true;
|
149 |
+
$options = get_option('wpdesk_helper_options', array() );
|
150 |
+
if ( !is_array( $options ) ) {
|
151 |
+
$options = array();
|
152 |
+
}
|
153 |
+
update_option( 'wpdesk_helper_options', $options );
|
154 |
+
delete_option( 'wpdesk_tracker_notice' );
|
155 |
+
$options['wpdesk_tracker_agree'] = '1';
|
156 |
+
update_option( 'wpdesk_helper_options', $options );
|
157 |
+
}
|
158 |
+
if ( $type == 'dismiss_coupon' ) {
|
159 |
+
$options = get_option('wpdesk_helper_options', array() );
|
160 |
+
if ( !is_array( $options ) ) {
|
161 |
+
$options = array();
|
162 |
+
}
|
163 |
+
delete_option( 'wpdesk_tracker_notice' );
|
164 |
+
$options['wpdesk_tracker_agree'] = '0';
|
165 |
+
update_option( 'wpdesk_helper_options', $options );
|
166 |
+
update_option( 'wpdesk_tracker_notice', 'dismiss_all' );
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
public static function update_option_wpdesk_helper_options( $old_value, $value, $option ) {
|
171 |
+
if ( empty( $old_value ) ) {
|
172 |
+
$old_value = array( 'wpdesk_tracker_agree' => '0' );
|
173 |
+
}
|
174 |
+
if ( empty( $old_value['wpdesk_tracker_agree'] ) ) {
|
175 |
+
$old_value['wpdesk_tracker_agree'] = '0';
|
176 |
+
}
|
177 |
+
if ( empty( $value ) ) {
|
178 |
+
$value = array( 'wpdesk_tracker_agree' => '0' );
|
179 |
+
}
|
180 |
+
if ( empty( $value['wpdesk_tracker_agree'] ) ) {
|
181 |
+
$value['wpdesk_tracker_agree'] = '0';
|
182 |
+
}
|
183 |
+
if ( $old_value['wpdesk_tracker_agree'] == '0' ) {
|
184 |
+
if ( $value['wpdesk_tracker_agree'] == '1' ) {
|
185 |
+
self::send_tracking_data( true, 'agree' );
|
186 |
+
}
|
187 |
+
}
|
188 |
+
if ( $old_value['wpdesk_tracker_agree'] == '1' ) {
|
189 |
+
if ( $value['wpdesk_tracker_agree'] == '0' ) {
|
190 |
+
self::send_tracking_data( true, 'no' );
|
191 |
+
update_option( 'wpdesk_tracker_notice', 'dismiss_all' );
|
192 |
+
}
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
public static function admin_notices() {
|
197 |
+
if ( !wpdesk_tracker_enabled() ) {
|
198 |
+
return;
|
199 |
+
}
|
200 |
+
$screen = get_current_screen();
|
201 |
+
$options = get_option('wpdesk_helper_options', array() );
|
202 |
+
if ( !is_array( $options ) ) {
|
203 |
+
$options = array();
|
204 |
+
}
|
205 |
+
if ( get_option( 'wpdesk_tracker_notice', '0' ) != 'dismiss_all' ) {
|
206 |
+
if ( empty( $options['wpdesk_tracker_agree'] ) || $options['wpdesk_tracker_agree'] == '0' ) {
|
207 |
+
$coupon_avaliable = false;
|
208 |
+
if ( get_option( 'wpdesk_tracker_notice', '0' ) == '1' ) {
|
209 |
+
$coupon_avaliable = true;
|
210 |
+
}
|
211 |
+
if ( in_array( $screen->id, apply_filters( 'wpdesk_tracker_notice_screens', array() ) ) ) {
|
212 |
+
$user = wp_get_current_user();
|
213 |
+
$username = $user->first_name ? $user->first_name : $user->user_login;
|
214 |
+
$terms_url = get_locale() == 'pl_PL' ? 'https://www.wpdesk.pl/dane-uzytkowania/' : 'https://www.wpdesk.net/usage-tracking/';
|
215 |
+
include( 'views/tracker-notice.php' );
|
216 |
+
}
|
217 |
+
}
|
218 |
+
}
|
219 |
+
if ( $screen->id == 'plugins' ) {
|
220 |
+
if ( isset( $_GET['wpdesk_tracker_opt_out'] ) ) {
|
221 |
+
$options = get_option('wpdesk_helper_options', array() );
|
222 |
+
if ( !is_array( $options ) ) {
|
223 |
+
$options = array();
|
224 |
+
}
|
225 |
+
delete_option( 'wpdesk_tracker_notice' );
|
226 |
+
$options['wpdesk_tracker_agree'] = '0';
|
227 |
+
update_option( 'wpdesk_helper_options', $options );
|
228 |
+
include( 'views/tracker-opt-out-notice.php' );
|
229 |
+
}
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
public static function wpdesk_tracker_page() {
|
234 |
+
$user = wp_get_current_user();
|
235 |
+
$username = $user->first_name ? $user->first_name : $user->user_login;
|
236 |
+
$allow_url = admin_url( 'admin.php?page=wpdesk_tracker' );
|
237 |
+
$allow_url = add_query_arg( 'plugin', $_GET['plugin'], $allow_url );
|
238 |
+
$skip_url = $allow_url;
|
239 |
+
$allow_url = add_query_arg( 'allow', '1', $allow_url );
|
240 |
+
$skip_url = add_query_arg( 'allow', '0', $skip_url );
|
241 |
+
$terms_url = get_locale() == 'pl_PL' ? 'https://www.wpdesk.pl/dane-uzytkowania/' : 'https://www.wpdesk.net/usage-tracking/';
|
242 |
+
include( 'views/tracker-connect.php' );
|
243 |
+
}
|
244 |
+
|
245 |
+
public static function wpdesk_tracker_deactivate() {
|
246 |
+
$user = wp_get_current_user();
|
247 |
+
$username = $user->first_name;
|
248 |
+
$plugin = $_GET['plugin'];
|
249 |
+
$active_plugins = get_plugins();
|
250 |
+
$plugin_name = $active_plugins[$plugin]['Name'];
|
251 |
+
include( 'views/tracker-deactivate.php' );
|
252 |
+
}
|
253 |
+
|
254 |
+
public static function admin_init() {
|
255 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wpdesk_tracker' ) {
|
256 |
+
if ( isset( $_GET['plugin'] ) && isset( $_GET['allow'] ) ) {
|
257 |
+
$options = get_option('wpdesk_helper_options', array() );
|
258 |
+
if ( !is_array( $options ) ) {
|
259 |
+
$options = array();
|
260 |
+
}
|
261 |
+
if ( $_GET['allow'] == '0' ) {
|
262 |
+
$options['wpdesk_tracker_agree'] = '0';
|
263 |
+
update_option( 'wpdesk_helper_options', $options );
|
264 |
+
}
|
265 |
+
else {
|
266 |
+
delete_option( 'wpdesk_tracker_notice' );
|
267 |
+
update_option( 'wpdesk_tracker_agree', '1' );
|
268 |
+
$options['wpdesk_tracker_agree'] = '1';
|
269 |
+
update_option( 'wpdesk_helper_options', $options );
|
270 |
+
}
|
271 |
+
wp_redirect(admin_url( 'plugins.php' ) );
|
272 |
+
exit();
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
public static function wpdesk_tracker_data_license_emails( $data ) {
|
278 |
+
global $wpdesk_helper_plugins;
|
279 |
+
$license_emails_email = array();
|
280 |
+
$license_emails = array();
|
281 |
+
if ( ! isset( $wpdesk_helper_plugins ) ) $wpdesk_helper_plugins = array();
|
282 |
+
foreach ( $wpdesk_helper_plugins as $key => $plugin ) {
|
283 |
+
if ( isset( $plugin['api_manager'] ) ) {
|
284 |
+
$api_manager = $plugin['api_manager'];
|
285 |
+
if ( isset( $api_manager->options[$api_manager->activation_email] ) ) {
|
286 |
+
$license_emails_email[ $api_manager->options[ $api_manager->activation_email ] ] = $api_manager->options[ $api_manager->activation_email ];
|
287 |
+
}
|
288 |
+
}
|
289 |
+
}
|
290 |
+
foreach ( $license_emails_email as $email ) {
|
291 |
+
$license_emails[] = $email;
|
292 |
+
}
|
293 |
+
$data['license_emails'] = $license_emails;
|
294 |
+
return $data;
|
295 |
+
}
|
296 |
+
|
297 |
+
public static function wpdesk_tracker_data_shipping_country_per_order( $data ) {
|
298 |
+
global $wpdb;
|
299 |
+
$query = $wpdb->get_results("
|
300 |
+
SELECT m.meta_value AS shipping_country, p.post_status AS post_status , COUNT(p.ID) AS orders
|
301 |
+
FROM {$wpdb->postmeta} m, {$wpdb->posts} p
|
302 |
+
WHERE p.ID = m.post_id
|
303 |
+
AND m.meta_key = '_shipping_country'
|
304 |
+
GROUP BY shipping_country, post_status ORDER BY orders DESC"
|
305 |
+
);
|
306 |
+
$data['shipping_country_per_order'] = array();
|
307 |
+
if ( $query ) {
|
308 |
+
foreach ( $query as $row ) {
|
309 |
+
if ( !isset( $data['shipping_country_per_order'][$row->shipping_country] ) ) {
|
310 |
+
$data['shipping_country_per_order'][$row->shipping_country] = array();
|
311 |
+
}
|
312 |
+
$data['shipping_country_per_order'][$row->shipping_country][$row->post_status] = $row->orders;
|
313 |
+
}
|
314 |
+
}
|
315 |
+
return $data;
|
316 |
+
}
|
317 |
+
|
318 |
+
public static function wpdesk_tracker_data_shipping_classes( $data ) {
|
319 |
+
$data['number_of_shipping_classes'] = 0;
|
320 |
+
$shipping_classes = WC()->shipping()->get_shipping_classes();
|
321 |
+
if ( is_array( $shipping_classes ) ) {
|
322 |
+
$data['number_of_shipping_classes'] = count( $shipping_classes );
|
323 |
+
}
|
324 |
+
return $data;
|
325 |
+
}
|
326 |
+
|
327 |
+
public static function wpdesk_tracker_data_product_variations( $data ) {
|
328 |
+
$data['number_of_variations'] = 0;
|
329 |
+
$number_of_variations = wp_count_posts( 'product_variation' );
|
330 |
+
$data['number_of_variations'] = $number_of_variations;
|
331 |
+
return $data;
|
332 |
+
}
|
333 |
+
|
334 |
+
public static function wpdesk_tracker_data_orders_per_month( $data ) {
|
335 |
+
global $wpdb;
|
336 |
+
$query = $wpdb->get_results("
|
337 |
+
SELECT min(post_date) min, max(post_date) max, TIMESTAMPDIFF(MONTH, min(post_date), max(post_date) )+1 months
|
338 |
+
FROM {$wpdb->posts} p
|
339 |
+
WHERE p.post_type = 'shop_order'
|
340 |
+
AND p.post_status = 'wc-completed'
|
341 |
+
"
|
342 |
+
);
|
343 |
+
$data['orders_per_month'] = array();
|
344 |
+
if ( $query ) {
|
345 |
+
foreach ( $query as $row ) {
|
346 |
+
$data['orders_per_month']['first'] = $row->min;
|
347 |
+
$data['orders_per_month']['last'] = $row->max;
|
348 |
+
$data['orders_per_month']['months'] = $row->months;
|
349 |
+
if ( $row->months != 0 ) {
|
350 |
+
if ( isset( $data['orders'] ) && isset( $data['orders']['wc-completed'] ) ) {
|
351 |
+
$data['orders_per_month']['per_month'] = floatval($data['orders']['wc-completed'])/floatval($row->months);
|
352 |
+
}
|
353 |
+
}
|
354 |
+
}
|
355 |
+
}
|
356 |
+
return $data;
|
357 |
+
}
|
358 |
+
|
359 |
+
|
360 |
+
public static function send_deactivation_data() {
|
361 |
+
|
362 |
+
$params = array();
|
363 |
+
|
364 |
+
$params['click_action'] = 'plugin_deactivation';
|
365 |
+
|
366 |
+
$params['plugin'] = $_REQUEST['plugin'];
|
367 |
+
|
368 |
+
$params['plugin_name'] = $_REQUEST['plugin_name'];
|
369 |
+
|
370 |
+
$params['reason'] = $_REQUEST['reason'];
|
371 |
+
|
372 |
+
if ( !empty( $_REQUEST['additional_info'] ) ) {
|
373 |
+
$params['additional_info'] = $_REQUEST['additional_info'];
|
374 |
+
}
|
375 |
+
$response = wp_remote_post( self::$api_url, array(
|
376 |
+
'method' => 'POST',
|
377 |
+
'timeout' => 5,
|
378 |
+
'redirection' => 5,
|
379 |
+
'httpversion' => '1.0',
|
380 |
+
'blocking' => false,
|
381 |
+
'headers' => array( 'user-agent' => 'WPDeskTracker' ),
|
382 |
+
'body' => json_encode( $params ),
|
383 |
+
'cookies' => array(),
|
384 |
+
)
|
385 |
+
);
|
386 |
+
}
|
387 |
+
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Decide whether to send tracking data or not.
|
391 |
+
*
|
392 |
+
* @param boolean $override
|
393 |
+
*/
|
394 |
+
public static function send_tracking_data( $override = false, $click_action = null ) {
|
395 |
+
$options = get_option('wpdesk_helper_options', array() );
|
396 |
+
if ( empty( $options ) ) {
|
397 |
+
$options = array();
|
398 |
+
}
|
399 |
+
if ( empty( $options['wpdesk_tracker_agree'] ) ) {
|
400 |
+
$options['wpdesk_tracker_agree'] = '0';
|
401 |
+
}
|
402 |
+
if ( empty( $click_action ) && $options['wpdesk_tracker_agree'] == '0' ) {
|
403 |
+
return;
|
404 |
+
}
|
405 |
+
if ( ! wpdesk_tracker_enabled() ) {
|
406 |
+
return;
|
407 |
+
}
|
408 |
+
// Dont trigger this on AJAX Requests
|
409 |
+
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
410 |
+
//return;
|
411 |
+
}
|
412 |
+
if ( ! apply_filters( 'wpdesk_tracker_send_override', $override ) ) {
|
413 |
+
// Send a maximum of once per week by default.
|
414 |
+
$last_send = self::get_last_send_time();
|
415 |
+
if ( $last_send && $last_send > apply_filters( 'wpdesk_tracker_last_send_interval', strtotime( '-1 week' ) ) ) {
|
416 |
+
return;
|
417 |
+
}
|
418 |
+
} else {
|
419 |
+
// Make sure there is at least a 1 hour delay between override sends, we dont want duplicate calls due to double clicking links.
|
420 |
+
$last_send = self::get_last_send_time();
|
421 |
+
if ( empty( $click_action ) && $last_send && $last_send > strtotime( '-1 hours' ) ) {
|
422 |
+
return;
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
// Update time first before sending to ensure it is set
|
427 |
+
update_option( 'wpdesk_tracker_last_send', time() );
|
428 |
+
|
429 |
+
if ( empty( $click_action ) || $click_action == 'agree' ) {
|
430 |
+
$params = self::get_tracking_data();
|
431 |
+
|
432 |
+
if ( isset( $params['active_plugins'] ) ) {
|
433 |
+
foreach ( $params['active_plugins'] as $plugin=>$plugin_data ) {
|
434 |
+
$option_name = 'plugin_activation_' . $plugin;
|
435 |
+
$activation_date = get_option( $option_name, '' );
|
436 |
+
if ( $activation_date != '' ) {
|
437 |
+
$params['active_plugins'][$plugin]['activation_date'] = $activation_date;
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
if ( !empty( $click_action ) ) {
|
443 |
+
$params['click_action'] = 'agree';
|
444 |
+
}
|
445 |
+
if ( self::$request_coupon ) {
|
446 |
+
$params['get_coupon'] = 1;
|
447 |
+
$params['click_action'] = 'agree_coupon';
|
448 |
+
}
|
449 |
+
}
|
450 |
+
else {
|
451 |
+
$params = array( 'click_action' => 'no' );
|
452 |
+
}
|
453 |
+
|
454 |
+
$params['localhost'] = 'no';
|
455 |
+
if ( !empty( $_SERVER['SERVER_ADDR'] ) && $_SERVER['SERVER_ADDR'] == '127.0.0.1' ) {
|
456 |
+
$params['localhost'] = 'yes';
|
457 |
+
}
|
458 |
+
|
459 |
+
$response = wp_remote_post( self::$api_url, array(
|
460 |
+
'method' => 'POST',
|
461 |
+
'timeout' => 5,
|
462 |
+
'redirection' => 5,
|
463 |
+
'httpversion' => '1.0',
|
464 |
+
'blocking' => false,
|
465 |
+
'headers' => array( 'user-agent' => 'WPDeskTracker' ),
|
466 |
+
'body' => json_encode( $params ),
|
467 |
+
'cookies' => array(),
|
468 |
+
)
|
469 |
+
);
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* Get the last time tracking data was sent.
|
474 |
+
* @return int|bool
|
475 |
+
*/
|
476 |
+
private static function get_last_send_time() {
|
477 |
+
return apply_filters( 'wpdesk_tracker_last_send_time', get_option( 'wpdesk_tracker_last_send', false ) );
|
478 |
+
}
|
479 |
+
|
480 |
+
/**
|
481 |
+
* Get all the tracking data.
|
482 |
+
* @return array
|
483 |
+
*/
|
484 |
+
private static function get_tracking_data() {
|
485 |
+
$data = array();
|
486 |
+
|
487 |
+
// General site info
|
488 |
+
$data['url'] = home_url();
|
489 |
+
$data['email'] = apply_filters( 'wpdesk_tracker_admin_email', get_option( 'admin_email' ) );
|
490 |
+
$data['theme'] = self::get_theme_info();
|
491 |
+
|
492 |
+
// WordPress Info
|
493 |
+
$data['wp'] = self::get_wordpress_info();
|
494 |
+
|
495 |
+
// Server Info
|
496 |
+
$data['server'] = self::get_server_info();
|
497 |
+
|
498 |
+
// Plugin info
|
499 |
+
$all_plugins = self::get_all_plugins();
|
500 |
+
$data['active_plugins'] = $all_plugins['active_plugins'];
|
501 |
+
$data['inactive_plugins'] = $all_plugins['inactive_plugins'];
|
502 |
+
|
503 |
+
// Jetpack & WooCommerce Connect
|
504 |
+
$data['jetpack_version'] = defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : 'none';
|
505 |
+
$data['jetpack_connected'] = ( class_exists( 'Jetpack' ) && is_callable( 'Jetpack::is_active' ) && Jetpack::is_active() ) ? 'yes' : 'no';
|
506 |
+
$data['jetpack_is_staging'] = ( class_exists( 'Jetpack' ) && is_callable( 'Jetpack::is_staging_site' ) && Jetpack::is_staging_site() ) ? 'yes' : 'no';
|
507 |
+
$data['connect_installed'] = class_exists( 'WC_Connect_Loader' ) ? 'yes' : 'no';
|
508 |
+
$data['connect_active'] = ( class_exists( 'WC_Connect_Loader' ) && wp_next_scheduled( 'wc_connect_fetch_service_schemas' ) ) ? 'yes' : 'no';
|
509 |
+
|
510 |
+
// Store count info
|
511 |
+
$data['users'] = self::get_user_counts();
|
512 |
+
$data['products'] = self::get_product_counts();
|
513 |
+
$data['orders'] = self::get_order_counts();
|
514 |
+
|
515 |
+
// Payment gateway info
|
516 |
+
$data['gateways'] = self::get_active_payment_gateways();
|
517 |
+
|
518 |
+
// Shipping method info
|
519 |
+
$data['shipping_methods'] = self::get_active_shipping_methods();
|
520 |
+
|
521 |
+
// Get all WooCommerce options info
|
522 |
+
$data['settings'] = self::get_all_woocommerce_options_values();
|
523 |
+
|
524 |
+
// Template overrides
|
525 |
+
$data['template_overrides'] = self::get_all_template_overrides();
|
526 |
+
|
527 |
+
// Template overrides
|
528 |
+
$data['admin_user_agents'] = self::get_admin_user_agents();
|
529 |
+
|
530 |
+
return apply_filters( 'wpdesk_tracker_data', $data );
|
531 |
+
}
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Get the current theme info, theme name and version.
|
535 |
+
* @return array
|
536 |
+
*/
|
537 |
+
public static function get_theme_info() {
|
538 |
+
$theme_data = wp_get_theme();
|
539 |
+
$theme_child_theme = is_child_theme() ? 'Yes' : 'No';
|
540 |
+
$theme_wc_support = ( ! current_theme_supports( 'woocommerce' ) && ! in_array( $theme_data->template, wc_get_core_supported_themes() ) ) ? 'No' : 'Yes';
|
541 |
+
|
542 |
+
return array( 'name' => $theme_data->Name,
|
543 |
+
'version' => $theme_data->Version,
|
544 |
+
'child_theme' => $theme_child_theme,
|
545 |
+
'wc_support' => $theme_wc_support
|
546 |
+
);
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* Get WordPress related data.
|
551 |
+
* @return array
|
552 |
+
*/
|
553 |
+
private static function get_wordpress_info() {
|
554 |
+
$wp_data = array();
|
555 |
+
|
556 |
+
$memory = wc_let_to_num( WP_MEMORY_LIMIT );
|
557 |
+
|
558 |
+
if ( function_exists( 'memory_get_usage' ) ) {
|
559 |
+
$system_memory = wc_let_to_num( @ini_get( 'memory_limit' ) );
|
560 |
+
$memory = max( $memory, $system_memory );
|
561 |
+
}
|
562 |
+
|
563 |
+
$wp_data['memory_limit'] = size_format( $memory );
|
564 |
+
$wp_data['debug_mode'] = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? 'Yes' : 'No';
|
565 |
+
$wp_data['locale'] = get_locale();
|
566 |
+
$wp_data['version'] = get_bloginfo( 'version' );
|
567 |
+
$wp_data['multisite'] = is_multisite() ? 'Yes' : 'No';
|
568 |
+
|
569 |
+
return $wp_data;
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* Get server related info.
|
574 |
+
* @return array
|
575 |
+
*/
|
576 |
+
private static function get_server_info() {
|
577 |
+
$server_data = array();
|
578 |
+
|
579 |
+
if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
|
580 |
+
$server_data['software'] = $_SERVER['SERVER_SOFTWARE'];
|
581 |
+
}
|
582 |
+
|
583 |
+
if ( function_exists( 'phpversion' ) ) {
|
584 |
+
$server_data['php_version'] = phpversion();
|
585 |
+
}
|
586 |
+
|
587 |
+
if ( function_exists( 'ini_get' ) ) {
|
588 |
+
$server_data['php_post_max_size'] = size_format( wc_let_to_num( ini_get( 'post_max_size' ) ) );
|
589 |
+
$server_data['php_time_limt'] = ini_get( 'max_execution_time' );
|
590 |
+
$server_data['php_max_input_vars'] = ini_get( 'max_input_vars' );
|
591 |
+
$server_data['php_suhosin'] = extension_loaded( 'suhosin' ) ? 'Yes' : 'No';
|
592 |
+
}
|
593 |
+
|
594 |
+
global $wpdb;
|
595 |
+
$server_data['mysql_version'] = $wpdb->db_version();
|
596 |
+
|
597 |
+
$server_data['php_max_upload_size'] = size_format( wp_max_upload_size() );
|
598 |
+
$server_data['php_default_timezone'] = date_default_timezone_get();
|
599 |
+
$server_data['php_soap'] = class_exists( 'SoapClient' ) ? 'Yes' : 'No';
|
600 |
+
$server_data['php_fsockopen'] = function_exists( 'fsockopen' ) ? 'Yes' : 'No';
|
601 |
+
$server_data['php_curl'] = function_exists( 'curl_init' ) ? 'Yes' : 'No';
|
602 |
+
|
603 |
+
return $server_data;
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Get all plugins grouped into activated or not.
|
608 |
+
* @return array
|
609 |
+
*/
|
610 |
+
private static function get_all_plugins() {
|
611 |
+
// Ensure get_plugins function is loaded
|
612 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
613 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
614 |
+
}
|
615 |
+
|
616 |
+
$plugins = get_plugins();
|
617 |
+
$active_plugins_keys = get_option( 'active_plugins', array() );
|
618 |
+
$active_plugins = array();
|
619 |
+
|
620 |
+
foreach ( $plugins as $k => $v ) {
|
621 |
+
// Take care of formatting the data how we want it.
|
622 |
+
$formatted = array();
|
623 |
+
$formatted['name'] = strip_tags( $v['Name'] );
|
624 |
+
if ( isset( $v['Version'] ) ) {
|
625 |
+
$formatted['version'] = strip_tags( $v['Version'] );
|
626 |
+
}
|
627 |
+
if ( isset( $v['Author'] ) ) {
|
628 |
+
$formatted['author'] = strip_tags( $v['Author'] );
|
629 |
+
}
|
630 |
+
if ( isset( $v['Network'] ) ) {
|
631 |
+
$formatted['network'] = strip_tags( $v['Network'] );
|
632 |
+
}
|
633 |
+
if ( isset( $v['PluginURI'] ) ) {
|
634 |
+
$formatted['plugin_uri'] = strip_tags( $v['PluginURI'] );
|
635 |
+
}
|
636 |
+
if ( in_array( $k, $active_plugins_keys ) ) {
|
637 |
+
// Remove active plugins from list so we can show active and inactive separately
|
638 |
+
unset( $plugins[ $k ] );
|
639 |
+
$active_plugins[ $k ] = $formatted;
|
640 |
+
} else {
|
641 |
+
$plugins[ $k ] = $formatted;
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
return array( 'active_plugins' => $active_plugins, 'inactive_plugins' => $plugins );
|
646 |
+
}
|
647 |
+
|
648 |
+
/**
|
649 |
+
* Get user totals based on user role.
|
650 |
+
* @return array
|
651 |
+
*/
|
652 |
+
private static function get_user_counts() {
|
653 |
+
$user_count = array();
|
654 |
+
$user_count_data = count_users();
|
655 |
+
$user_count['total'] = $user_count_data['total_users'];
|
656 |
+
|
657 |
+
// Get user count based on user role
|
658 |
+
foreach ( $user_count_data['avail_roles'] as $role => $count ) {
|
659 |
+
$user_count[ $role ] = $count;
|
660 |
+
}
|
661 |
+
|
662 |
+
return $user_count;
|
663 |
+
}
|
664 |
+
|
665 |
+
/**
|
666 |
+
* Get product totals based on product type.
|
667 |
+
* @return array
|
668 |
+
*/
|
669 |
+
private static function get_product_counts() {
|
670 |
+
$product_count = array();
|
671 |
+
$product_count_data = wp_count_posts( 'product' );
|
672 |
+
$product_count['total'] = $product_count_data->publish;
|
673 |
+
|
674 |
+
$product_statuses = get_terms( 'product_type', array( 'hide_empty' => 0 ) );
|
675 |
+
foreach ( $product_statuses as $product_status ) {
|
676 |
+
$product_count[ $product_status->name ] = $product_status->count;
|
677 |
+
}
|
678 |
+
|
679 |
+
return $product_count;
|
680 |
+
}
|
681 |
+
|
682 |
+
/**
|
683 |
+
* Get order counts based on order status.
|
684 |
+
* @return array
|
685 |
+
*/
|
686 |
+
private static function get_order_counts() {
|
687 |
+
$order_count = array();
|
688 |
+
$order_count_data = wp_count_posts( 'shop_order' );
|
689 |
+
|
690 |
+
foreach ( wc_get_order_statuses() as $status_slug => $status_name ) {
|
691 |
+
$order_count[ $status_slug ] = $order_count_data->{$status_slug};
|
692 |
+
}
|
693 |
+
|
694 |
+
return $order_count;
|
695 |
+
}
|
696 |
+
|
697 |
+
/**
|
698 |
+
* Get a list of all active payment gateways.
|
699 |
+
* @return array
|
700 |
+
*/
|
701 |
+
private static function get_active_payment_gateways() {
|
702 |
+
$active_gateways = array();
|
703 |
+
$gateways = WC()->payment_gateways->payment_gateways();
|
704 |
+
foreach ( $gateways as $id => $gateway ) {
|
705 |
+
if ( isset( $gateway->enabled ) && 'yes' === $gateway->enabled ) {
|
706 |
+
$active_gateways[ $id ] = array( 'title' => $gateway->title, 'supports' => $gateway->supports );
|
707 |
+
}
|
708 |
+
}
|
709 |
+
|
710 |
+
return $active_gateways;
|
711 |
+
}
|
712 |
+
|
713 |
+
/**
|
714 |
+
* Get a list of all active shipping methods.
|
715 |
+
* @return array
|
716 |
+
*/
|
717 |
+
private static function get_active_shipping_methods() {
|
718 |
+
$active_methods = array();
|
719 |
+
$shipping_methods = WC()->shipping->get_shipping_methods();
|
720 |
+
foreach ( $shipping_methods as $id => $shipping_method ) {
|
721 |
+
if ( isset( $shipping_method->enabled ) && 'yes' === $shipping_method->enabled ) {
|
722 |
+
$active_methods[ $id ] = array( 'title' => $shipping_method->title,
|
723 |
+
'tax_status' => $shipping_method->tax_status
|
724 |
+
);
|
725 |
+
}
|
726 |
+
}
|
727 |
+
|
728 |
+
return $active_methods;
|
729 |
+
}
|
730 |
+
|
731 |
+
/**
|
732 |
+
* Get all options starting with woocommerce_ prefix.
|
733 |
+
* @return array
|
734 |
+
*/
|
735 |
+
private static function get_all_woocommerce_options_values() {
|
736 |
+
return array(
|
737 |
+
'version' => WC()->version,
|
738 |
+
'currency' => get_woocommerce_currency(),
|
739 |
+
'base_location' => WC()->countries->get_base_country(),
|
740 |
+
'selling_locations' => WC()->countries->get_allowed_countries(),
|
741 |
+
'api_enabled' => get_option( 'woocommerce_api_enabled' ),
|
742 |
+
'weight_unit' => get_option( 'woocommerce_weight_unit' ),
|
743 |
+
'dimension_unit' => get_option( 'woocommerce_dimension_unit' ),
|
744 |
+
'download_method' => get_option( 'woocommerce_file_download_method' ),
|
745 |
+
'download_require_login' => get_option( 'woocommerce_downloads_require_login' ),
|
746 |
+
'calc_taxes' => get_option( 'woocommerce_calc_taxes' ),
|
747 |
+
'coupons_enabled' => get_option( 'woocommerce_enable_coupons' ),
|
748 |
+
'guest_checkout' => get_option( 'woocommerce_enable_guest_checkout' ),
|
749 |
+
'secure_checkout' => get_option( 'woocommerce_force_ssl_checkout' ),
|
750 |
+
'enable_signup_and_login_from_checkout' => get_option( 'woocommerce_enable_signup_and_login_from_checkout' ),
|
751 |
+
'enable_myaccount_registration' => get_option( 'woocommerce_enable_myaccount_registration' ),
|
752 |
+
'registration_generate_username' => get_option( 'woocommerce_registration_generate_username' ),
|
753 |
+
'registration_generate_password' => get_option( 'woocommerce_registration_generate_password' ),
|
754 |
+
);
|
755 |
+
}
|
756 |
+
|
757 |
+
/**
|
758 |
+
* Look for any template override and return filenames.
|
759 |
+
* @return array
|
760 |
+
*/
|
761 |
+
private static function get_all_template_overrides() {
|
762 |
+
$override_data = array();
|
763 |
+
$template_paths = apply_filters( 'woocommerce_template_overrides_scan_paths', array( 'WooCommerce' => WC()->plugin_path() . '/templates/' ) );
|
764 |
+
$scanned_files = array();
|
765 |
+
|
766 |
+
require_once( WC()->plugin_path() . '/includes/admin/class-wc-admin-status.php' );
|
767 |
+
|
768 |
+
foreach ( $template_paths as $plugin_name => $template_path ) {
|
769 |
+
$scanned_files[ $plugin_name ] = WC_Admin_Status::scan_template_files( $template_path );
|
770 |
+
}
|
771 |
+
|
772 |
+
foreach ( $scanned_files as $plugin_name => $files ) {
|
773 |
+
foreach ( $files as $file ) {
|
774 |
+
if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
|
775 |
+
$theme_file = get_stylesheet_directory() . '/' . $file;
|
776 |
+
} elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) {
|
777 |
+
$theme_file = get_stylesheet_directory() . '/woocommerce/' . $file;
|
778 |
+
} elseif ( file_exists( get_template_directory() . '/' . $file ) ) {
|
779 |
+
$theme_file = get_template_directory() . '/' . $file;
|
780 |
+
} elseif ( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) {
|
781 |
+
$theme_file = get_template_directory() . '/woocommerce/' . $file;
|
782 |
+
} else {
|
783 |
+
$theme_file = false;
|
784 |
+
}
|
785 |
+
|
786 |
+
if ( false !== $theme_file ) {
|
787 |
+
$override_data[] = basename( $theme_file );
|
788 |
+
}
|
789 |
+
}
|
790 |
+
}
|
791 |
+
|
792 |
+
return $override_data;
|
793 |
+
}
|
794 |
+
|
795 |
+
/**
|
796 |
+
* When an admin user logs in, there user agent is tracked in user meta and collected here.
|
797 |
+
* @return array
|
798 |
+
*/
|
799 |
+
private static function get_admin_user_agents() {
|
800 |
+
return array_filter( (array) get_option( 'woocommerce_tracker_ua', array() ) );
|
801 |
+
}
|
802 |
+
}
|
803 |
+
|
804 |
+
}
|
inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.mo
ADDED
Binary file
|
inc/wpdesk-tracker/lang/wpdesk-tracker-pl_PL.po
ADDED
@@ -0,0 +1,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP Desk Tracker\n"
|
4 |
+
"POT-Creation-Date: 2017-05-29 16:08+0200\n"
|
5 |
+
"PO-Revision-Date: 2017-05-29 16:08+0200\n"
|
6 |
+
"Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: pl_PL\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.0.2\n"
|
13 |
+
"X-Poedit-Basepath: ../..\n"
|
14 |
+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
15 |
+
"|| n%100>=20) ? 1 : 2);\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
18 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
19 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Poedit-SearchPathExcluded-0: wpdesk-logger.php\n"
|
22 |
+
|
23 |
+
#: wpdesk-tracker/views/tracker-connect.php:7
|
24 |
+
#: wpdesk-tracker/views/tracker-notice.php:5
|
25 |
+
#: wpdesk-tracker/views/tracker-notice.php:16
|
26 |
+
#, php-format
|
27 |
+
msgid "Hey %s,"
|
28 |
+
msgstr "Hej %s,"
|
29 |
+
|
30 |
+
#: wpdesk-tracker/views/tracker-connect.php:8
|
31 |
+
#: wpdesk-tracker/views/tracker-notice.php:17
|
32 |
+
msgid ""
|
33 |
+
"Please help us improve our plugins! If you opt-in, we will collect some non-"
|
34 |
+
"sensitive data and usage information. If you skip this, that's okay! All "
|
35 |
+
"plugins will work just fine."
|
36 |
+
msgstr ""
|
37 |
+
"Proszę pomóż nam udoskonalić nasze wtyczki! Jeśli się zgodzisz, będziemy "
|
38 |
+
"zbierać niewrażliwe dane użytkowania. Jeśli pominiesz ten krok, w porządku! "
|
39 |
+
"Wszystkie wtyczki będą działać."
|
40 |
+
|
41 |
+
#: wpdesk-tracker/views/tracker-connect.php:13
|
42 |
+
msgid "Allow & Continue →"
|
43 |
+
msgstr "Pozwól i kontunuuj →"
|
44 |
+
|
45 |
+
#: wpdesk-tracker/views/tracker-connect.php:14
|
46 |
+
msgid "Skip"
|
47 |
+
msgstr "Pomiń"
|
48 |
+
|
49 |
+
#: wpdesk-tracker/views/tracker-connect.php:19
|
50 |
+
msgid "What permissions are being granted?"
|
51 |
+
msgstr "Jakie uprawnienia są przyznawane?"
|
52 |
+
|
53 |
+
#: wpdesk-tracker/views/tracker-connect.php:26
|
54 |
+
msgid "Your Site Overview"
|
55 |
+
msgstr "Dane witryny"
|
56 |
+
|
57 |
+
#: wpdesk-tracker/views/tracker-connect.php:27
|
58 |
+
msgid "Site URL, WP version, PHP info, admin email"
|
59 |
+
msgstr "URL strony, wersja WP, wersja PHP, email admina"
|
60 |
+
|
61 |
+
#: wpdesk-tracker/views/tracker-connect.php:33
|
62 |
+
msgid "Plugin Usage"
|
63 |
+
msgstr "Dane użytkowania wtyczek"
|
64 |
+
|
65 |
+
#: wpdesk-tracker/views/tracker-connect.php:34
|
66 |
+
msgid "Current settings and usage information of WP Desk plugins"
|
67 |
+
msgstr "Ustawienia i informacje o użytkowaniu wtyczek WP Desk"
|
68 |
+
|
69 |
+
#: wpdesk-tracker/views/tracker-connect.php:40
|
70 |
+
msgid "Your Store Overview"
|
71 |
+
msgstr "Dane sklepu"
|
72 |
+
|
73 |
+
#: wpdesk-tracker/views/tracker-connect.php:41
|
74 |
+
msgid "Non-sensitive store usage information"
|
75 |
+
msgstr "Tylko niewrażliwe dane o użytkowaniu sklepu"
|
76 |
+
|
77 |
+
#: wpdesk-tracker/views/tracker-connect.php:47
|
78 |
+
msgid "Admin Updates"
|
79 |
+
msgstr "Powiadomienia"
|
80 |
+
|
81 |
+
#: wpdesk-tracker/views/tracker-connect.php:48
|
82 |
+
msgid "Announcements, updates, marketing, no spam and easy opt-out"
|
83 |
+
msgstr ""
|
84 |
+
"Ważne powiadomienia, uaktualnienia, marketing, żadnego spamu i łatwa "
|
85 |
+
"rezygnacja"
|
86 |
+
|
87 |
+
#: wpdesk-tracker/views/tracker-connect.php:54
|
88 |
+
#: wpdesk-tracker/views/tracker-notice.php:7
|
89 |
+
#: wpdesk-tracker/views/tracker-notice.php:18
|
90 |
+
msgid "Find out more »"
|
91 |
+
msgstr "Dowiedz się więcej »"
|
92 |
+
|
93 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:3
|
94 |
+
#, php-format
|
95 |
+
msgid "You are deactivating %s plugin."
|
96 |
+
msgstr "Dezaktywowałeś wtyczkę %s."
|
97 |
+
|
98 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:9
|
99 |
+
msgid ""
|
100 |
+
" If you have a moment, please let us know why you are deactivating plugin "
|
101 |
+
"(anonymous feedback):"
|
102 |
+
msgstr ""
|
103 |
+
"Jeśli masz chwilę, prosimy daj nam znać dlaczego dezaktywowałeś wtyczkę "
|
104 |
+
"(anonimowa opinia):"
|
105 |
+
|
106 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:16
|
107 |
+
msgid "The plugin suddenly stopped working"
|
108 |
+
msgstr "Wtyczka nagle przestała działać"
|
109 |
+
|
110 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:24
|
111 |
+
msgid "The plugin broke my site"
|
112 |
+
msgstr "Wtyczka zepsuła moją stronę"
|
113 |
+
|
114 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:32
|
115 |
+
msgid "I found a better plugin"
|
116 |
+
msgstr "Znalazłem lepszą wtyczkę"
|
117 |
+
|
118 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:35
|
119 |
+
msgid "What's the plugin's name?"
|
120 |
+
msgstr "Jaka jest nazwa wtyczki?"
|
121 |
+
|
122 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:43
|
123 |
+
msgid "I only needed the plugin for a short period"
|
124 |
+
msgstr "Potrzebowałem wtyczki tylko przez krótki okres"
|
125 |
+
|
126 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:51
|
127 |
+
msgid "I no longer need the plugin"
|
128 |
+
msgstr "Nie potrzebuję już wtyczki"
|
129 |
+
|
130 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:59
|
131 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
132 |
+
msgstr "Jest to tymczasowa dezaktywacja, debaguję problem"
|
133 |
+
|
134 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:67
|
135 |
+
msgid "Other"
|
136 |
+
msgstr "Inny"
|
137 |
+
|
138 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:70
|
139 |
+
msgid "Kindly tell us the reason so we can improve"
|
140 |
+
msgstr "Napisz nam powód abyśmy mogli go poprawić"
|
141 |
+
|
142 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:77
|
143 |
+
msgid "Skip & Deactivate"
|
144 |
+
msgstr "Pomiń i dezaktywuj"
|
145 |
+
|
146 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:78
|
147 |
+
msgid "Cancel"
|
148 |
+
msgstr "Anuluj"
|
149 |
+
|
150 |
+
#: wpdesk-tracker/views/tracker-deactivate.php:92
|
151 |
+
msgid "Submit & Deactivate"
|
152 |
+
msgstr "Wyślij i dezaktywuj"
|
153 |
+
|
154 |
+
#: wpdesk-tracker/views/tracker-notice.php:6
|
155 |
+
msgid ""
|
156 |
+
"Allow WP Desk to collect plugin usage information and <strong>get discount "
|
157 |
+
"coupon</strong> in our shop. No sensitive data is tracked."
|
158 |
+
msgstr ""
|
159 |
+
"Pozwól WP Desk na zbieranie danych użytkowania wtyczek i <strong>otrzymaj "
|
160 |
+
"kupon rabatowy</strong> do naszego sklepu. Żadne wrażliwe dane nie będą "
|
161 |
+
"zbierane."
|
162 |
+
|
163 |
+
#: wpdesk-tracker/views/tracker-notice.php:10
|
164 |
+
#: wpdesk-tracker/views/tracker-notice.php:21
|
165 |
+
msgid "Allow"
|
166 |
+
msgstr "Pozwól"
|
167 |
+
|
168 |
+
#: wpdesk-tracker/views/tracker-opt-out-notice.php:3
|
169 |
+
msgid ""
|
170 |
+
"You successfully opted out of collecting usage data by WP Desk. If you "
|
171 |
+
"change your mind, you can always opt in later in the plugin's quick links."
|
172 |
+
msgstr ""
|
173 |
+
"Twoja rezygnacja ze zbierania danych użytkowania wtyczek przez WP Desk "
|
174 |
+
"została przyjęta. Jeśli zmienisz zdanie, zawsze możesz włączyć zgodę poprzez "
|
175 |
+
"szybkie linki w menu wtyczek."
|
176 |
+
|
177 |
+
#~ msgid "Error"
|
178 |
+
#~ msgstr "Błąd"
|
179 |
+
|
180 |
+
#~ msgid "Debug"
|
181 |
+
#~ msgstr "Debug"
|
182 |
+
|
183 |
+
#~ msgid "Save Changes"
|
184 |
+
#~ msgstr "Zapisz zmiany"
|
185 |
+
|
186 |
+
#~ msgid "API License Activation"
|
187 |
+
#~ msgstr "Aktywacja licencji"
|
188 |
+
|
189 |
+
#~ msgid "API License Key Status"
|
190 |
+
#~ msgstr "Status licencji"
|
191 |
+
|
192 |
+
#~ msgid "API License Key"
|
193 |
+
#~ msgstr "Klucz licencyjny"
|
194 |
+
|
195 |
+
#~ msgid "API License email"
|
196 |
+
#~ msgstr "E-mail dla licencji"
|
197 |
+
|
198 |
+
#~ msgid "API License Deactivation"
|
199 |
+
#~ msgstr "Dezaktywacja licencji"
|
200 |
+
|
201 |
+
#~ msgid "Deactivate API License Key"
|
202 |
+
#~ msgstr "Dezaktywuj klucz licencyjny"
|
203 |
+
|
204 |
+
#~ msgid "Plugin activated. "
|
205 |
+
#~ msgstr "Wtyczka została włączona."
|
206 |
+
|
207 |
+
#~ msgid "Connection failed to the License Key API server. Try again later."
|
208 |
+
#~ msgstr "Nie udało się połączyć z serwerem licencji. Spróbuj później."
|
209 |
+
|
210 |
+
#~ msgid ""
|
211 |
+
#~ "The license could not be deactivated. Use the License Deactivation tab to "
|
212 |
+
#~ "manually deactivate the license before activating a new license."
|
213 |
+
#~ msgstr ""
|
214 |
+
#~ "Licencja nie może być dezaktywowana. Użyj ręcznej dezaktywacji licencji "
|
215 |
+
#~ "przed aktywacją nowej licencji."
|
216 |
+
|
217 |
+
#~ msgid "Plugin license deactivated. "
|
218 |
+
#~ msgstr "Licencja wtyczki dezaktywowana."
|
219 |
+
|
220 |
+
#~ msgid "Deactivates an API License Key so it can be used on another blog."
|
221 |
+
#~ msgstr ""
|
222 |
+
#~ "Dezaktywuje klucz licencyjny, dzięki czemu może być użyty na innej "
|
223 |
+
#~ "stronie."
|
224 |
+
|
225 |
+
#~ msgid "License Activation"
|
226 |
+
#~ msgstr "Aktywacja licencji"
|
227 |
+
|
228 |
+
#~ msgid "License Deactivation"
|
229 |
+
#~ msgstr "Dezaktywacja licencji"
|
230 |
+
|
231 |
+
#~ msgid ""
|
232 |
+
#~ "The %s%s%s License Key has not been activated, so the plugin is inactive! "
|
233 |
+
#~ "%sClick here%s to activate the license key and the plugin."
|
234 |
+
#~ msgstr ""
|
235 |
+
#~ "Klucz licencyjny wtyczki %s%s%s nie został aktywowany, więc wtyczka jest "
|
236 |
+
#~ "nieaktywna! %sKliknij tutaj%s, aby aktywować klucz licencyjny wtyczki."
|
237 |
+
|
238 |
+
#~ msgid ""
|
239 |
+
#~ "<b>Warning!</b> You're blocking external requests which means you won't "
|
240 |
+
#~ "be able to get %s updates. Please add %s to %s."
|
241 |
+
#~ msgstr ""
|
242 |
+
#~ "<b>Uwaga!</b> Blokujesz zewnętrzne połączenia i nie będziesz otrzymywać "
|
243 |
+
#~ "aktualizacji wtyczki: %s. Proszę dodaj host %s do %s."
|
244 |
+
|
245 |
+
#~ msgid ""
|
246 |
+
#~ "The license key for %s has expired. You can reactivate or purchase a "
|
247 |
+
#~ "license key from your account <a href=\"%s\" target=\"_blank\">dashboard</"
|
248 |
+
#~ "a>."
|
249 |
+
#~ msgstr ""
|
250 |
+
#~ "Licencja na wtyczkę: %s wygasła. Aby odnowić licencję, <a href=\"%s\" "
|
251 |
+
#~ "target=\"_blank\">kliknij tutaj</a>."
|
252 |
+
|
253 |
+
#~ msgid ""
|
254 |
+
#~ "The subscription for %s is on-hold. You can reactivate the subscription "
|
255 |
+
#~ "from your account <a href=\"%s\" target=\"_blank\">dashboard</a>."
|
256 |
+
#~ msgstr ""
|
257 |
+
#~ "Licencja na wtyczkę: %s jest wstrzymana. Możesz zarządzać licencjami <a "
|
258 |
+
#~ "href=\"%s\" target=\"_blank\">tutaj</a>."
|
259 |
+
|
260 |
+
#~ msgid ""
|
261 |
+
#~ "The subscription for %s has been cancelled. You can renew the "
|
262 |
+
#~ "subscription from your account <a href=\"%s\" target=\"_blank"
|
263 |
+
#~ "\">dashboard</a>. A new license key will be emailed to you after your "
|
264 |
+
#~ "order has been completed."
|
265 |
+
#~ msgstr ""
|
266 |
+
#~ "Licencja na wtyczkę: %s została anulowana. Aby odnowić licencję, <a href="
|
267 |
+
#~ "\"%s\" target=\"_blank\">kliknij tutaj</a>."
|
268 |
+
|
269 |
+
#~ msgid ""
|
270 |
+
#~ "The subscription for %s has expired. You can reactivate the subscription "
|
271 |
+
#~ "from your account <a href=\"%s\" target=\"_blank\">dashboard</a>."
|
272 |
+
#~ msgstr ""
|
273 |
+
#~ "Licencja na wtyczkę: %s wygasła. Aby odnowić licencję, <a href=\"%s\" "
|
274 |
+
#~ "target=\"_blank\">kliknij tutaj</a>."
|
275 |
+
|
276 |
+
#~ msgid ""
|
277 |
+
#~ "The subscription for %s has been suspended. You can reactivate the "
|
278 |
+
#~ "subscription from your account <a href=\"%s\" target=\"_blank"
|
279 |
+
#~ "\">dashboard</a>."
|
280 |
+
#~ msgstr ""
|
281 |
+
#~ "Licencja na wtyczkę: %s została zawieszona. Aby odnowić licencję, <a href="
|
282 |
+
#~ "\"%s\" target=\"_blank\">kliknij tutaj</a>."
|
283 |
+
|
284 |
+
#~ msgid ""
|
285 |
+
#~ "The subscription for %s is still pending. You can check on the status of "
|
286 |
+
#~ "the subscription from your account <a href=\"%s\" target=\"_blank"
|
287 |
+
#~ "\">dashboard</a>."
|
288 |
+
#~ msgstr ""
|
289 |
+
#~ "Licencja na wtyczkę: %s jest przetwarzana. Aby sprawdzić status licencji, "
|
290 |
+
#~ "<a href=\"%s\" target=\"_blank\">kliknij tutaj</a>."
|
291 |
+
|
292 |
+
#~ msgid ""
|
293 |
+
#~ "The subscription for %s has been placed in the trash and will be deleted "
|
294 |
+
#~ "soon. You can purchase a new subscription from your account <a href=\"%s"
|
295 |
+
#~ "\" target=\"_blank\">dashboard</a>."
|
296 |
+
#~ msgstr ""
|
297 |
+
#~ "Licencja na wtyczkę: %s została anulowana. Aby odnowić licencję, <a href="
|
298 |
+
#~ "\"%s\" target=\"_blank\">kliknij tutaj</a>."
|
299 |
+
|
300 |
+
#~ msgid ""
|
301 |
+
#~ "A subscription for %s could not be found. You can purchase a subscription "
|
302 |
+
#~ "from your account <a href=\"%s\" target=\"_blank\">dashboard</a>."
|
303 |
+
#~ msgstr ""
|
304 |
+
#~ "Licencja na wtyczkę: %s nie została znaleziona. Możesz zarządzać "
|
305 |
+
#~ "licencjami <a href=\"%s\" target=\"_blank\">tutaj</a>."
|
306 |
+
|
307 |
+
#~ msgid ""
|
308 |
+
#~ "A license key for %s could not be found. Maybe you forgot to enter a "
|
309 |
+
#~ "license key when setting up %s, or the key was deactivated in your "
|
310 |
+
#~ "account. You can reactivate or purchase a license key from your account "
|
311 |
+
#~ "<a href=\"%s\" target=\"_blank\">dashboard</a>."
|
312 |
+
#~ msgstr ""
|
313 |
+
#~ "Licencja na wtyczkę: %s nie została znaleziona. Być może zapomniałeś "
|
314 |
+
#~ "wpisać klucza licencyjnego przy aktywacji: %s lub klucz został "
|
315 |
+
#~ "dezaktywowany. Możesz zarządzać licencjami <a href=\"%s\" target=\"_blank"
|
316 |
+
#~ "\">tutaj</a>."
|
317 |
+
|
318 |
+
#~ msgid ""
|
319 |
+
#~ "Download permission for %s has been revoked possibly due to a license key "
|
320 |
+
#~ "or subscription expiring. You can reactivate or purchase a license key "
|
321 |
+
#~ "from your account <a href=\"%s\" target=\"_blank\">dashboard</a>."
|
322 |
+
#~ msgstr ""
|
323 |
+
#~ "Możliwość pobrania wtyczki: %s została zablokowana. Aby odnowić licencję, "
|
324 |
+
#~ "<a href=\"%s\" target=\"_blank\">kliknij tutaj</a>."
|
325 |
+
|
326 |
+
#~ msgid ""
|
327 |
+
#~ "%s has not been activated. Go to the settings page and enter the license "
|
328 |
+
#~ "key and license email to activate %s."
|
329 |
+
#~ msgstr ""
|
330 |
+
#~ "Wtyczka %s nie została aktywowana. Przejdź do ustawień i wpisz klucz "
|
331 |
+
#~ "licencyjny i e-mail, aby aktywować %s."
|
332 |
+
|
333 |
+
#~ msgid ""
|
334 |
+
#~ "You changed the subscription for %s, so you will need to enter your new "
|
335 |
+
#~ "API License Key in the settings page. The License Key should have arrived "
|
336 |
+
#~ "in your email inbox, if not you can get it by logging into your account "
|
337 |
+
#~ "<a href=\"%s\" target=\"_blank\">dashboard</a>."
|
338 |
+
#~ msgstr ""
|
339 |
+
#~ "Licencja na wtyczkę: %s została zmieniona. Możesz zarządzać licencjami <a "
|
340 |
+
#~ "href=\"%s\" target=\"_blank\">tutaj</a>."
|
341 |
+
|
342 |
+
#~ msgid "No WP Desk plugins found."
|
343 |
+
#~ msgstr "Nie znaleziono wtyczek WP Desk."
|
344 |
+
|
345 |
+
#~ msgid "License Status"
|
346 |
+
#~ msgstr "Status licencji"
|
347 |
+
|
348 |
+
#~ msgid "License Data"
|
349 |
+
#~ msgstr "Dane licencji"
|
350 |
+
|
351 |
+
#~ msgid "Deactivated"
|
352 |
+
#~ msgstr "Nieaktywna"
|
353 |
+
|
354 |
+
#~ msgid "Activated"
|
355 |
+
#~ msgstr "Aktywna"
|
356 |
+
|
357 |
+
#~ msgid ""
|
358 |
+
#~ "An Unexpected HTTP Error occurred during the API request.</p> <p><a href="
|
359 |
+
#~ "\"?\" onclick=\"document.location.reload(); return false;\">Try again</a>"
|
360 |
+
#~ msgstr ""
|
361 |
+
#~ "Wystąpił nieoczekiwany błąd HTTP podczas zapytania API.</p> <p><a href=\"?"
|
362 |
+
#~ "\" onclick=\"document.location.reload(); return false;\">Spróbuj "
|
363 |
+
#~ "ponownie</a>"
|
364 |
+
|
365 |
+
#~ msgid "An unknown error occurred"
|
366 |
+
#~ msgstr "Wystąpił nieznany błąd"
|
367 |
+
|
368 |
+
#~ msgid "Ustawienia"
|
369 |
+
#~ msgstr "Ustawienia"
|
370 |
+
|
371 |
+
#~ msgid "Dokumentacja"
|
372 |
+
#~ msgstr "Dokumentacja"
|
373 |
+
|
374 |
+
#~ msgid "Wsparcie"
|
375 |
+
#~ msgstr "Wsparcie"
|
376 |
+
|
377 |
+
#~ msgid "Settings"
|
378 |
+
#~ msgstr "Ustawienia"
|
379 |
+
|
380 |
+
#~ msgid "Documentation"
|
381 |
+
#~ msgstr "Dokumentacja"
|
382 |
+
|
383 |
+
#~ msgid "Support"
|
384 |
+
#~ msgstr "Wsparcie"
|
385 |
+
|
386 |
+
#~ msgid "Licenses"
|
387 |
+
#~ msgstr "Licencje"
|
388 |
+
|
389 |
+
#~ msgid "WP Desk Debug Log"
|
390 |
+
#~ msgstr "WP Desk Debug Log"
|
391 |
+
|
392 |
+
#~ msgid "Enable"
|
393 |
+
#~ msgstr "Włącz"
|
394 |
+
|
395 |
+
#~ msgid "Writes error log to %s."
|
396 |
+
#~ msgstr "Zapisuje log błędów do %s."
|
397 |
+
|
398 |
+
#~ msgid "WP Desk Helper Settings"
|
399 |
+
#~ msgstr "Ustawienia WP Desk Helper"
|
400 |
+
|
401 |
+
#~ msgid ""
|
402 |
+
#~ "Can not enable WP Desk Debug log! Cannot create directory %s or this "
|
403 |
+
#~ "directory is not writeable!"
|
404 |
+
#~ msgstr ""
|
405 |
+
#~ "Nie można włączyć WP Desk Debug log! Nie można utworzyć katalogu %s lub "
|
406 |
+
#~ "brak uprawnień do zapisu w tym katalogu!"
|
407 |
+
|
408 |
+
#~ msgid "WP Desk Debug Log is enabled. %sPlease disable it after testing%s."
|
409 |
+
#~ msgstr "WP Desk Debug Log jest włączony. %sWyłącz go po testach%s."
|
410 |
+
|
411 |
+
#~ msgid "Key:"
|
412 |
+
#~ msgstr "Klucz:"
|
413 |
+
|
414 |
+
#~ msgid "Email:"
|
415 |
+
#~ msgstr "E-mail:"
|
416 |
+
|
417 |
+
#~ msgid "Activate"
|
418 |
+
#~ msgstr "Aktywuj"
|
419 |
+
|
420 |
+
#~ msgid "WP Desk Licenses"
|
421 |
+
#~ msgstr "Licencje WP Desk"
|
422 |
+
|
423 |
+
#~ msgid "Get your license keys <a href=\"%s\" target=\"_blank\">here</a>."
|
424 |
+
#~ msgstr ""
|
425 |
+
#~ "Pobierz klucze licencyjne do aktywacji wtyczek <a href=\"%s\" target="
|
426 |
+
#~ "\"_blank\">tutaj</a>."
|
427 |
+
|
428 |
+
#~ msgid "Refresh"
|
429 |
+
#~ msgstr "Odśwież"
|
430 |
+
|
431 |
+
#~ msgid "Download plugin"
|
432 |
+
#~ msgstr "Pobierz wtyczkę"
|
433 |
+
|
434 |
+
#~ msgid "Activate plugin"
|
435 |
+
#~ msgstr "Włącz wtyczkę"
|
436 |
+
|
437 |
+
#~ msgid "Activate key"
|
438 |
+
#~ msgstr "Aktywuj licencję"
|
439 |
+
|
440 |
+
#~ msgid "Configure"
|
441 |
+
#~ msgstr "Skonfiguruj"
|
442 |
+
|
443 |
+
#~ msgid "WP Desk Helper"
|
444 |
+
#~ msgstr "WP Desk Helper"
|
445 |
+
|
446 |
+
#~ msgid "https://www.wpdesk.net/"
|
447 |
+
#~ msgstr "https://www.wpdesk.pl/"
|
448 |
+
|
449 |
+
#~ msgid "Enables WP Desk plugin activation and updates."
|
450 |
+
#~ msgstr "Umożliwia aktywację i aktualizacje wtyczek WP Desk."
|
451 |
+
|
452 |
+
#~ msgid "http://www.wpdesk.net/"
|
453 |
+
#~ msgstr "https://www.wpdesk.pl/"
|
454 |
+
|
455 |
+
#~ msgid "http://www.wpdesk.pl/"
|
456 |
+
#~ msgstr "http://www.wpdesk.pl/"
|
457 |
+
|
458 |
+
#~ msgid "WP Desk Debug Log is enabled. %sPlease disable it after testing.%s"
|
459 |
+
#~ msgstr "WP Desk Debug Log jest włączony. %sWyłącz go po testach.%s"
|
460 |
+
|
461 |
+
#, fuzzy
|
462 |
+
#~ msgid "Writes error log to file %s."
|
463 |
+
#~ msgstr "Zapisuje log błędów do %s."
|
464 |
+
|
465 |
+
#~ msgid "WP Desk Plugins"
|
466 |
+
#~ msgstr "Wtyczki WP Desk"
|
467 |
+
|
468 |
+
#~ msgid "http://www.wpdesk.pl/sklep/wpdesk-helper/"
|
469 |
+
#~ msgstr "http://www.wpdesk.pl/sklep/wpdesk-helper/"
|
470 |
+
|
471 |
+
#~ msgid "Product"
|
472 |
+
#~ msgstr "Produkt"
|
inc/wpdesk-tracker/views/tracker-connect.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
<div id="wpdesk_tracker_connect" class="plugin-card">
|
3 |
+
<div class="message plugin-card-top">
|
4 |
+
<span class="wpdesk-logo"></span>
|
5 |
+
|
6 |
+
<p>
|
7 |
+
<?php printf ( __( 'Hey %s,', 'wpdesk-tracker'), $username ); ?><br/>
|
8 |
+
<?php _e( 'Please help us improve our plugins! If you opt-in, we will collect some non-sensitive data and usage information. If you skip this, that\'s okay! All plugins will work just fine.', 'wpdesk-tracker' ); ?>
|
9 |
+
</p>
|
10 |
+
</div>
|
11 |
+
|
12 |
+
<div class="actions plugin-card-bottom">
|
13 |
+
<a id="wpdesk_tracker_allow_button" href="<?php echo $allow_url; ?>" class="button button-primary button-allow button-large"><?php _e( 'Allow & Continue →', 'wpdesk-tracker' ); ?></a>
|
14 |
+
<a href="<?php echo $skip_url; ?>" class="button button-secondary"><?php _e( 'Skip', 'wpdesk-tracker' ); ?></a>
|
15 |
+
<div class="clear"></div>
|
16 |
+
</div>
|
17 |
+
|
18 |
+
<div class="permissions">
|
19 |
+
<a class="trigger" href="#"><?php _e( 'What permissions are being granted?', 'wpdesk-tracker' ); ?></a>
|
20 |
+
|
21 |
+
<div class="permissions-details">
|
22 |
+
<ul>
|
23 |
+
<li id="permission-site" class="permission site">
|
24 |
+
<i class="dashicons dashicons-admin-settings"></i>
|
25 |
+
<div>
|
26 |
+
<span><?php _e( 'Your Site Overview', 'wpdesk-tracker' ); ?></span>
|
27 |
+
<p><?php _e( 'Site URL, WP version, PHP info, admin email', 'wpdesk-tracker' ); ?></p>
|
28 |
+
</div>
|
29 |
+
</li>
|
30 |
+
<li id="permission-events" class="permission events">
|
31 |
+
<i class="dashicons dashicons-admin-plugins"></i>
|
32 |
+
<div>
|
33 |
+
<span><?php _e( 'Plugin Usage', 'wpdesk-tracker' ); ?></span>
|
34 |
+
<p><?php _e( 'Current settings and usage information of WP Desk plugins', 'wpdesk-tracker' ); ?></p>
|
35 |
+
</div>
|
36 |
+
</li>
|
37 |
+
<li id="permission-store" class="permission store">
|
38 |
+
<i class="dashicons dashicons-store"></i>
|
39 |
+
<div>
|
40 |
+
<span><?php _e( 'Your Store Overview', 'wpdesk-tracker' ); ?></span>
|
41 |
+
<p><?php _e( 'Non-sensitive store usage information', 'wpdesk-tracker' ); ?></p>
|
42 |
+
</div>
|
43 |
+
</li>
|
44 |
+
<li id="permission-notices" class="permission notices">
|
45 |
+
<i class="dashicons dashicons-testimonial"></i>
|
46 |
+
<div>
|
47 |
+
<span><?php _e( 'Admin Updates', 'wpdesk-tracker' ); ?></span>
|
48 |
+
<p><?php _e( 'Announcements, updates, marketing, no spam and easy opt-out', 'wpdesk-tracker' ); ?></p>
|
49 |
+
</div>
|
50 |
+
</li>
|
51 |
+
</ul>
|
52 |
+
|
53 |
+
<div class="terms">
|
54 |
+
<a href="<?php echo $terms_url; ?>" target="_blank"><?php _e( 'Find out more »', 'wpdesk-tracker' ); ?></a>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
<script type="text/javascript">
|
60 |
+
jQuery('.trigger').click(function(e) {
|
61 |
+
e.preventDefault();
|
62 |
+
if (jQuery(this).parent().hasClass('open')) {
|
63 |
+
jQuery(this).parent().removeClass('open')
|
64 |
+
}
|
65 |
+
else {
|
66 |
+
jQuery(this).parent().addClass('open');
|
67 |
+
}
|
68 |
+
});
|
69 |
+
jQuery(document).on('click', '#wpdesk_tracker_allow_button',function(e){
|
70 |
+
e.preventDefault();
|
71 |
+
var href = jQuery(this).attr('href');
|
72 |
+
jQuery.ajax( '<?php echo admin_url('admin-ajax.php'); ?>',
|
73 |
+
{
|
74 |
+
type: 'POST',
|
75 |
+
data: {
|
76 |
+
action: 'wpdesk_tracker_notice_handler',
|
77 |
+
type: 'allow',
|
78 |
+
}
|
79 |
+
}
|
80 |
+
).always(function() {
|
81 |
+
window.location.href = href;
|
82 |
+
});
|
83 |
+
});
|
84 |
+
</script>
|
inc/wpdesk-tracker/views/tracker-deactivate.php
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
|
3 |
+
<h2><?php echo sprintf( __( 'You are deactivating %s plugin.', 'wpdesk-tracker' ), $plugin_name ); ?></h2>
|
4 |
+
|
5 |
+
<div class="wpdesk_tracker_deactivate">
|
6 |
+
<div class="body">
|
7 |
+
<div class="panel" data-panel-id="confirm"><p></p></div>
|
8 |
+
<div class="panel active" data-panel-id="reasons">
|
9 |
+
<h4><strong><?php _e(' If you have a moment, please let us know why you are deactivating plugin (anonymous feedback):', 'wpdesk-tracker' ); ?></strong></h4>
|
10 |
+
<ul id="reasons-list">
|
11 |
+
<li class="reason">
|
12 |
+
<label>
|
13 |
+
<span>
|
14 |
+
<input type="radio" name="selected-reason" value="plugin_stopped_working">
|
15 |
+
</span>
|
16 |
+
<span><?php _e( 'The plugin suddenly stopped working', 'wpdesk-tracker' ); ?></span>
|
17 |
+
</label>
|
18 |
+
</li>
|
19 |
+
<li class="reason">
|
20 |
+
<label>
|
21 |
+
<span>
|
22 |
+
<input type="radio" name="selected-reason" value="broke_my_site">
|
23 |
+
</span>
|
24 |
+
<span><?php _e( 'The plugin broke my site', 'wpdesk-tracker' ); ?></span>
|
25 |
+
</label>
|
26 |
+
</li>
|
27 |
+
<li class="reason has-input">
|
28 |
+
<label>
|
29 |
+
<span>
|
30 |
+
<input type="radio" name="selected-reason" value="found_better_plugin">
|
31 |
+
</span>
|
32 |
+
<span><?php _e( 'I found a better plugin', 'wpdesk-tracker' ); ?></span>
|
33 |
+
</label>
|
34 |
+
<div id="found_better_plugin" class="reason-input">
|
35 |
+
<input type="text" name="better_plugin_name" placeholder="<?php _e( 'What\'s the plugin\'s name?', 'wpdesk-tracker' ); ?>">
|
36 |
+
</div>
|
37 |
+
</li>
|
38 |
+
<li class="reason">
|
39 |
+
<label>
|
40 |
+
<span>
|
41 |
+
<input type="radio" name="selected-reason" value="plugin_for_short_period">
|
42 |
+
</span>
|
43 |
+
<span><?php _e('I only needed the plugin for a short period', 'wpdesk-tracker' ); ?></span>
|
44 |
+
</label>
|
45 |
+
</li>
|
46 |
+
<li class="reason">
|
47 |
+
<label>
|
48 |
+
<span>
|
49 |
+
<input type="radio" name="selected-reason" value="no_longer_need">
|
50 |
+
</span>
|
51 |
+
<span><?php _e( 'I no longer need the plugin', 'wpdesk-tracker' ); ?></span>
|
52 |
+
</label>
|
53 |
+
</li>
|
54 |
+
<li class="reason">
|
55 |
+
<label>
|
56 |
+
<span>
|
57 |
+
<input type="radio" name="selected-reason" value="temporary_deactivation">
|
58 |
+
</span>
|
59 |
+
<span><?php _e( 'It\'s a temporary deactivation. I\'m just debugging an issue.', 'wpdesk-tracker' ); ?></span>
|
60 |
+
</label>
|
61 |
+
</li>
|
62 |
+
<li class="reason has-input">
|
63 |
+
<label>
|
64 |
+
<span>
|
65 |
+
<input type="radio" name="selected-reason" value="other">
|
66 |
+
</span>
|
67 |
+
<span><?php _e( 'Other', 'wpdesk-tracker' ); ?></span>
|
68 |
+
</label>
|
69 |
+
<div id="other" class="reason-input">
|
70 |
+
<input type="text" name="other" placeholder="<?php _e( 'Kindly tell us the reason so we can improve', 'wpdesk-tracker' ); ?>">
|
71 |
+
</div>
|
72 |
+
</li>
|
73 |
+
</ul>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<div class="footer">
|
77 |
+
<a href="#" class="button button-secondary button-deactivate allow-deactivate"><?php _e( 'Skip & Deactivate', 'wpdesk-tracker' ); ?></a>
|
78 |
+
<a href="#" class="button button-primary button-close"><?php _e( 'Cancel', 'wpdesk-tracker' ); ?></a>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
<script type="text/javascript">
|
82 |
+
jQuery('input[type=radio]').click(function(){
|
83 |
+
var reason = jQuery('input[name=selected-reason]:checked').val();
|
84 |
+
console.log(reason);
|
85 |
+
jQuery('.reason-input').hide();
|
86 |
+
if ( reason == 'found_better_plugin' ) {
|
87 |
+
jQuery('#found_better_plugin').show();
|
88 |
+
}
|
89 |
+
if ( reason == 'other' ) {
|
90 |
+
jQuery('#other').show();
|
91 |
+
}
|
92 |
+
jQuery('.wpdesk_tracker_deactivate .button-deactivate').html( '<?php _e( 'Submit & Deactivate', 'wpdesk-tracker' ); ?>' );
|
93 |
+
})
|
94 |
+
jQuery('.button-deactivate').click(function(e){
|
95 |
+
e.preventDefault();
|
96 |
+
console.log('deactivate');
|
97 |
+
var reason = jQuery('input[name=selected-reason]:checked').val();
|
98 |
+
var plugin = '<?php echo $plugin; ?>';
|
99 |
+
var plugin_name = '<?php echo $plugin_name; ?>';
|
100 |
+
var additional_info = '';
|
101 |
+
if ( reason == 'found_better_plugin' ) {
|
102 |
+
additional_info = jQuery('#found_better_plugin input').val();
|
103 |
+
}
|
104 |
+
if ( reason == 'other' ) {
|
105 |
+
additional_info = jQuery('#other input').val();
|
106 |
+
}
|
107 |
+
console.log(reason);
|
108 |
+
if ( typeof reason != 'undefined' ) {
|
109 |
+
console.log('not undefined');
|
110 |
+
jQuery('.button').attr('disabled',true);
|
111 |
+
jQuery.ajax( '<?php echo admin_url('admin-ajax.php'); ?>',
|
112 |
+
{
|
113 |
+
type: 'POST',
|
114 |
+
data: {
|
115 |
+
action: 'wpdesk_tracker_deactivation_handler',
|
116 |
+
reason: reason,
|
117 |
+
plugin: plugin,
|
118 |
+
plugin_name: plugin_name,
|
119 |
+
additional_info: additional_info,
|
120 |
+
}
|
121 |
+
}
|
122 |
+
).always(function() {
|
123 |
+
var url = '<?php echo str_replace( '&', '&', admin_url( wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin . '&plugin_status=all&', 'deactivate-plugin_' . $plugin ) ) ); ?>';
|
124 |
+
window.location.href = url;
|
125 |
+
});
|
126 |
+
}
|
127 |
+
else {
|
128 |
+
var url = '<?php echo str_replace( '&', '&', admin_url( wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin . '&plugin_status=all&', 'deactivate-plugin_' . $plugin ) ) ); ?>';
|
129 |
+
window.location.href = url;
|
130 |
+
}
|
131 |
+
})
|
132 |
+
jQuery('.button-close').click(function(e){
|
133 |
+
e.preventDefault();
|
134 |
+
window.history.back();
|
135 |
+
})
|
136 |
+
</script>
|
inc/wpdesk-tracker/views/tracker-notice.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
<?php if ( $coupon_avaliable ) : ?>
|
3 |
+
<div id="wpdesk_tracker_notice_coupon" class="updated notice wpdesk_tracker_notice is-dismissible">
|
4 |
+
<p>
|
5 |
+
<?php printf ( __( 'Hey %s,', 'wpdesk-tracker'), $username ); ?><br/>
|
6 |
+
<?php _e( 'Allow WP Desk to collect plugin usage information and <strong>get discount coupon</strong> in our shop. No sensitive data is tracked.', 'wpdesk-tracker'); ?>
|
7 |
+
<a href="<?php echo $terms_url; ?>" target="_blank"><?php _e( 'Find out more »', 'wpdesk-tracker' ); ?></a>
|
8 |
+
</p>
|
9 |
+
<p>
|
10 |
+
<button id="wpdesk_tracker_allow_coupon_button_notice" class="button button-primary"><?php _e( 'Allow', 'wpdesk-tracker' ); ?></button>
|
11 |
+
</p>
|
12 |
+
</div>
|
13 |
+
<?php else : ?>
|
14 |
+
<div id="wpdesk_tracker_notice" class="updated notice wpdesk_tracker_notice is-dismissible">
|
15 |
+
<p>
|
16 |
+
<?php printf ( __( 'Hey %s,', 'wpdesk-tracker'), $username ); ?><br/>
|
17 |
+
<?php _e( 'Please help us improve our plugins! If you opt-in, we will collect some non-sensitive data and usage information. If you skip this, that\'s okay! All plugins will work just fine.', 'wpdesk-tracker'); ?>
|
18 |
+
<a href="<?php echo $terms_url; ?>" target="_blank"><?php _e( 'Find out more »', 'wpdesk-tracker' ); ?></a>
|
19 |
+
</p>
|
20 |
+
<p>
|
21 |
+
<button id="wpdesk_tracker_allow_button_notice" class="button button-primary"><?php _e( 'Allow', 'wpdesk-tracker' ); ?></button>
|
22 |
+
</p>
|
23 |
+
</div>
|
24 |
+
<?php endif; ?>
|
25 |
+
|
26 |
+
<script type="text/javascript">
|
27 |
+
jQuery(document).on('click', '#wpdesk_tracker_notice_coupon .notice-dismiss',function(e){
|
28 |
+
e.preventDefault();
|
29 |
+
console.log('dismiss');
|
30 |
+
jQuery.ajax( '<?php echo admin_url('admin-ajax.php'); ?>',
|
31 |
+
{
|
32 |
+
type: 'POST',
|
33 |
+
data: {
|
34 |
+
action: 'wpdesk_tracker_notice_handler',
|
35 |
+
type: 'dismiss_coupon',
|
36 |
+
}
|
37 |
+
}
|
38 |
+
);
|
39 |
+
})
|
40 |
+
jQuery(document).on('click', '#wpdesk_tracker_allow_coupon_button_notice',function(e){
|
41 |
+
e.preventDefault();
|
42 |
+
console.log('allow');
|
43 |
+
jQuery.ajax( '<?php echo admin_url('admin-ajax.php'); ?>',
|
44 |
+
{
|
45 |
+
type: 'POST',
|
46 |
+
data: {
|
47 |
+
action: 'wpdesk_tracker_notice_handler',
|
48 |
+
type: 'allow_coupon',
|
49 |
+
}
|
50 |
+
}
|
51 |
+
);
|
52 |
+
jQuery('#wpdesk_tracker_notice_coupon').hide();
|
53 |
+
});
|
54 |
+
jQuery(document).on('click', '#wpdesk_tracker_notice .notice-dismiss',function(e){
|
55 |
+
e.preventDefault();
|
56 |
+
console.log('dismiss');
|
57 |
+
jQuery.ajax( '<?php echo admin_url('admin-ajax.php'); ?>',
|
58 |
+
{
|
59 |
+
type: 'POST',
|
60 |
+
data: {
|
61 |
+
action: 'wpdesk_tracker_notice_handler',
|
62 |
+
type: 'dismiss',
|
63 |
+
}
|
64 |
+
}
|
65 |
+
);
|
66 |
+
})
|
67 |
+
jQuery(document).on('click', '#wpdesk_tracker_allow_button_notice',function(e){
|
68 |
+
e.preventDefault();
|
69 |
+
console.log('allow');
|
70 |
+
jQuery.ajax( '<?php echo admin_url('admin-ajax.php'); ?>',
|
71 |
+
{
|
72 |
+
type: 'POST',
|
73 |
+
data: {
|
74 |
+
action: 'wpdesk_tracker_notice_handler',
|
75 |
+
type: 'allow',
|
76 |
+
}
|
77 |
+
}
|
78 |
+
);
|
79 |
+
jQuery('#wpdesk_tracker_notice').hide();
|
80 |
+
});
|
81 |
+
</script>
|
inc/wpdesk-tracker/views/tracker-opt-out-notice.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
<div id="wpdesk_tracker_notice" class="updated notice wpdesk_tracker_notice">
|
3 |
+
<p><?php _e( 'You successfully opted out of collecting usage data by WP Desk. If you change your mind, you can always opt in later in the plugin\'s quick links.', 'wpdesk-tracker'); ?></p>
|
4 |
+
</div>
|
inc/wpdesk-tracker/views/tracker-plugins-footer.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
<script type="text/javascript">
|
3 |
+
var wpdesk_track_deactivation_plugins = <?php echo json_encode( $plugins ); ?>;
|
4 |
+
console.log(wpdesk_track_deactivation_plugins);
|
5 |
+
jQuery("span.deactivate a").click(function(e){
|
6 |
+
var is_tracked = false;
|
7 |
+
console.log(jQuery(this).closest('tr'));
|
8 |
+
var data_plugin = jQuery(this).closest('tr').attr('data-plugin');
|
9 |
+
console.log(data_plugin);
|
10 |
+
var href = jQuery(this).attr('href');
|
11 |
+
console.log(href);
|
12 |
+
jQuery.each( wpdesk_track_deactivation_plugins, function( key, value ) {
|
13 |
+
console.log( key + ": " + value );
|
14 |
+
if ( value == data_plugin ) {
|
15 |
+
console.log('match');
|
16 |
+
is_tracked = true;
|
17 |
+
}
|
18 |
+
});
|
19 |
+
if ( is_tracked ) {
|
20 |
+
e.preventDefault();
|
21 |
+
window.location.href = '<?php echo admin_url( 'admin.php?page=wpdesk_tracker_deactivate&plugin=' ); ?>' + '&plugin=' + data_plugin;
|
22 |
+
}
|
23 |
+
})
|
24 |
+
</script>
|
inc/wpdesk-woo27-functions.php
CHANGED
@@ -364,6 +364,30 @@ if ( !function_exists( 'wpdesk_update_product_meta' ) ) {
|
|
364 |
}
|
365 |
}
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
if ( !function_exists( 'wpdesk_get_product_post' ) ) {
|
368 |
function wpdesk_get_product_post( WC_Product $product ) {
|
369 |
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
|
364 |
}
|
365 |
}
|
366 |
|
367 |
+
if ( !function_exists( 'wpdesk_get_variation_meta' ) ) {
|
368 |
+
function wpdesk_get_variation_meta( $variation, $meta_key, $single = false ) {
|
369 |
+
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
|
370 |
+
if ( is_numeric( $variation ) ) {
|
371 |
+
return get_post_meta( $variation, $meta_key, $single );
|
372 |
+
} else {
|
373 |
+
return get_post_meta( $variation->variation_id, $meta_key, $single );
|
374 |
+
}
|
375 |
+
} else {
|
376 |
+
if ( is_numeric( $variation ) ) {
|
377 |
+
$variation = wc_get_product( $variation );
|
378 |
+
}
|
379 |
+
switch ( $meta_key ) {
|
380 |
+
case '_stock_status' :
|
381 |
+
return $variation->get_stock_status();
|
382 |
+
default:
|
383 |
+
break;
|
384 |
+
}
|
385 |
+
return $variation->get_meta( $meta_key, $single );
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
if ( !function_exists( 'wpdesk_get_product_post' ) ) {
|
392 |
function wpdesk_get_product_post( WC_Product $product ) {
|
393 |
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
|
lang/flexible-checkout-fields-pl_PL.mo
CHANGED
Binary file
|
lang/flexible-checkout-fields-pl_PL.po
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WooCommerce Flexible Checkout Fields\n"
|
4 |
-
"POT-Creation-Date: 2017-
|
5 |
-
"PO-Revision-Date: 2017-
|
6 |
-
"Last-Translator:
|
7 |
"Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
|
8 |
"Language: pl_PL\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-WPHeader: flexible-checkout-fields.php\n"
|
15 |
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
@@ -71,7 +71,7 @@ msgstr ""
|
|
71 |
"Notatka do twojego zamówienia, np. informacje o dostarczeniu przesyłki."
|
72 |
|
73 |
#: class/inspireCheckoutFieldsSettings.php:136
|
74 |
-
#: class/views/settings-settings.php:11 flexible-checkout-fields.php:
|
75 |
msgid "Settings"
|
76 |
msgstr "Ustawienia"
|
77 |
|
@@ -97,7 +97,7 @@ msgid ""
|
|
97 |
"custom sections. And get rid of these ads :)"
|
98 |
msgstr ""
|
99 |
"Kup wersję PRO z nowymi typami pól (np. checkboksy, radio, wgrywanie pliku) "
|
100 |
-
"i własnymi sekcjami pól. I pozbądź się tych reklam :)"
|
101 |
|
102 |
#: class/views/settings-ads.php:10
|
103 |
msgid "https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/"
|
@@ -136,17 +136,17 @@ msgid "Add New Field"
|
|
136 |
msgstr "Dodaj nowe pole"
|
137 |
|
138 |
#: class/views/settings-fields.php:43 class/views/settings-fields.php:280
|
139 |
-
#: class/views/settings-fields.php:
|
140 |
msgid "Field Type"
|
141 |
msgstr "Typ pola"
|
142 |
|
143 |
#: class/views/settings-fields.php:54 class/views/settings-fields.php:235
|
144 |
-
#: class/views/settings-fields.php:
|
145 |
msgid "Label"
|
146 |
msgstr "Etykieta"
|
147 |
|
148 |
#: class/views/settings-fields.php:59 class/views/settings-fields.php:256
|
149 |
-
#: class/views/settings-fields.php:
|
150 |
msgid "You can use HTML."
|
151 |
msgstr "Możesz używać HTML."
|
152 |
|
@@ -174,7 +174,7 @@ msgstr "Dodaj pole"
|
|
174 |
msgid "Edit Section"
|
175 |
msgstr "Edytuj sekcję"
|
176 |
|
177 |
-
#: class/views/settings-fields.php:115 class/views/settings-fields.php:
|
178 |
#: class/views/settings-settings.php:35
|
179 |
msgid "Save Changes"
|
180 |
msgstr "Zapisz zmiany"
|
@@ -183,27 +183,27 @@ msgstr "Zapisz zmiany"
|
|
183 |
msgid "Section Fields"
|
184 |
msgstr "Pola sekcji"
|
185 |
|
186 |
-
#: class/views/settings-fields.php:162 class/views/settings-fields.php:
|
187 |
msgid "Edit"
|
188 |
msgstr "Edytuj"
|
189 |
|
190 |
-
#: class/views/settings-fields.php:170 class/views/settings-fields.php:
|
191 |
msgid "General"
|
192 |
msgstr "Główne"
|
193 |
|
194 |
-
#: class/views/settings-fields.php:172 class/views/settings-fields.php:
|
195 |
msgid "Appearance"
|
196 |
msgstr "Wygląd"
|
197 |
|
198 |
-
#: class/views/settings-fields.php:202 class/views/settings-fields.php:
|
199 |
msgid "Enable Field"
|
200 |
msgstr "Pokaż pole"
|
201 |
|
202 |
-
#: class/views/settings-fields.php:229 class/views/settings-fields.php:
|
203 |
msgid "Required Field"
|
204 |
msgstr "Pole wymagane"
|
205 |
|
206 |
-
#: class/views/settings-fields.php:245 class/views/settings-fields.php:
|
207 |
msgid "This field is address locale dependent and cannot be modified."
|
208 |
msgstr "Nazwa tego pola nie może byc edytowana."
|
209 |
|
@@ -222,32 +222,32 @@ msgstr ""
|
|
222 |
"Przykład:<br /><code>kobieta : Jestem kobietą</code><br /><code>mezczyzna : "
|
223 |
"Jestem mężczyzną</code>"
|
224 |
|
225 |
-
#: class/views/settings-fields.php:
|
226 |
-
#: class/views/settings-fields.php:
|
227 |
msgid "Placeholder"
|
228 |
msgstr "Placeholder"
|
229 |
|
230 |
-
#: class/views/settings-fields.php:
|
231 |
msgid "CSS Class"
|
232 |
msgstr "Klasa CSS"
|
233 |
|
234 |
-
#: class/views/settings-fields.php:
|
235 |
msgid "Delete Field"
|
236 |
msgstr "Usuń pole"
|
237 |
|
238 |
-
#: class/views/settings-fields.php:
|
239 |
msgid "Reset Section Settings"
|
240 |
msgstr "Resetuj ustawienia sekcji"
|
241 |
|
242 |
-
#: class/views/settings-fields.php:
|
243 |
msgid "Enter field label!"
|
244 |
msgstr "Wpisz etykietę pola!"
|
245 |
|
246 |
-
#: class/views/settings-fields.php:
|
247 |
msgid "Do you really want to delete this field: "
|
248 |
msgstr "Czy na pewno chcesz usunąć to pole: "
|
249 |
|
250 |
-
#: class/views/settings-fields.php:
|
251 |
msgid "Please confirm settings reset."
|
252 |
msgstr "Potwierdź reset ustawień."
|
253 |
|
@@ -300,99 +300,103 @@ msgstr ""
|
|
300 |
"Przeczytaj <a href=\"https://www.wpdesk.pl/docs/woocommerce-checkout-fields-"
|
301 |
"docs/\" target=\"_blank\">instrukcję konfiguracji →"
|
302 |
|
303 |
-
#: flexible-checkout-fields.php:
|
304 |
msgid "Billing"
|
305 |
msgstr "Płatność"
|
306 |
|
307 |
-
#: flexible-checkout-fields.php:
|
308 |
msgid "Shipping"
|
309 |
msgstr "Wysyłka"
|
310 |
|
311 |
-
#: flexible-checkout-fields.php:
|
312 |
msgid "Order"
|
313 |
msgstr "Zamówienie"
|
314 |
|
315 |
-
#: flexible-checkout-fields.php:
|
316 |
msgid "Single Line Text"
|
317 |
msgstr "Pojedyncza linia (input)"
|
318 |
|
319 |
-
#: flexible-checkout-fields.php:
|
320 |
msgid "Paragraph Text"
|
321 |
msgstr "Obszar tekstowy (textarea)"
|
322 |
|
323 |
-
#: flexible-checkout-fields.php:
|
324 |
msgid "Checkbox"
|
325 |
msgstr "Wybór (checkbox)"
|
326 |
|
327 |
-
#: flexible-checkout-fields.php:
|
328 |
msgid "Radio button"
|
329 |
msgstr "Wybór (radio)"
|
330 |
|
331 |
-
#: flexible-checkout-fields.php:
|
332 |
msgid "Select (Drop Down)"
|
333 |
msgstr "Lista rozwijana (select)"
|
334 |
|
335 |
-
#: flexible-checkout-fields.php:
|
336 |
msgid "Date"
|
337 |
msgstr "Data"
|
338 |
|
339 |
-
#: flexible-checkout-fields.php:
|
340 |
msgid "Time"
|
341 |
msgstr "Czas"
|
342 |
|
343 |
-
#: flexible-checkout-fields.php:
|
344 |
msgid "Color Picker"
|
345 |
msgstr "Wybór koloru"
|
346 |
|
347 |
-
#: flexible-checkout-fields.php:
|
348 |
msgid "Headline"
|
349 |
msgstr "Nagłówek"
|
350 |
|
351 |
-
#: flexible-checkout-fields.php:
|
352 |
msgid "HTML"
|
353 |
msgstr "HTML"
|
354 |
|
355 |
-
#: flexible-checkout-fields.php:
|
356 |
msgid "File Upload"
|
357 |
msgstr "Przesyłanie pliku"
|
358 |
|
359 |
-
#: flexible-checkout-fields.php:
|
360 |
msgid "Uploading file..."
|
361 |
msgstr "Przesyłanie plik..."
|
362 |
|
363 |
-
#: flexible-checkout-fields.php:
|
364 |
msgid "Close"
|
365 |
msgstr "Zamknij"
|
366 |
|
367 |
-
#: flexible-checkout-fields.php:
|
368 |
msgid "Today"
|
369 |
msgstr "Dzisiaj"
|
370 |
|
371 |
-
#: flexible-checkout-fields.php:
|
372 |
msgid "Next"
|
373 |
msgstr "Następny"
|
374 |
|
375 |
-
#: flexible-checkout-fields.php:
|
376 |
msgid "Previous"
|
377 |
msgstr "Poprzedni"
|
378 |
|
379 |
-
#: flexible-checkout-fields.php:
|
380 |
msgid "Additional Information"
|
381 |
msgstr "Dodatkowe informacje"
|
382 |
|
383 |
-
#: flexible-checkout-fields.php:
|
384 |
msgid "https://www.wpdesk.net/docs/flexible-checkout-fields-docs/"
|
385 |
msgstr "https://www.wpdesk.pl/docs/woocommerce-checkout-fields-docs/"
|
386 |
|
387 |
-
#: flexible-checkout-fields.php:
|
388 |
msgid "Docs"
|
389 |
msgstr "Docs"
|
390 |
|
391 |
-
#: flexible-checkout-fields.php:
|
392 |
msgid "Support"
|
393 |
msgstr "Wsparcie"
|
394 |
|
395 |
-
#: flexible-checkout-fields.php:
|
|
|
|
|
|
|
|
|
396 |
msgid "Advanced"
|
397 |
msgstr "Zaawansowane"
|
398 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WooCommerce Flexible Checkout Fields\n"
|
4 |
+
"POT-Creation-Date: 2017-05-30 16:13+0200\n"
|
5 |
+
"PO-Revision-Date: 2017-05-30 16:13+0200\n"
|
6 |
+
"Last-Translator: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
|
7 |
"Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
|
8 |
"Language: pl_PL\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.0\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-WPHeader: flexible-checkout-fields.php\n"
|
15 |
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
71 |
"Notatka do twojego zamówienia, np. informacje o dostarczeniu przesyłki."
|
72 |
|
73 |
#: class/inspireCheckoutFieldsSettings.php:136
|
74 |
+
#: class/views/settings-settings.php:11 flexible-checkout-fields.php:855
|
75 |
msgid "Settings"
|
76 |
msgstr "Ustawienia"
|
77 |
|
97 |
"custom sections. And get rid of these ads :)"
|
98 |
msgstr ""
|
99 |
"Kup wersję PRO z nowymi typami pól (np. checkboksy, radio, wgrywanie pliku) "
|
100 |
+
"i własnymi sekcjami pól. I pozbądź się tych reklam :)`"
|
101 |
|
102 |
#: class/views/settings-ads.php:10
|
103 |
msgid "https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/"
|
136 |
msgstr "Dodaj nowe pole"
|
137 |
|
138 |
#: class/views/settings-fields.php:43 class/views/settings-fields.php:280
|
139 |
+
#: class/views/settings-fields.php:451
|
140 |
msgid "Field Type"
|
141 |
msgstr "Typ pola"
|
142 |
|
143 |
#: class/views/settings-fields.php:54 class/views/settings-fields.php:235
|
144 |
+
#: class/views/settings-fields.php:443
|
145 |
msgid "Label"
|
146 |
msgstr "Etykieta"
|
147 |
|
148 |
#: class/views/settings-fields.php:59 class/views/settings-fields.php:256
|
149 |
+
#: class/views/settings-fields.php:445
|
150 |
msgid "You can use HTML."
|
151 |
msgstr "Możesz używać HTML."
|
152 |
|
174 |
msgid "Edit Section"
|
175 |
msgstr "Edytuj sekcję"
|
176 |
|
177 |
+
#: class/views/settings-fields.php:115 class/views/settings-fields.php:354
|
178 |
#: class/views/settings-settings.php:35
|
179 |
msgid "Save Changes"
|
180 |
msgstr "Zapisz zmiany"
|
183 |
msgid "Section Fields"
|
184 |
msgstr "Pola sekcji"
|
185 |
|
186 |
+
#: class/views/settings-fields.php:162 class/views/settings-fields.php:401
|
187 |
msgid "Edit"
|
188 |
msgstr "Edytuj"
|
189 |
|
190 |
+
#: class/views/settings-fields.php:170 class/views/settings-fields.php:408
|
191 |
msgid "General"
|
192 |
msgstr "Główne"
|
193 |
|
194 |
+
#: class/views/settings-fields.php:172 class/views/settings-fields.php:409
|
195 |
msgid "Appearance"
|
196 |
msgstr "Wygląd"
|
197 |
|
198 |
+
#: class/views/settings-fields.php:202 class/views/settings-fields.php:432
|
199 |
msgid "Enable Field"
|
200 |
msgstr "Pokaż pole"
|
201 |
|
202 |
+
#: class/views/settings-fields.php:229 class/views/settings-fields.php:439
|
203 |
msgid "Required Field"
|
204 |
msgstr "Pole wymagane"
|
205 |
|
206 |
+
#: class/views/settings-fields.php:245 class/views/settings-fields.php:313
|
207 |
msgid "This field is address locale dependent and cannot be modified."
|
208 |
msgstr "Nazwa tego pola nie może byc edytowana."
|
209 |
|
222 |
"Przykład:<br /><code>kobieta : Jestem kobietą</code><br /><code>mezczyzna : "
|
223 |
"Jestem mężczyzną</code>"
|
224 |
|
225 |
+
#: class/views/settings-fields.php:303 class/views/settings-fields.php:459
|
226 |
+
#: class/views/settings-fields.php:484 class/views/settings-fields.php:526
|
227 |
msgid "Placeholder"
|
228 |
msgstr "Placeholder"
|
229 |
|
230 |
+
#: class/views/settings-fields.php:327 class/views/settings-fields.php:463
|
231 |
msgid "CSS Class"
|
232 |
msgstr "Klasa CSS"
|
233 |
|
234 |
+
#: class/views/settings-fields.php:339 class/views/settings-fields.php:471
|
235 |
msgid "Delete Field"
|
236 |
msgstr "Usuń pole"
|
237 |
|
238 |
+
#: class/views/settings-fields.php:357
|
239 |
msgid "Reset Section Settings"
|
240 |
msgstr "Resetuj ustawienia sekcji"
|
241 |
|
242 |
+
#: class/views/settings-fields.php:493
|
243 |
msgid "Enter field label!"
|
244 |
msgstr "Wpisz etykietę pola!"
|
245 |
|
246 |
+
#: class/views/settings-fields.php:537
|
247 |
msgid "Do you really want to delete this field: "
|
248 |
msgstr "Czy na pewno chcesz usunąć to pole: "
|
249 |
|
250 |
+
#: class/views/settings-fields.php:559
|
251 |
msgid "Please confirm settings reset."
|
252 |
msgstr "Potwierdź reset ustawień."
|
253 |
|
300 |
"Przeczytaj <a href=\"https://www.wpdesk.pl/docs/woocommerce-checkout-fields-"
|
301 |
"docs/\" target=\"_blank\">instrukcję konfiguracji →"
|
302 |
|
303 |
+
#: flexible-checkout-fields.php:135
|
304 |
msgid "Billing"
|
305 |
msgstr "Płatność"
|
306 |
|
307 |
+
#: flexible-checkout-fields.php:141
|
308 |
msgid "Shipping"
|
309 |
msgstr "Wysyłka"
|
310 |
|
311 |
+
#: flexible-checkout-fields.php:147
|
312 |
msgid "Order"
|
313 |
msgstr "Zamówienie"
|
314 |
|
315 |
+
#: flexible-checkout-fields.php:163
|
316 |
msgid "Single Line Text"
|
317 |
msgstr "Pojedyncza linia (input)"
|
318 |
|
319 |
+
#: flexible-checkout-fields.php:167
|
320 |
msgid "Paragraph Text"
|
321 |
msgstr "Obszar tekstowy (textarea)"
|
322 |
|
323 |
+
#: flexible-checkout-fields.php:175
|
324 |
msgid "Checkbox"
|
325 |
msgstr "Wybór (checkbox)"
|
326 |
|
327 |
+
#: flexible-checkout-fields.php:180
|
328 |
msgid "Radio button"
|
329 |
msgstr "Wybór (radio)"
|
330 |
|
331 |
+
#: flexible-checkout-fields.php:185
|
332 |
msgid "Select (Drop Down)"
|
333 |
msgstr "Lista rozwijana (select)"
|
334 |
|
335 |
+
#: flexible-checkout-fields.php:190
|
336 |
msgid "Date"
|
337 |
msgstr "Data"
|
338 |
|
339 |
+
#: flexible-checkout-fields.php:195
|
340 |
msgid "Time"
|
341 |
msgstr "Czas"
|
342 |
|
343 |
+
#: flexible-checkout-fields.php:200
|
344 |
msgid "Color Picker"
|
345 |
msgstr "Wybór koloru"
|
346 |
|
347 |
+
#: flexible-checkout-fields.php:205
|
348 |
msgid "Headline"
|
349 |
msgstr "Nagłówek"
|
350 |
|
351 |
+
#: flexible-checkout-fields.php:210
|
352 |
msgid "HTML"
|
353 |
msgstr "HTML"
|
354 |
|
355 |
+
#: flexible-checkout-fields.php:215
|
356 |
msgid "File Upload"
|
357 |
msgstr "Przesyłanie pliku"
|
358 |
|
359 |
+
#: flexible-checkout-fields.php:303
|
360 |
msgid "Uploading file..."
|
361 |
msgstr "Przesyłanie plik..."
|
362 |
|
363 |
+
#: flexible-checkout-fields.php:334
|
364 |
msgid "Close"
|
365 |
msgstr "Zamknij"
|
366 |
|
367 |
+
#: flexible-checkout-fields.php:335
|
368 |
msgid "Today"
|
369 |
msgstr "Dzisiaj"
|
370 |
|
371 |
+
#: flexible-checkout-fields.php:338
|
372 |
msgid "Next"
|
373 |
msgstr "Następny"
|
374 |
|
375 |
+
#: flexible-checkout-fields.php:339
|
376 |
msgid "Previous"
|
377 |
msgstr "Poprzedni"
|
378 |
|
379 |
+
#: flexible-checkout-fields.php:662 flexible-checkout-fields.php:820
|
380 |
msgid "Additional Information"
|
381 |
msgstr "Dodatkowe informacje"
|
382 |
|
383 |
+
#: flexible-checkout-fields.php:856
|
384 |
msgid "https://www.wpdesk.net/docs/flexible-checkout-fields-docs/"
|
385 |
msgstr "https://www.wpdesk.pl/docs/woocommerce-checkout-fields-docs/"
|
386 |
|
387 |
+
#: flexible-checkout-fields.php:856
|
388 |
msgid "Docs"
|
389 |
msgstr "Docs"
|
390 |
|
391 |
+
#: flexible-checkout-fields.php:857
|
392 |
msgid "Support"
|
393 |
msgstr "Wsparcie"
|
394 |
|
395 |
+
#: flexible-checkout-fields.php:864
|
396 |
+
msgid "Upgrade"
|
397 |
+
msgstr "Kup PRO"
|
398 |
+
|
399 |
+
#: flexible-checkout-fields.php:883
|
400 |
msgid "Advanced"
|
401 |
msgstr "Zaawansowane"
|
402 |
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Flexible Checkout Fields for WooCommerce ===
|
2 |
-
Contributors: wpdesk, swoboda, jablonowski
|
3 |
Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
|
4 |
-
Tags: woocommerce checkout
|
5 |
-
Requires at least: 4.
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.5
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -98,6 +98,12 @@ Enable conditional logic (show or hide) for fields based on products and/or cate
|
|
98 |
> **Upgrade to Flexible Checkout Fields PRO**<br />
|
99 |
> Get all PRO features and priority e-mail support. [Upgrade Now →](https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/?utm_source=wporg&utm_medium=link&utm_campaign=wporg-fcf)
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= Well Documented =
|
102 |
|
103 |
We are proud of our docs. We spend a great deal of time to polish them and make them as complete as possible. [Read Flexible Checkout Fields Docs →](https://www.wpdesk.net/docs/woocommerce-checkout-fields-docs/)
|
@@ -113,6 +119,23 @@ We provide a limited support for the free version in the [plugin Support Forum](
|
|
113 |
> **Get more WooCommerce plugins from WP Desk**<br />
|
114 |
> We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
== Installation ==
|
117 |
|
118 |
You can install this plugin like any other WordPress plugin.
|
@@ -146,6 +169,11 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
|
|
146 |
|
147 |
== Changelog ==
|
148 |
|
|
|
|
|
|
|
|
|
|
|
149 |
= 1.5 - 2017-04-03 =
|
150 |
* Added support for upcoming WooCommerce 3.0
|
151 |
* Dropped support for WooCommerce below 2.5 (the plugin may still work with older versions but we do not declare official support)
|
1 |
=== Flexible Checkout Fields for WooCommerce ===
|
2 |
+
Contributors: wpdesk, swoboda, jablonowski, barczakszymon, ospiotr
|
3 |
Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
|
4 |
+
Tags: woocommerce checkout fields, woocommerce custom fields, woocommerce checkout manager, woocommerce checkout editor, woocommerce fields manager, woocommerce fields editor, woocommerce custom checkout fields, woocommerce checkout options, woocommerce checkout pro, woocommerce custom sections, woocommerce file upload
|
5 |
+
Requires at least: 4.5
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 1.5.1
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
98 |
> **Upgrade to Flexible Checkout Fields PRO**<br />
|
99 |
> Get all PRO features and priority e-mail support. [Upgrade Now →](https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/?utm_source=wporg&utm_medium=link&utm_campaign=wporg-fcf)
|
100 |
|
101 |
+
= WooCommerce Compatibility =
|
102 |
+
|
103 |
+
**WooCommerce 3.0 ready!** In Flexible Checkout Fields 1.5 we introduced support for WooCommerce 3.0.
|
104 |
+
|
105 |
+
Flexible Checkout Fields also plays well with older versions of WooCommerce. We tested the plugin with WooCommerce 2.5.5 and 2.6.14.
|
106 |
+
|
107 |
= Well Documented =
|
108 |
|
109 |
We are proud of our docs. We spend a great deal of time to polish them and make them as complete as possible. [Read Flexible Checkout Fields Docs →](https://www.wpdesk.net/docs/woocommerce-checkout-fields-docs/)
|
119 |
> **Get more WooCommerce plugins from WP Desk**<br />
|
120 |
> We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
|
121 |
|
122 |
+
= Flexible Checkout Fields in a nutshell =
|
123 |
+
|
124 |
+
Key features:
|
125 |
+
|
126 |
+
* make the purchasing experience as flawless as possible for your users,
|
127 |
+
* remove pain points related to the checkout process,
|
128 |
+
* allow for delivery personalization,
|
129 |
+
* manage fields in WooCommerce,
|
130 |
+
* time picker in WooCommerce checkout,
|
131 |
+
* date picker in WooCommerce checkout,
|
132 |
+
* color picker in WooCommerce checkout,
|
133 |
+
* file upload in WooCommerce checkout,
|
134 |
+
* manage fields in WooCommerce,
|
135 |
+
* add WooCommerce VAT ID number,
|
136 |
+
* add WooCommerce checkout fields,
|
137 |
+
* add WooCommerce custom checkout fields.
|
138 |
+
|
139 |
== Installation ==
|
140 |
|
141 |
You can install this plugin like any other WordPress plugin.
|
169 |
|
170 |
== Changelog ==
|
171 |
|
172 |
+
= 1.5.1 - 2017-05-30 =
|
173 |
+
* Fixed fields sorting bug
|
174 |
+
* Integrated WP Desk Tracker class to help us understand how you use the plugin (you need to opt in to enable it)
|
175 |
+
* Added upgrade link to quick links
|
176 |
+
|
177 |
= 1.5 - 2017-04-03 =
|
178 |
* Added support for upcoming WooCommerce 3.0
|
179 |
* Dropped support for WooCommerce below 2.5 (the plugin may still work with older versions but we do not declare official support)
|