Version Description
25/05/2022 =
- NEW FEATURE - PRODUCTS - User Products - Send an email to the product owner when a product has been sold.
- NEW FEATURE - PAYMENT GATEWAYS - Gateways Fees and Discounts - Added a new feature to apply Payment Gateways Fees by User role.
- FIXED - PRICES & CURRENCIES - Prices and Currencies by Country - Added Compatibility with Webtofee subscription Plugin.
- FIXED - PRICES & CURRENCIES - Wholesale Price - Exclude/Include product issues that have been fixed in the Wholesale Price Module.
- FIXED - PRODUCTS - Add to Cart - Fixed an issue with default variations add to the cart module.
- WooCommerce 6.5.1 tested
- WordPress 6.0 tested
Download this release
Release Info
Developer | ronyp |
Plugin | Booster for WooCommerce |
Version | 5.5.8 |
Comparing to | |
See all releases |
Code changes from version 5.5.7 to 5.5.8
- includes/class-wcj-payment-gateways-fees.php +17 -3
- includes/class-wcj-product-add-to-cart.php +70 -38
- includes/class-wcj-product-by-user.php +73 -2
- includes/functions/wcj-functions-price-currency.php +5 -2
- includes/functions/wcj-functions-products.php +37 -9
- includes/settings/wcj-settings-payment-gateways-fees.php +38 -9
- includes/settings/wcj-settings-price-by-country.php +8 -3
- includes/settings/wcj-settings-product-by-user.php +11 -1
- langs/woocommerce-jetpack.pot +274 -100
- readme.txt +18 -2
- tracking/README.md +1 -0
- tracking/class-example-settings.php +173 -0
- tracking/class-plugin-usage-tracker.php +1137 -0
- version-details.txt +6 -5
- woocommerce-jetpack.php +31 -3
includes/class-wcj-payment-gateways-fees.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Booster for WooCommerce - Module - Gateways Fees and Discounts
|
5 |
*
|
6 |
-
* @version 5.5.
|
7 |
* @since 2.2.2
|
8 |
* @author Pluggabl LLC.
|
9 |
*/
|
@@ -217,7 +217,7 @@ if (!class_exists('WCJ_Payment_Gateways_Fees')) :
|
|
217 |
/**
|
218 |
* gateways_fees.
|
219 |
*
|
220 |
-
* @version 5.5.
|
221 |
*/
|
222 |
function gateways_fees()
|
223 |
{
|
@@ -241,7 +241,21 @@ if (!class_exists('WCJ_Payment_Gateways_Fees')) :
|
|
241 |
$woocommerce->cart->cart_contents_total);
|
242 |
$total_in_cart += 'no' === $this->wcj_get_option('include_taxes', $current_gateway) ? 0 : $woocommerce->cart->get_subtotal_tax() + $woocommerce->cart->get_shipping_tax();
|
243 |
if ('' != $fee_text && $total_in_cart >= $min_cart_amount && (0 == $max_cart_amount || $total_in_cart <= $max_cart_amount) && $this->check_cart_products($current_gateway)) {
|
244 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
$fee_type = $this->wcj_get_option('type', $current_gateway);
|
246 |
$final_fee_to_add = 0;
|
247 |
switch ($fee_type) {
|
3 |
/**
|
4 |
* Booster for WooCommerce - Module - Gateways Fees and Discounts
|
5 |
*
|
6 |
+
* @version 5.5.8
|
7 |
* @since 2.2.2
|
8 |
* @author Pluggabl LLC.
|
9 |
*/
|
217 |
/**
|
218 |
* gateways_fees.
|
219 |
*
|
220 |
+
* @version 5.5.8
|
221 |
*/
|
222 |
function gateways_fees()
|
223 |
{
|
241 |
$woocommerce->cart->cart_contents_total);
|
242 |
$total_in_cart += 'no' === $this->wcj_get_option('include_taxes', $current_gateway) ? 0 : $woocommerce->cart->get_subtotal_tax() + $woocommerce->cart->get_shipping_tax();
|
243 |
if ('' != $fee_text && $total_in_cart >= $min_cart_amount && (0 == $max_cart_amount || $total_in_cart <= $max_cart_amount) && $this->check_cart_products($current_gateway)) {
|
244 |
+
$enableUserWiseChargeDiscount = wcj_get_option('wcj_enable_payment_gateway_charge_discount_userwise')[$current_gateway];
|
245 |
+
if($enableUserWiseChargeDiscount == 'yes'){
|
246 |
+
if ( is_user_logged_in() ) {
|
247 |
+
global $current_user;
|
248 |
+
$user_role = $current_user->roles[0];
|
249 |
+
}else{
|
250 |
+
$user_role = 'guest';
|
251 |
+
}
|
252 |
+
$additionalDiscountbyUser = wcj_get_option('wcj_gateways_fees_'.$user_role)[$current_gateway];
|
253 |
+
if($additionalDiscountbyUser){
|
254 |
+
$fee_value = $additionalDiscountbyUser;
|
255 |
+
}
|
256 |
+
}else{
|
257 |
+
$fee_value = $this->wcj_get_option('value', $current_gateway);
|
258 |
+
}
|
259 |
$fee_type = $this->wcj_get_option('type', $current_gateway);
|
260 |
$final_fee_to_add = 0;
|
261 |
switch ($fee_type) {
|
includes/class-wcj-product-add-to-cart.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product Add To Cart
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.2.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -378,48 +378,80 @@ class WCJ_Product_Add_To_Cart extends WCJ_Module {
|
|
378 |
/*
|
379 |
* Add item to cart on visit.
|
380 |
*
|
381 |
-
* @version
|
382 |
* @todo (maybe) optionally add product every time page is visited (instead of only once)
|
383 |
*/
|
384 |
function add_to_cart_on_visit() {
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
if
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
}
|
421 |
}
|
422 |
-
|
423 |
}
|
424 |
|
425 |
endif;
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product Add To Cart
|
4 |
*
|
5 |
+
* @version 5.5.8
|
6 |
* @since 2.2.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
378 |
/*
|
379 |
* Add item to cart on visit.
|
380 |
*
|
381 |
+
* @version 5.5.8
|
382 |
* @todo (maybe) optionally add product every time page is visited (instead of only once)
|
383 |
*/
|
384 |
function add_to_cart_on_visit() {
|
385 |
+
|
386 |
+
global $product;
|
387 |
+
|
388 |
+
if ( ! is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) && is_product() && ( $product_id = get_the_ID() ) ) {
|
389 |
+
|
390 |
+
$_productId = wc_get_product( get_the_ID() );
|
391 |
+
|
392 |
+
if( $_productId->is_type('variable') ){
|
393 |
+
$default_attributes = $_productId->get_default_attributes();
|
394 |
+
|
395 |
+
foreach($_productId->get_available_variations() as $variation_values ){
|
396 |
+
|
397 |
+
|
398 |
+
foreach($variation_values['attributes'] as $key => $attribute_value ){
|
399 |
+
|
400 |
+
|
401 |
+
$attribute_name = str_replace( 'attribute_', '', $key );
|
402 |
+
$default_value = $_productId->get_variation_default_attribute($attribute_name);
|
403 |
+
if( $default_value == $attribute_value ){
|
404 |
+
|
405 |
+
$product_id = $variation_values['variation_id'];
|
406 |
+
|
407 |
+
} else {
|
408 |
+
|
409 |
+
$product_id = $product_id;
|
410 |
+
|
411 |
+
}
|
412 |
+
}
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
if ( 'per_product' === wcj_get_option( 'wcj_add_to_cart_on_visit_enabled', 'no' ) ) {
|
417 |
+
if ( 'yes' !== get_post_meta( $product_id, '_' . 'wcj_add_to_cart_on_visit_enabled', true ) ) {
|
418 |
+
return;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
if ( isset( WC()->cart ) ) {
|
422 |
+
// Check if product already in cart
|
423 |
+
if ( sizeof( WC()->cart->get_cart() ) > 0 ) {
|
424 |
+
foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
|
425 |
+
$_product = $values['data'];
|
426 |
+
|
427 |
+
//OLD CONDITION - if ( wcj_get_product_id_or_variation_parent_id( $_product ) == $product_id )
|
428 |
+
if ( wcj_get_productId_or_variationId( $_product ) == $product_id ) {
|
429 |
+
// echo " Product found - do not add it";
|
430 |
+
return;
|
431 |
+
}
|
432 |
+
}
|
433 |
+
// echo " Product not found - add it ";
|
434 |
+
|
435 |
+
$was_added_to_cart = WC()->cart->add_to_cart( $product_id );
|
436 |
+
|
437 |
+
} else {
|
438 |
+
// echo "No products in cart - add it ";
|
439 |
+
$was_added_to_cart = WC()->cart->add_to_cart( $product_id );
|
440 |
+
}
|
441 |
+
// Maybe perform add to cart redirect
|
442 |
+
if ( false !== $was_added_to_cart && (
|
443 |
+
'yes' === wcj_get_option( 'wcj_add_to_cart_redirect_enabled', 'no' ) ||
|
444 |
+
'yes' === apply_filters( 'booster_option', 'no', wcj_get_option( 'wcj_add_to_cart_redirect_per_product_enabled', 'no' ) )
|
445 |
+
) ) {
|
446 |
+
if ( $redirect_url = $this->maybe_redirect_to_url( false, $product_id ) ) {
|
447 |
+
if ( wp_safe_redirect( $redirect_url ) ) {
|
448 |
+
exit;
|
449 |
+
}
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
}
|
454 |
}
|
|
|
455 |
}
|
456 |
|
457 |
endif;
|
includes/class-wcj-product-by-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product by User
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.5.2
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -16,7 +16,7 @@ class WCJ_Product_By_User extends WCJ_Module {
|
|
16 |
/**
|
17 |
* Constructor.
|
18 |
*
|
19 |
-
* @version 5.
|
20 |
* @since 2.5.2
|
21 |
* @todo run `add_my_products_endpoint` only if module is enabled
|
22 |
*/
|
@@ -35,6 +35,9 @@ class WCJ_Product_By_User extends WCJ_Module {
|
|
35 |
register_deactivation_hook( __FILE__, array( $this, 'add_my_products_endpoint_flush_rewrite_rules' ) );
|
36 |
add_filter( 'query_vars', array( $this, 'add_my_products_endpoint_query_var' ), 0 );
|
37 |
add_action( 'init', array( $this, 'add_my_products_endpoint' ) );
|
|
|
|
|
|
|
38 |
|
39 |
if ( $this->is_enabled() ) {
|
40 |
if ( 'yes' === wcj_get_option( 'wcj_product_by_user_add_to_my_account', 'yes' ) ) {
|
@@ -45,6 +48,74 @@ class WCJ_Product_By_User extends WCJ_Module {
|
|
45 |
}
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
/**
|
49 |
* Flush rewrite rules on plugin activation.
|
50 |
*
|
2 |
/**
|
3 |
* Booster for WooCommerce - Module - Product by User
|
4 |
*
|
5 |
+
* @version 5.5.8
|
6 |
* @since 2.5.2
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
16 |
/**
|
17 |
* Constructor.
|
18 |
*
|
19 |
+
* @version 5.5.8
|
20 |
* @since 2.5.2
|
21 |
* @todo run `add_my_products_endpoint` only if module is enabled
|
22 |
*/
|
35 |
register_deactivation_hook( __FILE__, array( $this, 'add_my_products_endpoint_flush_rewrite_rules' ) );
|
36 |
add_filter( 'query_vars', array( $this, 'add_my_products_endpoint_query_var' ), 0 );
|
37 |
add_action( 'init', array( $this, 'add_my_products_endpoint' ) );
|
38 |
+
add_action( 'woocommerce_thankyou', array( $this, 'getProductOwnerEmail'), 10, 1 );
|
39 |
+
add_filter( 'woocommerce_email_headers', array( $this,'sendemail_to_productowner_order_place_successfully'), 10, 3 );
|
40 |
+
add_filter( 'woocommerce_email_recipient_no_stock', array( $this,'change_stock_email_recipient'), 10, 2 );
|
41 |
|
42 |
if ( $this->is_enabled() ) {
|
43 |
if ( 'yes' === wcj_get_option( 'wcj_product_by_user_add_to_my_account', 'yes' ) ) {
|
48 |
}
|
49 |
}
|
50 |
|
51 |
+
/**
|
52 |
+
* Get Product User Email at success page
|
53 |
+
*
|
54 |
+
* @version 5.5.8
|
55 |
+
* @since 1.0.0
|
56 |
+
*/
|
57 |
+
function getProductOwnerEmail( $order_id ) {
|
58 |
+
if ( ! $order_id )
|
59 |
+
return;
|
60 |
+
$order = wc_get_order( $order_id );
|
61 |
+
if ( ! $order ) {
|
62 |
+
return -1;
|
63 |
+
}
|
64 |
+
|
65 |
+
foreach ( $order->get_items() as $item_id => $item ) {
|
66 |
+
$productId = $item['product_id'];
|
67 |
+
$authorId = get_post_field( 'post_author', $productId );
|
68 |
+
$user = get_user_by( 'ID', $authorId );
|
69 |
+
$userEmail = $user->user_email;
|
70 |
+
}
|
71 |
+
return $userEmail;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Send Email To Product User at success page when email send setting enable
|
76 |
+
*
|
77 |
+
* @version 5.5.8
|
78 |
+
* @since 1.0.0
|
79 |
+
*/
|
80 |
+
function sendemail_to_productowner_order_place_successfully( $headers, $email_id, $order) {
|
81 |
+
$useremail = $this->getProductOwnerEmail( $order->id );
|
82 |
+
$sendEmailtoUserProduct = get_option( 'wcj_user_product_email_send' );
|
83 |
+
if($sendEmailtoUserProduct == 'yes') {
|
84 |
+
if ( 'new_order' == $email_id ) {
|
85 |
+
$headers .= "Cc: Name <".$useremail.">" . "\r\n";
|
86 |
+
}
|
87 |
+
}
|
88 |
+
return $headers;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Send Email To Product User at success page when Product is Out Of Stock
|
93 |
+
*
|
94 |
+
* @version 5.5.8
|
95 |
+
* @since 1.0.0
|
96 |
+
*/
|
97 |
+
function change_stock_email_recipient( $recipient, $product ) {
|
98 |
+
$sendEmailtoUserProduct = get_option( 'wcj_user_product_email_send' );
|
99 |
+
if($sendEmailtoUserProduct == 'yes') {
|
100 |
+
$recipient = $this->get_out_of_stock_email_to_userproduct_recipient( $recipient, $product );
|
101 |
+
}
|
102 |
+
return $recipient;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get Product User Email at success page for Out Of Stock Product
|
107 |
+
*
|
108 |
+
* @version 5.5.8
|
109 |
+
* @since 1.0.0
|
110 |
+
*/
|
111 |
+
function get_out_of_stock_email_to_userproduct_recipient( $recipient, $product ) {
|
112 |
+
$productId = $product->id;
|
113 |
+
$authorId = get_post_field( 'post_author', $productId );
|
114 |
+
$user = get_user_by( 'ID', $authorId );
|
115 |
+
$recipient = $user->user_email;
|
116 |
+
return $recipient;
|
117 |
+
}
|
118 |
+
|
119 |
/**
|
120 |
* Flush rewrite rules on plugin activation.
|
121 |
*
|
includes/functions/wcj-functions-price-currency.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Price and Currency
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.7.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -49,7 +49,7 @@ if ( ! function_exists( 'wcj_add_change_price_hooks' ) ) {
|
|
49 |
/**
|
50 |
* wcj_add_change_price_hooks.
|
51 |
*
|
52 |
-
* @version
|
53 |
* @since 2.7.0
|
54 |
* @todo use `$module_object->price_hooks_priority` instead of passing `$priority` argument
|
55 |
*/
|
@@ -59,6 +59,9 @@ if ( ! function_exists( 'wcj_add_change_price_hooks' ) ) {
|
|
59 |
add_filter( WCJ_PRODUCT_GET_SALE_PRICE_FILTER, array( $module_object, 'change_price' ), $priority, 2 );
|
60 |
add_filter( WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER, array( $module_object, 'change_price' ), $priority, 2 );
|
61 |
// Variations
|
|
|
|
|
|
|
62 |
add_filter( 'woocommerce_variation_prices_price', array( $module_object, 'change_price' ), $priority, 2 );
|
63 |
add_filter( 'woocommerce_variation_prices_regular_price', array( $module_object, 'change_price' ), $priority, 2 );
|
64 |
add_filter( 'woocommerce_variation_prices_sale_price', array( $module_object, 'change_price' ), $priority, 2 );
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Price and Currency
|
4 |
*
|
5 |
+
* @version 5.5.8
|
6 |
* @since 2.7.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
49 |
/**
|
50 |
* wcj_add_change_price_hooks.
|
51 |
*
|
52 |
+
* @version 5.5.8
|
53 |
* @since 2.7.0
|
54 |
* @todo use `$module_object->price_hooks_priority` instead of passing `$priority` argument
|
55 |
*/
|
59 |
add_filter( WCJ_PRODUCT_GET_SALE_PRICE_FILTER, array( $module_object, 'change_price' ), $priority, 2 );
|
60 |
add_filter( WCJ_PRODUCT_GET_REGULAR_PRICE_FILTER, array( $module_object, 'change_price' ), $priority, 2 );
|
61 |
// Variations
|
62 |
+
if ( 'yes' === wcj_get_option( 'wcj_price_by_country_Webtofee_subscription_price_group' , 'no') ) {
|
63 |
+
add_filter( 'hf_subscription_product_price', array( $module_object, 'change_price' ), $priority, 2 );
|
64 |
+
}
|
65 |
add_filter( 'woocommerce_variation_prices_price', array( $module_object, 'change_price' ), $priority, 2 );
|
66 |
add_filter( 'woocommerce_variation_prices_regular_price', array( $module_object, 'change_price' ), $priority, 2 );
|
67 |
add_filter( 'woocommerce_variation_prices_sale_price', array( $module_object, 'change_price' ), $priority, 2 );
|
includes/functions/wcj-functions-products.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Products
|
4 |
*
|
5 |
-
* @version 5.
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -72,6 +72,27 @@ if ( ! function_exists( 'wcj_is_enabled_for_product' ) ) {
|
|
72 |
}
|
73 |
}
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
if ( ! function_exists( 'wcj_get_product_id' ) ) {
|
76 |
/**
|
77 |
* wcj_get_product_id.
|
@@ -426,32 +447,39 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
|
|
426 |
/**
|
427 |
* wcj_is_product_wholesale_enabled.
|
428 |
*
|
429 |
-
* @version 5.
|
430 |
*/
|
431 |
function wcj_is_product_wholesale_enabled( $product_id ) {
|
432 |
if ( wcj_is_module_enabled( 'wholesale_price' ) ) {
|
433 |
if ( wcj_is_product_wholesale_enabled_per_product( $product_id ) ) {
|
434 |
return true;
|
435 |
} else {
|
436 |
-
|
437 |
|
438 |
$product_cats_to_include = wcj_get_option( 'wcj_wholesale_price_product_cats_to_include', array() );
|
439 |
-
if ( ! empty( $product_cats_to_include ) &&
|
440 |
-
$is_product_eligible =
|
441 |
}
|
442 |
|
443 |
if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
|
444 |
$product_cats_to_exclude = wcj_get_option( 'wcj_wholesale_price_product_cats_to_exclude', array() );
|
445 |
if ( ! empty( $product_cats_to_exclude ) && wcj_is_product_term( $product_id, $product_cats_to_exclude, 'product_cat' ) ) {
|
446 |
-
$
|
|
|
|
|
|
|
447 |
}
|
448 |
}
|
449 |
-
|
|
|
450 |
$products_to_include = wcj_get_option( 'wcj_wholesale_price_products_to_include', array() );
|
451 |
-
|
|
|
|
|
452 |
$is_product_eligible = true;
|
453 |
}
|
454 |
|
|
|
455 |
if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
|
456 |
$products_to_exclude = wcj_get_option( 'wcj_wholesale_price_products_to_exclude', array() );
|
457 |
if ( ! empty( $products_to_exclude ) && in_array( $product_id, $products_to_exclude ) ) {
|
@@ -459,7 +487,7 @@ if ( ! function_exists( 'wcj_is_product_wholesale_enabled' ) ) {
|
|
459 |
}
|
460 |
}
|
461 |
|
462 |
-
return $is_product_eligible;
|
463 |
}
|
464 |
}
|
465 |
return false;
|
2 |
/**
|
3 |
* Booster for WooCommerce - Functions - Products
|
4 |
*
|
5 |
+
* @version 5.5.8
|
6 |
* @since 2.9.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
72 |
}
|
73 |
}
|
74 |
|
75 |
+
if ( ! function_exists( 'wcj_get_productId_or_variationId' ) ) {
|
76 |
+
/**
|
77 |
+
* wcj_get_productId_or_variationId.
|
78 |
+
*
|
79 |
+
* @version 5.5.8
|
80 |
+
* @since 1.0.0
|
81 |
+
*/
|
82 |
+
function wcj_get_productId_or_variationId( $_product ) {
|
83 |
+
if ( ! $_product || ! is_object( $_product ) ) {
|
84 |
+
return 0;
|
85 |
+
}
|
86 |
+
if ( WCJ_IS_WC_VERSION_BELOW_3 ) {
|
87 |
+
return $_product->id;
|
88 |
+
|
89 |
+
} else {
|
90 |
+
|
91 |
+
return $_product->get_id();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
if ( ! function_exists( 'wcj_get_product_id' ) ) {
|
97 |
/**
|
98 |
* wcj_get_product_id.
|
447 |
/**
|
448 |
* wcj_is_product_wholesale_enabled.
|
449 |
*
|
450 |
+
* @version 5.5.8
|
451 |
*/
|
452 |
function wcj_is_product_wholesale_enabled( $product_id ) {
|
453 |
if ( wcj_is_module_enabled( 'wholesale_price' ) ) {
|
454 |
if ( wcj_is_product_wholesale_enabled_per_product( $product_id ) ) {
|
455 |
return true;
|
456 |
} else {
|
457 |
+
|
458 |
|
459 |
$product_cats_to_include = wcj_get_option( 'wcj_wholesale_price_product_cats_to_include', array() );
|
460 |
+
if ( ! empty( $product_cats_to_include ) && wcj_is_product_term( $product_id, $product_cats_to_include, 'product_cat' ) ) {
|
461 |
+
$is_product_eligible = true;
|
462 |
}
|
463 |
|
464 |
if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
|
465 |
$product_cats_to_exclude = wcj_get_option( 'wcj_wholesale_price_product_cats_to_exclude', array() );
|
466 |
if ( ! empty( $product_cats_to_exclude ) && wcj_is_product_term( $product_id, $product_cats_to_exclude, 'product_cat' ) ) {
|
467 |
+
if ( ! empty( $product_cats_to_exclude ) && in_array( $product_id, $product_cats_to_exclude ) ) {
|
468 |
+
$is_product_eligible_new = false;
|
469 |
+
}
|
470 |
+
return $is_product_eligible_new ?? false;
|
471 |
}
|
472 |
}
|
473 |
+
|
474 |
+
|
475 |
$products_to_include = wcj_get_option( 'wcj_wholesale_price_products_to_include', array() );
|
476 |
+
if ( ! empty( $products_to_include ) && in_array( $product_id, $products_to_include ) ) {
|
477 |
+
$is_product_eligible = true;
|
478 |
+
}elseif( empty( $products_to_include ) && empty( $product_cats_to_include ) ){
|
479 |
$is_product_eligible = true;
|
480 |
}
|
481 |
|
482 |
+
|
483 |
if ( 'no' === wcj_get_option( 'wcj_wholesale_price_per_product_enable', 'yes' ) ) {
|
484 |
$products_to_exclude = wcj_get_option( 'wcj_wholesale_price_products_to_exclude', array() );
|
485 |
if ( ! empty( $products_to_exclude ) && in_array( $product_id, $products_to_exclude ) ) {
|
487 |
}
|
488 |
}
|
489 |
|
490 |
+
return $is_product_eligible ?? false;
|
491 |
}
|
492 |
}
|
493 |
return false;
|
includes/settings/wcj-settings-payment-gateways-fees.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
* Booster for WooCommerce - Settings - Gateways Fees and Discounts
|
5 |
*
|
6 |
-
* @version 5.5.
|
7 |
-
* @since
|
8 |
* @author Pluggabl LLC.
|
9 |
*/
|
10 |
|
@@ -26,15 +26,15 @@ $settings = array(
|
|
26 |
'default' => 'no',
|
27 |
'id' => "wcj_gateways_fees_force_default_payment_gateway",
|
28 |
),
|
|
|
29 |
array(
|
30 |
'title' => __('Enable klarna Payment Gateway Charge/Discount', 'woocommerce-jetpack'),
|
31 |
'desc' => __('Enable', 'woocommerce-jetpack'),
|
32 |
-
'desc_tip' => sprintf(__('If you enable this mode so add Klarna payment gateway charge/discount into your cart total') . '<br />' . __('If you
|
33 |
'type' => 'checkbox',
|
34 |
'default' => 'no',
|
35 |
'id' => "wcj_enable_payment_gateway_charge_discount",
|
36 |
),
|
37 |
-
|
38 |
array(
|
39 |
'type' => 'sectionend',
|
40 |
'id' => "wcj_gateways_fees",
|
@@ -54,7 +54,7 @@ foreach ($available_gateways as $key => $gateway) {
|
|
54 |
'id' => "wcj_gateways_fees_text[{$key}]",
|
55 |
'default' => '',
|
56 |
'type' => 'text',
|
57 |
-
|
58 |
),
|
59 |
array(
|
60 |
'title' => __('Fee (or Discount) Type', 'woocommerce-jetpack'),
|
@@ -75,6 +75,14 @@ foreach ($available_gateways as $key => $gateway) {
|
|
75 |
'type' => 'number',
|
76 |
'custom_attributes' => array('step' => '0.01'),
|
77 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
array(
|
79 |
'title' => __('Minimum Cart Amount', 'woocommerce-jetpack'),
|
80 |
'desc_tip' => __('Minimum cart amount for adding the fee (or discount).', 'woocommerce-jetpack') . ' ' . __('Set 0 to disable.', 'woocommerce-jetpack'),
|
@@ -162,10 +170,31 @@ foreach ($available_gateways as $key => $gateway) {
|
|
162 |
'desc' => apply_filters('booster_message', '', 'desc'),
|
163 |
'custom_attributes' => apply_filters('booster_message', '', 'disabled'),
|
164 |
),
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
'type' => 'sectionend',
|
167 |
'id' => "wcj_gateways_fees_options[{$key}]",
|
168 |
-
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
return $settings;
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Booster Elite for WooCommerce - Settings - Gateways Fees and Discounts
|
5 |
*
|
6 |
+
* @version 5.5.8
|
7 |
+
* @since 1.0.0
|
8 |
* @author Pluggabl LLC.
|
9 |
*/
|
10 |
|
26 |
'default' => 'no',
|
27 |
'id' => "wcj_gateways_fees_force_default_payment_gateway",
|
28 |
),
|
29 |
+
|
30 |
array(
|
31 |
'title' => __('Enable klarna Payment Gateway Charge/Discount', 'woocommerce-jetpack'),
|
32 |
'desc' => __('Enable', 'woocommerce-jetpack'),
|
33 |
+
'desc_tip' => sprintf(__('If you enable this mode so add Klarna payment gateway charge/discount into your cart total') . '<br />' . __('If you donot have the Klarna plugin installed first<a href="https://wordpress.org/plugins/klarna-payments-for-woocommerce/">Payments</a>', 'woocommerce-jetpack')),
|
34 |
'type' => 'checkbox',
|
35 |
'default' => 'no',
|
36 |
'id' => "wcj_enable_payment_gateway_charge_discount",
|
37 |
),
|
|
|
38 |
array(
|
39 |
'type' => 'sectionend',
|
40 |
'id' => "wcj_gateways_fees",
|
54 |
'id' => "wcj_gateways_fees_text[{$key}]",
|
55 |
'default' => '',
|
56 |
'type' => 'text',
|
57 |
+
|
58 |
),
|
59 |
array(
|
60 |
'title' => __('Fee (or Discount) Type', 'woocommerce-jetpack'),
|
75 |
'type' => 'number',
|
76 |
'custom_attributes' => array('step' => '0.01'),
|
77 |
),
|
78 |
+
array(
|
79 |
+
'title' => __('Different Fee/Discount for User Roles', 'woocommerce-jetpack'),
|
80 |
+
'desc' => __('Enable', 'woocommerce-jetpack'),
|
81 |
+
'desc_tip' => __('If you enable this, it will apply different Fees/Discount based on user role.', 'woocommerce-jetpack'),
|
82 |
+
'type' => 'checkbox',
|
83 |
+
'default' => 'no',
|
84 |
+
'id' => "wcj_enable_payment_gateway_charge_discount_userwise[{$key}]",
|
85 |
+
),
|
86 |
array(
|
87 |
'title' => __('Minimum Cart Amount', 'woocommerce-jetpack'),
|
88 |
'desc_tip' => __('Minimum cart amount for adding the fee (or discount).', 'woocommerce-jetpack') . ' ' . __('Set 0 to disable.', 'woocommerce-jetpack'),
|
170 |
'desc' => apply_filters('booster_message', '', 'desc'),
|
171 |
'custom_attributes' => apply_filters('booster_message', '', 'disabled'),
|
172 |
),
|
173 |
+
|
174 |
+
));
|
175 |
+
foreach ( wcj_get_user_roles() as $role_key => $role_data ) {
|
176 |
+
$settings = array_merge( $settings, array(
|
177 |
+
array(
|
178 |
+
'title' => __($role_data['name'], 'woocommerce-jetpack'),
|
179 |
+
'desc_tip' => __('The value. For discount enter a negative number.', 'woocommerce-jetpack'),
|
180 |
+
'id' => "wcj_gateways_fees_{$role_key}[{$key}]",
|
181 |
+
'default' => 0,
|
182 |
+
'type' => 'number',
|
183 |
+
'custom_attributes' => array('step' => '0.01'),
|
184 |
+
),
|
185 |
+
));
|
186 |
+
}
|
187 |
+
foreach ( wcj_get_user_roles() as $role_key => $role_data ) {
|
188 |
+
$settings = array_merge( $settings, array(
|
189 |
+
array(
|
190 |
'type' => 'sectionend',
|
191 |
'id' => "wcj_gateways_fees_options[{$key}]",
|
192 |
+
),
|
193 |
+
));
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
}
|
200 |
return $settings;
|
includes/settings/wcj-settings-price-by-country.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Prices and Currencies by Country
|
4 |
*
|
5 |
-
* @version 5.5.
|
6 |
* @since 2.8.1
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -168,6 +168,13 @@ $settings = array(
|
|
168 |
'type' => 'title',
|
169 |
'id' => 'wcj_price_by_country_compatibility',
|
170 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
array(
|
172 |
'title' => __('Active B2B Plugin Price Section', 'woocommerce-jetpack'),
|
173 |
'desc' => __( 'Active B2B Plugin Price Section', 'woocommerce-jetpack' ),
|
@@ -175,8 +182,6 @@ $settings = array(
|
|
175 |
'default' => 'no',
|
176 |
'type' => 'checkbox',
|
177 |
),
|
178 |
-
|
179 |
-
|
180 |
array(
|
181 |
'title' => __('Disable Quick Edit Product For Admin Scope', 'woocommerce-jetpack'),
|
182 |
'desc' => __('Disable For Admin Quick Edit Scope.', 'woocommerce-jetpack'),
|
2 |
/**
|
3 |
* Booster for WooCommerce - Settings - Prices and Currencies by Country
|
4 |
*
|
5 |
+
* @version 5.5.8
|
6 |
* @since 2.8.1
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
168 |
'type' => 'title',
|
169 |
'id' => 'wcj_price_by_country_compatibility',
|
170 |
),
|
171 |
+
array(
|
172 |
+
'title' => __('Active Webtofee subscription Section', 'woocommerce-jetpack'),
|
173 |
+
'desc' => __( 'Compatibility with Webtofee subscription PLugin', 'woocommerce-jetpack' ),
|
174 |
+
'id' => 'wcj_price_by_country_Webtofee_subscription_price_group',
|
175 |
+
'default' => 'no',
|
176 |
+
'type' => 'checkbox',
|
177 |
+
),
|
178 |
array(
|
179 |
'title' => __('Active B2B Plugin Price Section', 'woocommerce-jetpack'),
|
180 |
'desc' => __( 'Active B2B Plugin Price Section', 'woocommerce-jetpack' ),
|
182 |
'default' => 'no',
|
183 |
'type' => 'checkbox',
|
184 |
),
|
|
|
|
|
185 |
array(
|
186 |
'title' => __('Disable Quick Edit Product For Admin Scope', 'woocommerce-jetpack'),
|
187 |
'desc' => __('Disable For Admin Quick Edit Scope.', 'woocommerce-jetpack'),
|
includes/settings/wcj-settings-product-by-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Booster for WooCommerce Settings - Product by User
|
4 |
*
|
5 |
-
* @version
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
@@ -172,6 +172,16 @@ for ( $i = 1; $i <= apply_filters( 'booster_option', 1, wcj_get_option( 'wcj_pro
|
|
172 |
)
|
173 |
);
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
$settings = array_merge( $settings, array(
|
176 |
array(
|
177 |
'type' => 'sectionend',
|
2 |
/**
|
3 |
* Booster for WooCommerce Settings - Product by User
|
4 |
*
|
5 |
+
* @version 5.5.8
|
6 |
* @since 2.8.0
|
7 |
* @author Pluggabl LLC.
|
8 |
*/
|
172 |
)
|
173 |
);
|
174 |
}
|
175 |
+
$settings = array_merge( $settings, array(
|
176 |
+
array(
|
177 |
+
'title' => __( 'Send Email to Product User', 'woocommerce-jetpack' ),
|
178 |
+
'desc' => __( 'Check to send email to product user when customer place order successfully', 'woocommerce-jetpack' ),
|
179 |
+
'id' => 'wcj_user_product_email_send',
|
180 |
+
'default' => 'no',
|
181 |
+
'type' => 'checkbox',
|
182 |
+
),
|
183 |
+
)
|
184 |
+
);
|
185 |
$settings = array_merge( $settings, array(
|
186 |
array(
|
187 |
'type' => 'sectionend',
|
langs/woocommerce-jetpack.pot
CHANGED
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
-
"X-Generator: Poedit
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
@@ -44,7 +44,7 @@ msgstr ""
|
|
44 |
#: includes/class-wcj-track-users.php:164 includes/class-wcj-track-users.php:252
|
45 |
#: includes/classes/class-wcj-module.php:582
|
46 |
#: includes/classes/class-wcj-module.php:782
|
47 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
48 |
msgid "Booster"
|
49 |
msgstr ""
|
50 |
|
@@ -114,7 +114,7 @@ msgstr ""
|
|
114 |
#: includes/admin/class-wc-settings-jetpack.php:386
|
115 |
#: includes/class-wcj-admin-bar.php:384
|
116 |
#: includes/settings/wcj-settings-emails-verification.php:146
|
117 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
118 |
msgid "WooCommerce"
|
119 |
msgstr ""
|
120 |
|
@@ -443,7 +443,7 @@ msgid "BOOSTER WEBSITE"
|
|
443 |
msgstr ""
|
444 |
|
445 |
#: includes/admin/class-wc-settings-jetpack.php:947
|
446 |
-
#: includes/class-wcj-general.php:218 includes/class-wcj-product-by-user.php:
|
447 |
#: includes/settings/wcj-settings-pdf-invoicing-advanced.php:157
|
448 |
#: includes/tools/class-wcj-order-statuses-tool.php:145
|
449 |
#: includes/tools/class-wcj-order-statuses-tool.php:221
|
@@ -649,7 +649,7 @@ msgid "Tool"
|
|
649 |
msgstr ""
|
650 |
|
651 |
#: includes/admin/class-wcj-tools.php:94
|
652 |
-
#: includes/class-wcj-product-by-user.php:
|
653 |
#: includes/export/class-wcj-fields-helper.php:294
|
654 |
msgid "Status"
|
655 |
msgstr ""
|
@@ -688,8 +688,8 @@ msgstr ""
|
|
688 |
#: includes/admin/wcj-modules-cats.php:58 includes/class-wcj-admin-bar.php:466
|
689 |
#: includes/class-wcj-admin-bar.php:470 includes/class-wcj-admin-bar.php:516
|
690 |
#: includes/class-wcj-product-bulk-meta-editor.php:266
|
691 |
-
#: includes/class-wcj-product-by-user.php:
|
692 |
-
#: includes/class-wcj-product-by-user.php:
|
693 |
#: includes/class-wcj-shipping-by-products.php:33
|
694 |
#: includes/settings/wcj-settings-reports.php:178
|
695 |
#: includes/settings/wcj-settings-shipping-options.php:69
|
@@ -2551,7 +2551,7 @@ msgstr ""
|
|
2551 |
#: includes/class-wcj-general.php:225
|
2552 |
#: includes/class-wcj-payment-gateways.php:118
|
2553 |
#: includes/class-wcj-product-bulk-meta-editor.php:370
|
2554 |
-
#: includes/class-wcj-product-by-user.php:
|
2555 |
#: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:140
|
2556 |
#: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:315
|
2557 |
#: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:364
|
@@ -2838,7 +2838,7 @@ msgstr ""
|
|
2838 |
|
2839 |
#: includes/class-wcj-my-account.php:496
|
2840 |
#: includes/class-wcj-product-bulk-meta-editor.php:282
|
2841 |
-
#: includes/class-wcj-product-by-user.php:
|
2842 |
#: includes/class-wcj-purchase-data.php:105
|
2843 |
#: includes/class-wcj-track-users.php:335
|
2844 |
#: includes/classes/class-wcj-module.php:891
|
@@ -3744,9 +3744,10 @@ msgstr ""
|
|
3744 |
#: includes/settings/wcj-settings-payment-gateways-by-user-role.php:23
|
3745 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:95
|
3746 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:22
|
3747 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
3748 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
3749 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
|
|
3750 |
#: includes/settings/wcj-settings-payment-gateways-per-category.php:25
|
3751 |
#: includes/settings/wcj-settings-pdf-invoicing-advanced.php:56
|
3752 |
#: includes/settings/wcj-settings-pdf-invoicing-advanced.php:106
|
@@ -3764,13 +3765,13 @@ msgstr ""
|
|
3764 |
#: includes/settings/wcj-settings-price-by-country.php:98
|
3765 |
#: includes/settings/wcj-settings-price-by-country.php:114
|
3766 |
#: includes/settings/wcj-settings-price-by-country.php:141
|
3767 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3768 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3769 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3770 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3771 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3772 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3773 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
3774 |
#: includes/settings/wcj-settings-price-by-user-role.php:19
|
3775 |
#: includes/settings/wcj-settings-price-by-user-role.php:46
|
3776 |
#: includes/settings/wcj-settings-price-by-user-role.php:93
|
@@ -4516,13 +4517,13 @@ msgid ""
|
|
4516 |
"form to frontend."
|
4517 |
msgstr ""
|
4518 |
|
4519 |
-
#: includes/class-wcj-product-by-user.php:
|
4520 |
-
#: includes/class-wcj-product-by-user.php:
|
4521 |
#: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:310
|
4522 |
msgid "Wrong user ID!"
|
4523 |
msgstr ""
|
4524 |
|
4525 |
-
#: includes/class-wcj-product-by-user.php:
|
4526 |
#: includes/class-wcj-product-tabs.php:622
|
4527 |
#: includes/gateways/class-wc-gateway-wcj-custom.php:53
|
4528 |
#: includes/input-fields/wcj-product-input-fields-options.php:51
|
@@ -4555,7 +4556,7 @@ msgstr ""
|
|
4555 |
msgid "Title"
|
4556 |
msgstr ""
|
4557 |
|
4558 |
-
#: includes/class-wcj-product-by-user.php:
|
4559 |
#: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:422
|
4560 |
#: includes/tools/class-wcj-order-statuses-tool.php:164
|
4561 |
#: includes/tools/class-wcj-order-statuses-tool.php:236
|
@@ -5122,6 +5123,7 @@ msgstr ""
|
|
5122 |
|
5123 |
#: includes/class-wcj-products-xml.php:96
|
5124 |
#: includes/exchange-rates/class-wcj-exchange-rates-crons.php:210
|
|
|
5125 |
msgid "Once Weekly"
|
5126 |
msgstr ""
|
5127 |
|
@@ -8316,6 +8318,7 @@ msgstr ""
|
|
8316 |
#: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:88
|
8317 |
#: includes/settings/wcj-settings-checkout-custom-fields.php:138
|
8318 |
#: includes/settings/wcj-settings-product-addons.php:85
|
|
|
8319 |
msgid "Checkbox"
|
8320 |
msgstr ""
|
8321 |
|
@@ -8341,6 +8344,7 @@ msgstr ""
|
|
8341 |
|
8342 |
#: includes/input-fields/wcj-product-input-fields-options.php:40
|
8343 |
#: includes/settings/wcj-settings-checkout-custom-fields.php:142
|
|
|
8344 |
msgid "Select"
|
8345 |
msgstr ""
|
8346 |
|
@@ -8719,7 +8723,7 @@ msgstr ""
|
|
8719 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:63
|
8720 |
#: includes/settings/wcj-settings-multicurrency.php:252
|
8721 |
#: includes/settings/wcj-settings-order-min-amount.php:77
|
8722 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
8723 |
#: includes/settings/wcj-settings-price-by-user-role.php:106
|
8724 |
#: includes/settings/wcj-settings-product-addons.php:230
|
8725 |
msgid "Advanced"
|
@@ -8867,18 +8871,18 @@ msgstr ""
|
|
8867 |
|
8868 |
#: includes/price-by-country/class-wcj-price-by-country-local.php:111
|
8869 |
#: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:67
|
8870 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
8871 |
msgid "Make empty price"
|
8872 |
msgstr ""
|
8873 |
|
8874 |
#: includes/price-by-country/class-wcj-price-by-country-local.php:215
|
8875 |
#: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:17
|
8876 |
#: includes/settings/wcj-settings-add-to-cart.php:50
|
8877 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
8878 |
-
#: includes/settings/wcj-settings-price-by-country.php:328
|
8879 |
#: includes/settings/wcj-settings-price-by-country.php:333
|
8880 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
8881 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
|
|
8882 |
msgid "Group"
|
8883 |
msgstr ""
|
8884 |
|
@@ -9333,7 +9337,7 @@ msgstr ""
|
|
9333 |
#: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:25
|
9334 |
#: includes/settings/wcj-settings-currency-exchange-rates.php:62
|
9335 |
#: includes/settings/wcj-settings-offer-price.php:168
|
9336 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
9337 |
#: includes/settings/wcj-settings-product-by-user.php:70
|
9338 |
msgid "Number of decimals"
|
9339 |
msgstr ""
|
@@ -10999,7 +11003,7 @@ msgstr ""
|
|
10999 |
|
11000 |
#: includes/settings/wcj-settings-checkout-custom-fields.php:390
|
11001 |
#: includes/settings/wcj-settings-global-discount.php:163
|
11002 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
11003 |
#: includes/settings/wcj-settings-product-addons.php:149
|
11004 |
#: includes/settings/wcj-settings-related-products.php:244
|
11005 |
msgid "Exclude Products"
|
@@ -11364,7 +11368,7 @@ msgid "Total Fees"
|
|
11364 |
msgstr ""
|
11365 |
|
11366 |
#: includes/settings/wcj-settings-checkout-fees.php:53
|
11367 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
11368 |
msgid "Taxable"
|
11369 |
msgstr ""
|
11370 |
|
@@ -12006,7 +12010,7 @@ msgstr ""
|
|
12006 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:22
|
12007 |
#: includes/settings/wcj-settings-multicurrency.php:22
|
12008 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:68
|
12009 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12010 |
msgid "Exchange Rates Updates"
|
12011 |
msgstr ""
|
12012 |
|
@@ -12120,7 +12124,7 @@ msgid "Custom Currency"
|
|
12120 |
msgstr ""
|
12121 |
|
12122 |
#: includes/settings/wcj-settings-currency-exchange-rates.php:183
|
12123 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12124 |
msgid "Exchange Rates"
|
12125 |
msgstr ""
|
12126 |
|
@@ -12140,7 +12144,7 @@ msgstr ""
|
|
12140 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:142
|
12141 |
#: includes/settings/wcj-settings-multicurrency.php:324
|
12142 |
#: includes/settings/wcj-settings-multicurrency.php:362
|
12143 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12144 |
#: includes/settings/wcj-settings-price-formats.php:59
|
12145 |
msgid "Currency"
|
12146 |
msgstr ""
|
@@ -12213,7 +12217,7 @@ msgstr ""
|
|
12213 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:27
|
12214 |
#: includes/settings/wcj-settings-multicurrency.php:28
|
12215 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:73
|
12216 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12217 |
msgid "Enter Rates Manually"
|
12218 |
msgstr ""
|
12219 |
|
@@ -12221,7 +12225,7 @@ msgstr ""
|
|
12221 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:28
|
12222 |
#: includes/settings/wcj-settings-multicurrency.php:29
|
12223 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:74
|
12224 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12225 |
msgid "Automatically via Currency Exchange Rates module"
|
12226 |
msgstr ""
|
12227 |
|
@@ -12229,7 +12233,7 @@ msgstr ""
|
|
12229 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:31
|
12230 |
#: includes/settings/wcj-settings-multicurrency.php:32
|
12231 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:77
|
12232 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12233 |
msgid "Visit"
|
12234 |
msgstr ""
|
12235 |
|
@@ -12237,7 +12241,7 @@ msgstr ""
|
|
12237 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:31
|
12238 |
#: includes/settings/wcj-settings-multicurrency.php:32
|
12239 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:79
|
12240 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
12241 |
msgid "Currency Exchange Rates module"
|
12242 |
msgstr ""
|
12243 |
|
@@ -13346,7 +13350,7 @@ msgstr ""
|
|
13346 |
#: includes/settings/wcj-settings-global-discount.php:201
|
13347 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:76
|
13348 |
#: includes/settings/wcj-settings-multicurrency.php:266
|
13349 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13350 |
#: includes/settings/wcj-settings-price-by-user-role.php:111
|
13351 |
#: includes/settings/wcj-settings-product-addons.php:258
|
13352 |
#: includes/settings/wcj-settings-product-price-by-formula.php:127
|
@@ -13356,7 +13360,7 @@ msgstr ""
|
|
13356 |
#: includes/settings/wcj-settings-global-discount.php:202
|
13357 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:77
|
13358 |
#: includes/settings/wcj-settings-multicurrency.php:267
|
13359 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13360 |
#: includes/settings/wcj-settings-price-by-user-role.php:112
|
13361 |
#: includes/settings/wcj-settings-product-addons.php:259
|
13362 |
#: includes/settings/wcj-settings-product-price-by-formula.php:128
|
@@ -13583,7 +13587,7 @@ msgstr ""
|
|
13583 |
|
13584 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:68
|
13585 |
#: includes/settings/wcj-settings-multicurrency.php:281
|
13586 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13587 |
#: includes/settings/wcj-settings-product-price-by-formula.php:134
|
13588 |
msgid "Save Calculated Products Prices"
|
13589 |
msgstr ""
|
@@ -13688,7 +13692,7 @@ msgid ""
|
|
13688 |
msgstr ""
|
13689 |
|
13690 |
#: includes/settings/wcj-settings-multicurrency.php:73
|
13691 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
13692 |
#: includes/settings/wcj-settings-product-price-by-formula.php:64
|
13693 |
msgid "Rounding"
|
13694 |
msgstr ""
|
@@ -13743,12 +13747,12 @@ msgid ""
|
|
13743 |
msgstr ""
|
13744 |
|
13745 |
#: includes/settings/wcj-settings-multicurrency.php:121
|
13746 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13747 |
msgid "Free Shipping"
|
13748 |
msgstr ""
|
13749 |
|
13750 |
#: includes/settings/wcj-settings-multicurrency.php:124
|
13751 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13752 |
msgid "Converts minimum amount from WooCommerce Free Shipping native method."
|
13753 |
msgstr ""
|
13754 |
|
@@ -13757,7 +13761,7 @@ msgid "WooCommerce Fixed Coupons"
|
|
13757 |
msgstr ""
|
13758 |
|
13759 |
#: includes/settings/wcj-settings-multicurrency.php:140
|
13760 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13761 |
msgid ""
|
13762 |
"When a fixed coupon is used its value changes according to the current "
|
13763 |
"currency."
|
@@ -13897,7 +13901,7 @@ msgid ""
|
|
13897 |
msgstr ""
|
13898 |
|
13899 |
#: includes/settings/wcj-settings-multicurrency.php:282
|
13900 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
13901 |
#: includes/settings/wcj-settings-product-price-by-formula.php:135
|
13902 |
msgid ""
|
13903 |
"This may help if you are experiencing compatibility issues with other plugins."
|
@@ -14073,8 +14077,8 @@ msgid ""
|
|
14073 |
msgstr ""
|
14074 |
|
14075 |
#: includes/settings/wcj-settings-my-account.php:202
|
14076 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
14077 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
14078 |
#: includes/settings/wcj-settings-stock.php:42
|
14079 |
#: includes/settings/wcj-settings-stock.php:55
|
14080 |
msgid "Ignored if empty."
|
@@ -14280,7 +14284,7 @@ msgstr ""
|
|
14280 |
#: includes/settings/wcj-settings-order-min-amount.php:29
|
14281 |
#: includes/settings/wcj-settings-order-min-amount.php:36
|
14282 |
#: includes/settings/wcj-settings-order-min-amount.php:43
|
14283 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
14284 |
msgid "Exclude"
|
14285 |
msgstr ""
|
14286 |
|
@@ -15283,19 +15287,19 @@ msgid ""
|
|
15283 |
"page"
|
15284 |
msgstr ""
|
15285 |
|
15286 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15287 |
msgid "Enable klarna Payment Gateway Charge/Discount"
|
15288 |
msgstr ""
|
15289 |
|
15290 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15291 |
msgid ""
|
15292 |
"If you enable this mode so add Klarna payment gateway charge/discount into "
|
15293 |
"your cart total"
|
15294 |
msgstr ""
|
15295 |
|
15296 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15297 |
msgid ""
|
15298 |
-
"If you
|
15299 |
"wordpress.org/plugins/klarna-payments-for-woocommerce/\">Payments</a>"
|
15300 |
msgstr ""
|
15301 |
|
@@ -15320,79 +15324,89 @@ msgid "Fee (or Discount) Value"
|
|
15320 |
msgstr ""
|
15321 |
|
15322 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:72
|
|
|
15323 |
msgid "The value. For discount enter a negative number."
|
15324 |
msgstr ""
|
15325 |
|
15326 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:79
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15327 |
msgid "Minimum Cart Amount"
|
15328 |
msgstr ""
|
15329 |
|
15330 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15331 |
msgid "Minimum cart amount for adding the fee (or discount)."
|
15332 |
msgstr ""
|
15333 |
|
15334 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:80
|
15335 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:88
|
|
|
15336 |
msgid "Set 0 to disable."
|
15337 |
msgstr ""
|
15338 |
|
15339 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15340 |
msgid "Maximum Cart Amount"
|
15341 |
msgstr ""
|
15342 |
|
15343 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15344 |
msgid "Maximum cart amount for adding the fee (or discount)."
|
15345 |
msgstr ""
|
15346 |
|
15347 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15348 |
msgid "Round the fee (or discount) value before adding to the cart."
|
15349 |
msgstr ""
|
15350 |
|
15351 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15352 |
msgid "If rounding is enabled, set precision (i.e. number of decimals) here."
|
15353 |
msgstr ""
|
15354 |
|
15355 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15356 |
msgid "Tax class"
|
15357 |
msgstr ""
|
15358 |
|
15359 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15360 |
msgid "If taxing is enabled, set tax class here."
|
15361 |
msgstr ""
|
15362 |
|
15363 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15364 |
msgid "Standard Rate"
|
15365 |
msgstr ""
|
15366 |
|
15367 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15368 |
msgid "Exclude Shipping when Calculating Total Cart Amount"
|
15369 |
msgstr ""
|
15370 |
|
15371 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:128
|
15372 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:136
|
|
|
15373 |
msgid ""
|
15374 |
"This affects \"Percent\" type fees and \"Minimum/Maximum Cart Amount\" "
|
15375 |
"options."
|
15376 |
msgstr ""
|
15377 |
|
15378 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15379 |
msgid "Include Taxes"
|
15380 |
msgstr ""
|
15381 |
|
15382 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15383 |
msgid "Include taxes when calculating Total Cart Amount"
|
15384 |
msgstr ""
|
15385 |
|
15386 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15387 |
msgid "Require Products"
|
15388 |
msgstr ""
|
15389 |
|
15390 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15391 |
msgid ""
|
15392 |
"Require at least one of selected products to be in cart for fee to be applied."
|
15393 |
msgstr ""
|
15394 |
|
15395 |
-
#: includes/settings/wcj-settings-payment-gateways-fees.php:
|
15396 |
msgid "Do not apply fee, if at least one of selected products is in cart."
|
15397 |
msgstr ""
|
15398 |
|
@@ -15792,7 +15806,7 @@ msgid "Replace"
|
|
15792 |
msgstr ""
|
15793 |
|
15794 |
#: includes/settings/wcj-settings-pdf-invoicing-display.php:25
|
15795 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
15796 |
#: includes/settings/wcj-settings-shipping.php:30
|
15797 |
msgid "Admin Title"
|
15798 |
msgstr ""
|
@@ -16295,144 +16309,152 @@ msgid "Disable Price by Country for Bots"
|
|
16295 |
msgstr ""
|
16296 |
|
16297 |
#: includes/settings/wcj-settings-price-by-country.php:172
|
|
|
|
|
|
|
16298 |
#: includes/settings/wcj-settings-price-by-country.php:173
|
|
|
|
|
|
|
|
|
|
|
16299 |
msgid "Active B2B Plugin Price Section"
|
16300 |
msgstr ""
|
16301 |
|
16302 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16303 |
#: includes/settings/wcj-settings-product-price-by-formula.php:108
|
16304 |
msgid "Disable Quick Edit Product For Admin Scope"
|
16305 |
msgstr ""
|
16306 |
|
16307 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16308 |
#: includes/settings/wcj-settings-product-price-by-formula.php:109
|
16309 |
msgid "Disable For Admin Quick Edit Scope."
|
16310 |
msgstr ""
|
16311 |
|
16312 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16313 |
msgid "Disable module on Edit Product For Admin scope."
|
16314 |
msgstr ""
|
16315 |
|
16316 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16317 |
#: includes/settings/wcj-settings-product-price-by-formula.php:110
|
16318 |
msgid ""
|
16319 |
"For example if you use Quick Edit Product and donot want change the deafult "
|
16320 |
"price then the box ticked"
|
16321 |
msgstr ""
|
16322 |
|
16323 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16324 |
msgid "Price Filter Widget and Sorting by Price Support"
|
16325 |
msgstr ""
|
16326 |
|
16327 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16328 |
msgid "Recalculate price filter widget and sorting by price product prices."
|
16329 |
msgstr ""
|
16330 |
|
16331 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16332 |
msgid "WooCommerce Coupons"
|
16333 |
msgstr ""
|
16334 |
|
16335 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16336 |
msgid "Woo Discount Rules"
|
16337 |
msgstr ""
|
16338 |
|
16339 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16340 |
#, php-format
|
16341 |
msgid ""
|
16342 |
"Adds compatibility with <a href=\"%s\" target=\"_blank\">Woo Discount Rules</"
|
16343 |
"a> plugin."
|
16344 |
msgstr ""
|
16345 |
|
16346 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16347 |
#, php-format
|
16348 |
msgid ""
|
16349 |
"If it doesn't work properly try to enable <a href=\"%s\">redirect to the cart "
|
16350 |
"page after successful addition</a> option."
|
16351 |
msgstr ""
|
16352 |
|
16353 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16354 |
msgid "WooCommerce Points and Rewards"
|
16355 |
msgstr ""
|
16356 |
|
16357 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16358 |
#, php-format
|
16359 |
msgid ""
|
16360 |
"Adds compatibility with <a href=\"%s\" target=\"_blank\">WooCommerce Points "
|
16361 |
"and Rewards</a> plugin."
|
16362 |
msgstr ""
|
16363 |
|
16364 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16365 |
msgid "User IP Detection Method"
|
16366 |
msgstr ""
|
16367 |
|
16368 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16369 |
msgid "Price Format Method"
|
16370 |
msgstr ""
|
16371 |
|
16372 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16373 |
msgid "The moment \"Pretty Price\" and \"Rounding\" will be applied"
|
16374 |
msgstr ""
|
16375 |
|
16376 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16377 |
msgid "get_price()"
|
16378 |
msgstr ""
|
16379 |
|
16380 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16381 |
msgid "wc_get_price_to_display()"
|
16382 |
msgstr ""
|
16383 |
|
16384 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16385 |
msgid "Save Country Group ID"
|
16386 |
msgstr ""
|
16387 |
|
16388 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16389 |
msgid ""
|
16390 |
"Try to disable it if the country detection is not correct, most probably if "
|
16391 |
"\"Override Country Options\" is enabled."
|
16392 |
msgstr ""
|
16393 |
|
16394 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16395 |
msgid "Country Groups"
|
16396 |
msgstr ""
|
16397 |
|
16398 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16399 |
msgid "Countries Selection"
|
16400 |
msgstr ""
|
16401 |
|
16402 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16403 |
msgid "Choose how do you want to enter countries groups in admin."
|
16404 |
msgstr ""
|
16405 |
|
16406 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16407 |
msgid "Comma separated list"
|
16408 |
msgstr ""
|
16409 |
|
16410 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16411 |
msgid "Multiselect"
|
16412 |
msgstr ""
|
16413 |
|
16414 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16415 |
#: includes/settings/wcj-settings-product-by-condition.php:85
|
16416 |
#: includes/settings/wcj-settings-related-products.php:164
|
16417 |
msgid "Chosen select"
|
16418 |
msgstr ""
|
16419 |
|
16420 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16421 |
msgid "Autogenerate Groups"
|
16422 |
msgstr ""
|
16423 |
|
16424 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16425 |
msgid "Groups Number"
|
16426 |
msgstr ""
|
16427 |
|
16428 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16429 |
msgid ""
|
16430 |
"Countries. List of comma separated country codes.<br>For country codes and "
|
16431 |
"predefined sets visit <a href=\"https://booster.io/country-codes/\" target="
|
16432 |
"\"_blank\">https://booster.io/country-codes/</a>"
|
16433 |
msgstr ""
|
16434 |
|
16435 |
-
#: includes/settings/wcj-settings-price-by-country.php:
|
16436 |
msgid "Multiply Price by"
|
16437 |
msgstr ""
|
16438 |
|
@@ -17533,6 +17555,15 @@ msgstr ""
|
|
17533 |
msgid "Custom Taxonomy"
|
17534 |
msgstr ""
|
17535 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17536 |
#: includes/settings/wcj-settings-product-custom-info.php:44
|
17537 |
msgid "Single Product Pages"
|
17538 |
msgstr ""
|
@@ -20995,3 +21026,146 @@ msgstr ""
|
|
20995 |
#: includes/widgets/class-wcj-widget-selector.php:65
|
20996 |
msgid "Product custom visibility"
|
20997 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
+
"X-Generator: Poedit 2.0.6\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
44 |
#: includes/class-wcj-track-users.php:164 includes/class-wcj-track-users.php:252
|
45 |
#: includes/classes/class-wcj-module.php:582
|
46 |
#: includes/classes/class-wcj-module.php:782
|
47 |
+
#: includes/settings/wcj-settings-price-by-country.php:262
|
48 |
msgid "Booster"
|
49 |
msgstr ""
|
50 |
|
114 |
#: includes/admin/class-wc-settings-jetpack.php:386
|
115 |
#: includes/class-wcj-admin-bar.php:384
|
116 |
#: includes/settings/wcj-settings-emails-verification.php:146
|
117 |
+
#: includes/settings/wcj-settings-price-by-country.php:261
|
118 |
msgid "WooCommerce"
|
119 |
msgstr ""
|
120 |
|
443 |
msgstr ""
|
444 |
|
445 |
#: includes/admin/class-wc-settings-jetpack.php:947
|
446 |
+
#: includes/class-wcj-general.php:218 includes/class-wcj-product-by-user.php:269
|
447 |
#: includes/settings/wcj-settings-pdf-invoicing-advanced.php:157
|
448 |
#: includes/tools/class-wcj-order-statuses-tool.php:145
|
449 |
#: includes/tools/class-wcj-order-statuses-tool.php:221
|
649 |
msgstr ""
|
650 |
|
651 |
#: includes/admin/class-wcj-tools.php:94
|
652 |
+
#: includes/class-wcj-product-by-user.php:269
|
653 |
#: includes/export/class-wcj-fields-helper.php:294
|
654 |
msgid "Status"
|
655 |
msgstr ""
|
688 |
#: includes/admin/wcj-modules-cats.php:58 includes/class-wcj-admin-bar.php:466
|
689 |
#: includes/class-wcj-admin-bar.php:470 includes/class-wcj-admin-bar.php:516
|
690 |
#: includes/class-wcj-product-bulk-meta-editor.php:266
|
691 |
+
#: includes/class-wcj-product-by-user.php:168
|
692 |
+
#: includes/class-wcj-product-by-user.php:204
|
693 |
#: includes/class-wcj-shipping-by-products.php:33
|
694 |
#: includes/settings/wcj-settings-reports.php:178
|
695 |
#: includes/settings/wcj-settings-shipping-options.php:69
|
2551 |
#: includes/class-wcj-general.php:225
|
2552 |
#: includes/class-wcj-payment-gateways.php:118
|
2553 |
#: includes/class-wcj-product-bulk-meta-editor.php:370
|
2554 |
+
#: includes/class-wcj-product-by-user.php:278
|
2555 |
#: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:140
|
2556 |
#: includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php:315
|
2557 |
#: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:364
|
2838 |
|
2839 |
#: includes/class-wcj-my-account.php:496
|
2840 |
#: includes/class-wcj-product-bulk-meta-editor.php:282
|
2841 |
+
#: includes/class-wcj-product-by-user.php:278
|
2842 |
#: includes/class-wcj-purchase-data.php:105
|
2843 |
#: includes/class-wcj-track-users.php:335
|
2844 |
#: includes/classes/class-wcj-module.php:891
|
3744 |
#: includes/settings/wcj-settings-payment-gateways-by-user-role.php:23
|
3745 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:95
|
3746 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:22
|
3747 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:32
|
3748 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:80
|
3749 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:104
|
3750 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:120
|
3751 |
#: includes/settings/wcj-settings-payment-gateways-per-category.php:25
|
3752 |
#: includes/settings/wcj-settings-pdf-invoicing-advanced.php:56
|
3753 |
#: includes/settings/wcj-settings-pdf-invoicing-advanced.php:106
|
3765 |
#: includes/settings/wcj-settings-price-by-country.php:98
|
3766 |
#: includes/settings/wcj-settings-price-by-country.php:114
|
3767 |
#: includes/settings/wcj-settings-price-by-country.php:141
|
3768 |
+
#: includes/settings/wcj-settings-price-by-country.php:196
|
3769 |
+
#: includes/settings/wcj-settings-price-by-country.php:206
|
3770 |
+
#: includes/settings/wcj-settings-price-by-country.php:215
|
3771 |
+
#: includes/settings/wcj-settings-price-by-country.php:224
|
3772 |
+
#: includes/settings/wcj-settings-price-by-country.php:233
|
3773 |
+
#: includes/settings/wcj-settings-price-by-country.php:279
|
3774 |
+
#: includes/settings/wcj-settings-price-by-country.php:287
|
3775 |
#: includes/settings/wcj-settings-price-by-user-role.php:19
|
3776 |
#: includes/settings/wcj-settings-price-by-user-role.php:46
|
3777 |
#: includes/settings/wcj-settings-price-by-user-role.php:93
|
4517 |
"form to frontend."
|
4518 |
msgstr ""
|
4519 |
|
4520 |
+
#: includes/class-wcj-product-by-user.php:226
|
4521 |
+
#: includes/class-wcj-product-by-user.php:235
|
4522 |
#: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:310
|
4523 |
msgid "Wrong user ID!"
|
4524 |
msgstr ""
|
4525 |
|
4526 |
+
#: includes/class-wcj-product-by-user.php:269
|
4527 |
#: includes/class-wcj-product-tabs.php:622
|
4528 |
#: includes/gateways/class-wc-gateway-wcj-custom.php:53
|
4529 |
#: includes/input-fields/wcj-product-input-fields-options.php:51
|
4556 |
msgid "Title"
|
4557 |
msgstr ""
|
4558 |
|
4559 |
+
#: includes/class-wcj-product-by-user.php:277
|
4560 |
#: includes/shortcodes/class-wcj-shortcodes-products-add-form.php:422
|
4561 |
#: includes/tools/class-wcj-order-statuses-tool.php:164
|
4562 |
#: includes/tools/class-wcj-order-statuses-tool.php:236
|
5123 |
|
5124 |
#: includes/class-wcj-products-xml.php:96
|
5125 |
#: includes/exchange-rates/class-wcj-exchange-rates-crons.php:210
|
5126 |
+
#: tracking/class-plugin-usage-tracker.php:150
|
5127 |
msgid "Once Weekly"
|
5128 |
msgstr ""
|
5129 |
|
8318 |
#: includes/settings/meta-box/wcj-settings-meta-box-product-addons.php:88
|
8319 |
#: includes/settings/wcj-settings-checkout-custom-fields.php:138
|
8320 |
#: includes/settings/wcj-settings-product-addons.php:85
|
8321 |
+
#: tracking/class-example-settings.php:69
|
8322 |
msgid "Checkbox"
|
8323 |
msgstr ""
|
8324 |
|
8344 |
|
8345 |
#: includes/input-fields/wcj-product-input-fields-options.php:40
|
8346 |
#: includes/settings/wcj-settings-checkout-custom-fields.php:142
|
8347 |
+
#: tracking/class-example-settings.php:76
|
8348 |
msgid "Select"
|
8349 |
msgstr ""
|
8350 |
|
8723 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:63
|
8724 |
#: includes/settings/wcj-settings-multicurrency.php:252
|
8725 |
#: includes/settings/wcj-settings-order-min-amount.php:77
|
8726 |
+
#: includes/settings/wcj-settings-price-by-country.php:244
|
8727 |
#: includes/settings/wcj-settings-price-by-user-role.php:106
|
8728 |
#: includes/settings/wcj-settings-product-addons.php:230
|
8729 |
msgid "Advanced"
|
8871 |
|
8872 |
#: includes/price-by-country/class-wcj-price-by-country-local.php:111
|
8873 |
#: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:67
|
8874 |
+
#: includes/settings/wcj-settings-price-by-country.php:438
|
8875 |
msgid "Make empty price"
|
8876 |
msgstr ""
|
8877 |
|
8878 |
#: includes/price-by-country/class-wcj-price-by-country-local.php:215
|
8879 |
#: includes/settings/meta-box/wcj-settings-meta-box-price-by-country.php:17
|
8880 |
#: includes/settings/wcj-settings-add-to-cart.php:50
|
8881 |
+
#: includes/settings/wcj-settings-price-by-country.php:332
|
|
|
8882 |
#: includes/settings/wcj-settings-price-by-country.php:333
|
8883 |
+
#: includes/settings/wcj-settings-price-by-country.php:338
|
8884 |
+
#: includes/settings/wcj-settings-price-by-country.php:386
|
8885 |
+
#: includes/settings/wcj-settings-price-by-country.php:429
|
8886 |
msgid "Group"
|
8887 |
msgstr ""
|
8888 |
|
9337 |
#: includes/settings/meta-box/wcj-settings-meta-box-offer-price.php:25
|
9338 |
#: includes/settings/wcj-settings-currency-exchange-rates.php:62
|
9339 |
#: includes/settings/wcj-settings-offer-price.php:168
|
9340 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:111
|
9341 |
#: includes/settings/wcj-settings-product-by-user.php:70
|
9342 |
msgid "Number of decimals"
|
9343 |
msgstr ""
|
11003 |
|
11004 |
#: includes/settings/wcj-settings-checkout-custom-fields.php:390
|
11005 |
#: includes/settings/wcj-settings-global-discount.php:163
|
11006 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:162
|
11007 |
#: includes/settings/wcj-settings-product-addons.php:149
|
11008 |
#: includes/settings/wcj-settings-related-products.php:244
|
11009 |
msgid "Exclude Products"
|
11368 |
msgstr ""
|
11369 |
|
11370 |
#: includes/settings/wcj-settings-checkout-fees.php:53
|
11371 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:119
|
11372 |
msgid "Taxable"
|
11373 |
msgstr ""
|
11374 |
|
12010 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:22
|
12011 |
#: includes/settings/wcj-settings-multicurrency.php:22
|
12012 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:68
|
12013 |
+
#: includes/settings/wcj-settings-price-by-country.php:402
|
12014 |
msgid "Exchange Rates Updates"
|
12015 |
msgstr ""
|
12016 |
|
12124 |
msgstr ""
|
12125 |
|
12126 |
#: includes/settings/wcj-settings-currency-exchange-rates.php:183
|
12127 |
+
#: includes/settings/wcj-settings-price-by-country.php:397
|
12128 |
msgid "Exchange Rates"
|
12129 |
msgstr ""
|
12130 |
|
12144 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:142
|
12145 |
#: includes/settings/wcj-settings-multicurrency.php:324
|
12146 |
#: includes/settings/wcj-settings-multicurrency.php:362
|
12147 |
+
#: includes/settings/wcj-settings-price-by-country.php:377
|
12148 |
#: includes/settings/wcj-settings-price-formats.php:59
|
12149 |
msgid "Currency"
|
12150 |
msgstr ""
|
12217 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:27
|
12218 |
#: includes/settings/wcj-settings-multicurrency.php:28
|
12219 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:73
|
12220 |
+
#: includes/settings/wcj-settings-price-by-country.php:407
|
12221 |
msgid "Enter Rates Manually"
|
12222 |
msgstr ""
|
12223 |
|
12225 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:28
|
12226 |
#: includes/settings/wcj-settings-multicurrency.php:29
|
12227 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:74
|
12228 |
+
#: includes/settings/wcj-settings-price-by-country.php:408
|
12229 |
msgid "Automatically via Currency Exchange Rates module"
|
12230 |
msgstr ""
|
12231 |
|
12233 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:31
|
12234 |
#: includes/settings/wcj-settings-multicurrency.php:32
|
12235 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:77
|
12236 |
+
#: includes/settings/wcj-settings-price-by-country.php:411
|
12237 |
msgid "Visit"
|
12238 |
msgstr ""
|
12239 |
|
12241 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:31
|
12242 |
#: includes/settings/wcj-settings-multicurrency.php:32
|
12243 |
#: includes/settings/wcj-settings-payment-gateways-currency.php:79
|
12244 |
+
#: includes/settings/wcj-settings-price-by-country.php:411
|
12245 |
msgid "Currency Exchange Rates module"
|
12246 |
msgstr ""
|
12247 |
|
13350 |
#: includes/settings/wcj-settings-global-discount.php:201
|
13351 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:76
|
13352 |
#: includes/settings/wcj-settings-multicurrency.php:266
|
13353 |
+
#: includes/settings/wcj-settings-price-by-country.php:249
|
13354 |
#: includes/settings/wcj-settings-price-by-user-role.php:111
|
13355 |
#: includes/settings/wcj-settings-product-addons.php:258
|
13356 |
#: includes/settings/wcj-settings-product-price-by-formula.php:127
|
13360 |
#: includes/settings/wcj-settings-global-discount.php:202
|
13361 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:77
|
13362 |
#: includes/settings/wcj-settings-multicurrency.php:267
|
13363 |
+
#: includes/settings/wcj-settings-price-by-country.php:250
|
13364 |
#: includes/settings/wcj-settings-price-by-user-role.php:112
|
13365 |
#: includes/settings/wcj-settings-product-addons.php:259
|
13366 |
#: includes/settings/wcj-settings-product-price-by-formula.php:128
|
13587 |
|
13588 |
#: includes/settings/wcj-settings-multicurrency-base-price.php:68
|
13589 |
#: includes/settings/wcj-settings-multicurrency.php:281
|
13590 |
+
#: includes/settings/wcj-settings-price-by-country.php:277
|
13591 |
#: includes/settings/wcj-settings-product-price-by-formula.php:134
|
13592 |
msgid "Save Calculated Products Prices"
|
13593 |
msgstr ""
|
13692 |
msgstr ""
|
13693 |
|
13694 |
#: includes/settings/wcj-settings-multicurrency.php:73
|
13695 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:103
|
13696 |
#: includes/settings/wcj-settings-product-price-by-formula.php:64
|
13697 |
msgid "Rounding"
|
13698 |
msgstr ""
|
13747 |
msgstr ""
|
13748 |
|
13749 |
#: includes/settings/wcj-settings-multicurrency.php:121
|
13750 |
+
#: includes/settings/wcj-settings-price-by-country.php:205
|
13751 |
msgid "Free Shipping"
|
13752 |
msgstr ""
|
13753 |
|
13754 |
#: includes/settings/wcj-settings-multicurrency.php:124
|
13755 |
+
#: includes/settings/wcj-settings-price-by-country.php:208
|
13756 |
msgid "Converts minimum amount from WooCommerce Free Shipping native method."
|
13757 |
msgstr ""
|
13758 |
|
13761 |
msgstr ""
|
13762 |
|
13763 |
#: includes/settings/wcj-settings-multicurrency.php:140
|
13764 |
+
#: includes/settings/wcj-settings-price-by-country.php:216
|
13765 |
msgid ""
|
13766 |
"When a fixed coupon is used its value changes according to the current "
|
13767 |
"currency."
|
13901 |
msgstr ""
|
13902 |
|
13903 |
#: includes/settings/wcj-settings-multicurrency.php:282
|
13904 |
+
#: includes/settings/wcj-settings-price-by-country.php:278
|
13905 |
#: includes/settings/wcj-settings-product-price-by-formula.php:135
|
13906 |
msgid ""
|
13907 |
"This may help if you are experiencing compatibility issues with other plugins."
|
14077 |
msgstr ""
|
14078 |
|
14079 |
#: includes/settings/wcj-settings-my-account.php:202
|
14080 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:152
|
14081 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:164
|
14082 |
#: includes/settings/wcj-settings-stock.php:42
|
14083 |
#: includes/settings/wcj-settings-stock.php:55
|
14084 |
msgid "Ignored if empty."
|
14284 |
#: includes/settings/wcj-settings-order-min-amount.php:29
|
14285 |
#: includes/settings/wcj-settings-order-min-amount.php:36
|
14286 |
#: includes/settings/wcj-settings-order-min-amount.php:43
|
14287 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:135
|
14288 |
msgid "Exclude"
|
14289 |
msgstr ""
|
14290 |
|
15287 |
"page"
|
15288 |
msgstr ""
|
15289 |
|
15290 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:31
|
15291 |
msgid "Enable klarna Payment Gateway Charge/Discount"
|
15292 |
msgstr ""
|
15293 |
|
15294 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:33
|
15295 |
msgid ""
|
15296 |
"If you enable this mode so add Klarna payment gateway charge/discount into "
|
15297 |
"your cart total"
|
15298 |
msgstr ""
|
15299 |
|
15300 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:33
|
15301 |
msgid ""
|
15302 |
+
"If you donot have the Klarna plugin installed first<a href=\"https://"
|
15303 |
"wordpress.org/plugins/klarna-payments-for-woocommerce/\">Payments</a>"
|
15304 |
msgstr ""
|
15305 |
|
15324 |
msgstr ""
|
15325 |
|
15326 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:72
|
15327 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:179
|
15328 |
msgid "The value. For discount enter a negative number."
|
15329 |
msgstr ""
|
15330 |
|
15331 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:79
|
15332 |
+
msgid "Different Fee/Discount for User Roles"
|
15333 |
+
msgstr ""
|
15334 |
+
|
15335 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:81
|
15336 |
+
msgid ""
|
15337 |
+
"If you enable this, it will apply different Fees/Discount based on user role."
|
15338 |
+
msgstr ""
|
15339 |
+
|
15340 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:87
|
15341 |
msgid "Minimum Cart Amount"
|
15342 |
msgstr ""
|
15343 |
|
15344 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:88
|
15345 |
msgid "Minimum cart amount for adding the fee (or discount)."
|
15346 |
msgstr ""
|
15347 |
|
|
|
15348 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:88
|
15349 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:96
|
15350 |
msgid "Set 0 to disable."
|
15351 |
msgstr ""
|
15352 |
|
15353 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:95
|
15354 |
msgid "Maximum Cart Amount"
|
15355 |
msgstr ""
|
15356 |
|
15357 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:96
|
15358 |
msgid "Maximum cart amount for adding the fee (or discount)."
|
15359 |
msgstr ""
|
15360 |
|
15361 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:105
|
15362 |
msgid "Round the fee (or discount) value before adding to the cart."
|
15363 |
msgstr ""
|
15364 |
|
15365 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:112
|
15366 |
msgid "If rounding is enabled, set precision (i.e. number of decimals) here."
|
15367 |
msgstr ""
|
15368 |
|
15369 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:126
|
15370 |
msgid "Tax class"
|
15371 |
msgstr ""
|
15372 |
|
15373 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:127
|
15374 |
msgid "If taxing is enabled, set tax class here."
|
15375 |
msgstr ""
|
15376 |
|
15377 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:131
|
15378 |
msgid "Standard Rate"
|
15379 |
msgstr ""
|
15380 |
|
15381 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:134
|
15382 |
msgid "Exclude Shipping when Calculating Total Cart Amount"
|
15383 |
msgstr ""
|
15384 |
|
|
|
15385 |
#: includes/settings/wcj-settings-payment-gateways-fees.php:136
|
15386 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:144
|
15387 |
msgid ""
|
15388 |
"This affects \"Percent\" type fees and \"Minimum/Maximum Cart Amount\" "
|
15389 |
"options."
|
15390 |
msgstr ""
|
15391 |
|
15392 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:142
|
15393 |
msgid "Include Taxes"
|
15394 |
msgstr ""
|
15395 |
|
15396 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:143
|
15397 |
msgid "Include taxes when calculating Total Cart Amount"
|
15398 |
msgstr ""
|
15399 |
|
15400 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:150
|
15401 |
msgid "Require Products"
|
15402 |
msgstr ""
|
15403 |
|
15404 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:151
|
15405 |
msgid ""
|
15406 |
"Require at least one of selected products to be in cart for fee to be applied."
|
15407 |
msgstr ""
|
15408 |
|
15409 |
+
#: includes/settings/wcj-settings-payment-gateways-fees.php:163
|
15410 |
msgid "Do not apply fee, if at least one of selected products is in cart."
|
15411 |
msgstr ""
|
15412 |
|
15806 |
msgstr ""
|
15807 |
|
15808 |
#: includes/settings/wcj-settings-pdf-invoicing-display.php:25
|
15809 |
+
#: includes/settings/wcj-settings-price-by-country.php:384
|
15810 |
#: includes/settings/wcj-settings-shipping.php:30
|
15811 |
msgid "Admin Title"
|
15812 |
msgstr ""
|
16309 |
msgstr ""
|
16310 |
|
16311 |
#: includes/settings/wcj-settings-price-by-country.php:172
|
16312 |
+
msgid "Active Webtofee subscription Section"
|
16313 |
+
msgstr ""
|
16314 |
+
|
16315 |
#: includes/settings/wcj-settings-price-by-country.php:173
|
16316 |
+
msgid "Compatibility with Webtofee subscription PLugin"
|
16317 |
+
msgstr ""
|
16318 |
+
|
16319 |
+
#: includes/settings/wcj-settings-price-by-country.php:179
|
16320 |
+
#: includes/settings/wcj-settings-price-by-country.php:180
|
16321 |
msgid "Active B2B Plugin Price Section"
|
16322 |
msgstr ""
|
16323 |
|
16324 |
+
#: includes/settings/wcj-settings-price-by-country.php:186
|
16325 |
#: includes/settings/wcj-settings-product-price-by-formula.php:108
|
16326 |
msgid "Disable Quick Edit Product For Admin Scope"
|
16327 |
msgstr ""
|
16328 |
|
16329 |
+
#: includes/settings/wcj-settings-price-by-country.php:187
|
16330 |
#: includes/settings/wcj-settings-product-price-by-formula.php:109
|
16331 |
msgid "Disable For Admin Quick Edit Scope."
|
16332 |
msgstr ""
|
16333 |
|
16334 |
+
#: includes/settings/wcj-settings-price-by-country.php:188
|
16335 |
msgid "Disable module on Edit Product For Admin scope."
|
16336 |
msgstr ""
|
16337 |
|
16338 |
+
#: includes/settings/wcj-settings-price-by-country.php:188
|
16339 |
#: includes/settings/wcj-settings-product-price-by-formula.php:110
|
16340 |
msgid ""
|
16341 |
"For example if you use Quick Edit Product and donot want change the deafult "
|
16342 |
"price then the box ticked"
|
16343 |
msgstr ""
|
16344 |
|
16345 |
+
#: includes/settings/wcj-settings-price-by-country.php:195
|
16346 |
msgid "Price Filter Widget and Sorting by Price Support"
|
16347 |
msgstr ""
|
16348 |
|
16349 |
+
#: includes/settings/wcj-settings-price-by-country.php:199
|
16350 |
msgid "Recalculate price filter widget and sorting by price product prices."
|
16351 |
msgstr ""
|
16352 |
|
16353 |
+
#: includes/settings/wcj-settings-price-by-country.php:214
|
16354 |
msgid "WooCommerce Coupons"
|
16355 |
msgstr ""
|
16356 |
|
16357 |
+
#: includes/settings/wcj-settings-price-by-country.php:222
|
16358 |
msgid "Woo Discount Rules"
|
16359 |
msgstr ""
|
16360 |
|
16361 |
+
#: includes/settings/wcj-settings-price-by-country.php:225
|
16362 |
#, php-format
|
16363 |
msgid ""
|
16364 |
"Adds compatibility with <a href=\"%s\" target=\"_blank\">Woo Discount Rules</"
|
16365 |
"a> plugin."
|
16366 |
msgstr ""
|
16367 |
|
16368 |
+
#: includes/settings/wcj-settings-price-by-country.php:225
|
16369 |
#, php-format
|
16370 |
msgid ""
|
16371 |
"If it doesn't work properly try to enable <a href=\"%s\">redirect to the cart "
|
16372 |
"page after successful addition</a> option."
|
16373 |
msgstr ""
|
16374 |
|
16375 |
+
#: includes/settings/wcj-settings-price-by-country.php:231
|
16376 |
msgid "WooCommerce Points and Rewards"
|
16377 |
msgstr ""
|
16378 |
|
16379 |
+
#: includes/settings/wcj-settings-price-by-country.php:234
|
16380 |
#, php-format
|
16381 |
msgid ""
|
16382 |
"Adds compatibility with <a href=\"%s\" target=\"_blank\">WooCommerce Points "
|
16383 |
"and Rewards</a> plugin."
|
16384 |
msgstr ""
|
16385 |
|
16386 |
+
#: includes/settings/wcj-settings-price-by-country.php:256
|
16387 |
msgid "User IP Detection Method"
|
16388 |
msgstr ""
|
16389 |
|
16390 |
+
#: includes/settings/wcj-settings-price-by-country.php:266
|
16391 |
msgid "Price Format Method"
|
16392 |
msgstr ""
|
16393 |
|
16394 |
+
#: includes/settings/wcj-settings-price-by-country.php:267
|
16395 |
msgid "The moment \"Pretty Price\" and \"Rounding\" will be applied"
|
16396 |
msgstr ""
|
16397 |
|
16398 |
+
#: includes/settings/wcj-settings-price-by-country.php:272
|
16399 |
msgid "get_price()"
|
16400 |
msgstr ""
|
16401 |
|
16402 |
+
#: includes/settings/wcj-settings-price-by-country.php:273
|
16403 |
msgid "wc_get_price_to_display()"
|
16404 |
msgstr ""
|
16405 |
|
16406 |
+
#: includes/settings/wcj-settings-price-by-country.php:285
|
16407 |
msgid "Save Country Group ID"
|
16408 |
msgstr ""
|
16409 |
|
16410 |
+
#: includes/settings/wcj-settings-price-by-country.php:286
|
16411 |
msgid ""
|
16412 |
"Try to disable it if the country detection is not correct, most probably if "
|
16413 |
"\"Override Country Options\" is enabled."
|
16414 |
msgstr ""
|
16415 |
|
16416 |
+
#: includes/settings/wcj-settings-price-by-country.php:297
|
16417 |
msgid "Country Groups"
|
16418 |
msgstr ""
|
16419 |
|
16420 |
+
#: includes/settings/wcj-settings-price-by-country.php:302
|
16421 |
msgid "Countries Selection"
|
16422 |
msgstr ""
|
16423 |
|
16424 |
+
#: includes/settings/wcj-settings-price-by-country.php:303
|
16425 |
msgid "Choose how do you want to enter countries groups in admin."
|
16426 |
msgstr ""
|
16427 |
|
16428 |
+
#: includes/settings/wcj-settings-price-by-country.php:308
|
16429 |
msgid "Comma separated list"
|
16430 |
msgstr ""
|
16431 |
|
16432 |
+
#: includes/settings/wcj-settings-price-by-country.php:309
|
16433 |
msgid "Multiselect"
|
16434 |
msgstr ""
|
16435 |
|
16436 |
+
#: includes/settings/wcj-settings-price-by-country.php:310
|
16437 |
#: includes/settings/wcj-settings-product-by-condition.php:85
|
16438 |
#: includes/settings/wcj-settings-related-products.php:164
|
16439 |
msgid "Chosen select"
|
16440 |
msgstr ""
|
16441 |
|
16442 |
+
#: includes/settings/wcj-settings-price-by-country.php:314
|
16443 |
msgid "Autogenerate Groups"
|
16444 |
msgstr ""
|
16445 |
|
16446 |
+
#: includes/settings/wcj-settings-price-by-country.php:320
|
16447 |
msgid "Groups Number"
|
16448 |
msgstr ""
|
16449 |
|
16450 |
+
#: includes/settings/wcj-settings-price-by-country.php:344
|
16451 |
msgid ""
|
16452 |
"Countries. List of comma separated country codes.<br>For country codes and "
|
16453 |
"predefined sets visit <a href=\"https://booster.io/country-codes/\" target="
|
16454 |
"\"_blank\">https://booster.io/country-codes/</a>"
|
16455 |
msgstr ""
|
16456 |
|
16457 |
+
#: includes/settings/wcj-settings-price-by-country.php:430
|
16458 |
msgid "Multiply Price by"
|
16459 |
msgstr ""
|
16460 |
|
17555 |
msgid "Custom Taxonomy"
|
17556 |
msgstr ""
|
17557 |
|
17558 |
+
#: includes/settings/wcj-settings-product-by-user.php:177
|
17559 |
+
msgid "Send Email to Product User"
|
17560 |
+
msgstr ""
|
17561 |
+
|
17562 |
+
#: includes/settings/wcj-settings-product-by-user.php:178
|
17563 |
+
msgid ""
|
17564 |
+
"Check to send email to product user when customer place order successfully"
|
17565 |
+
msgstr ""
|
17566 |
+
|
17567 |
#: includes/settings/wcj-settings-product-custom-info.php:44
|
17568 |
msgid "Single Product Pages"
|
17569 |
msgstr ""
|
21026 |
#: includes/widgets/class-wcj-widget-selector.php:65
|
21027 |
msgid "Product custom visibility"
|
21028 |
msgstr ""
|
21029 |
+
|
21030 |
+
#: tracking/class-example-settings.php:47 tracking/class-example-settings.php:56
|
21031 |
+
msgid "Example Settings"
|
21032 |
+
msgstr ""
|
21033 |
+
|
21034 |
+
#: tracking/class-example-settings.php:62
|
21035 |
+
msgid "Text field:"
|
21036 |
+
msgstr ""
|
21037 |
+
|
21038 |
+
#: tracking/class-example-settings.php:83
|
21039 |
+
msgid "Opt out"
|
21040 |
+
msgstr ""
|
21041 |
+
|
21042 |
+
#: tracking/class-example-settings.php:101
|
21043 |
+
msgid "Default setting"
|
21044 |
+
msgstr ""
|
21045 |
+
|
21046 |
+
#: tracking/class-example-settings.php:132
|
21047 |
+
msgid ""
|
21048 |
+
"You previously opted in to sending tracking details. You can change that "
|
21049 |
+
"setting here."
|
21050 |
+
msgstr ""
|
21051 |
+
|
21052 |
+
#: tracking/class-example-settings.php:144
|
21053 |
+
msgid "Option 1"
|
21054 |
+
msgstr ""
|
21055 |
+
|
21056 |
+
#: tracking/class-example-settings.php:145
|
21057 |
+
msgid "Option 2"
|
21058 |
+
msgstr ""
|
21059 |
+
|
21060 |
+
#: tracking/class-example-settings.php:146
|
21061 |
+
msgid "Option 3"
|
21062 |
+
msgstr ""
|
21063 |
+
|
21064 |
+
#: tracking/class-example-settings.php:152
|
21065 |
+
msgid "These settings are for example only."
|
21066 |
+
msgstr ""
|
21067 |
+
|
21068 |
+
#: tracking/class-plugin-usage-tracker.php:154
|
21069 |
+
msgid "Once Monthly"
|
21070 |
+
msgstr ""
|
21071 |
+
|
21072 |
+
#: tracking/class-plugin-usage-tracker.php:357
|
21073 |
+
msgid ""
|
21074 |
+
"We can't detect any product information. This is most probably because you "
|
21075 |
+
"have not included the code snippet."
|
21076 |
+
msgstr ""
|
21077 |
+
|
21078 |
+
#: tracking/class-plugin-usage-tracker.php:871
|
21079 |
+
#, php-format
|
21080 |
+
msgid ""
|
21081 |
+
"Thank you for installing our %1$s. We would like to track its usage on your "
|
21082 |
+
"site. We don't record any sensitive data, only information regarding the "
|
21083 |
+
"WordPress environment and %1$s settings, which we will use to help us make "
|
21084 |
+
"improvements to the %1$s. Tracking is completely optional."
|
21085 |
+
msgstr ""
|
21086 |
+
|
21087 |
+
#: tracking/class-plugin-usage-tracker.php:877
|
21088 |
+
#, php-format
|
21089 |
+
msgid ""
|
21090 |
+
"Thank you for installing our %1$s. We'd like your permission to track its "
|
21091 |
+
"usage on your site. We won't record any sensitive data, only information "
|
21092 |
+
"regarding the WordPress environment and %1$s settings, which we will use to "
|
21093 |
+
"help us make improvements to the %1$s. Tracking is completely optional."
|
21094 |
+
msgstr ""
|
21095 |
+
|
21096 |
+
#: tracking/class-plugin-usage-tracker.php:888
|
21097 |
+
msgid "Allow"
|
21098 |
+
msgstr ""
|
21099 |
+
|
21100 |
+
#: tracking/class-plugin-usage-tracker.php:889
|
21101 |
+
msgid "Do Not Allow"
|
21102 |
+
msgstr ""
|
21103 |
+
|
21104 |
+
#: tracking/class-plugin-usage-tracker.php:926
|
21105 |
+
#, php-format
|
21106 |
+
msgid ""
|
21107 |
+
"Thank you for opting in to tracking. Would you like to receive occasional "
|
21108 |
+
"news about this %s, including details of new features and special offers?"
|
21109 |
+
msgstr ""
|
21110 |
+
|
21111 |
+
#: tracking/class-plugin-usage-tracker.php:935
|
21112 |
+
msgid "Yes Please"
|
21113 |
+
msgstr ""
|
21114 |
+
|
21115 |
+
#: tracking/class-plugin-usage-tracker.php:936
|
21116 |
+
msgid "No Thank You"
|
21117 |
+
msgstr ""
|
21118 |
+
|
21119 |
+
#: tracking/class-plugin-usage-tracker.php:967
|
21120 |
+
msgid "Sorry to see you go"
|
21121 |
+
msgstr ""
|
21122 |
+
|
21123 |
+
#: tracking/class-plugin-usage-tracker.php:968
|
21124 |
+
msgid ""
|
21125 |
+
"Before you deactivate the plugin, would you quickly give us your reason for "
|
21126 |
+
"doing so?"
|
21127 |
+
msgstr ""
|
21128 |
+
|
21129 |
+
#: tracking/class-plugin-usage-tracker.php:970
|
21130 |
+
msgid "Set up is too difficult"
|
21131 |
+
msgstr ""
|
21132 |
+
|
21133 |
+
#: tracking/class-plugin-usage-tracker.php:971
|
21134 |
+
msgid "Lack of documentation"
|
21135 |
+
msgstr ""
|
21136 |
+
|
21137 |
+
#: tracking/class-plugin-usage-tracker.php:972
|
21138 |
+
msgid "Not the features I wanted"
|
21139 |
+
msgstr ""
|
21140 |
+
|
21141 |
+
#: tracking/class-plugin-usage-tracker.php:973
|
21142 |
+
msgid "Found a better plugin"
|
21143 |
+
msgstr ""
|
21144 |
+
|
21145 |
+
#: tracking/class-plugin-usage-tracker.php:974
|
21146 |
+
msgid "Installed by mistake"
|
21147 |
+
msgstr ""
|
21148 |
+
|
21149 |
+
#: tracking/class-plugin-usage-tracker.php:975
|
21150 |
+
msgid "Only required temporarily"
|
21151 |
+
msgstr ""
|
21152 |
+
|
21153 |
+
#: tracking/class-plugin-usage-tracker.php:976
|
21154 |
+
msgid "Didn't work"
|
21155 |
+
msgstr ""
|
21156 |
+
|
21157 |
+
#: tracking/class-plugin-usage-tracker.php:978
|
21158 |
+
msgid "Details (optional)"
|
21159 |
+
msgstr ""
|
21160 |
+
|
21161 |
+
#: tracking/class-plugin-usage-tracker.php:1017
|
21162 |
+
msgid "Submitting form"
|
21163 |
+
msgstr ""
|
21164 |
+
|
21165 |
+
#: tracking/class-plugin-usage-tracker.php:1077
|
21166 |
+
msgid "Submit and Deactivate"
|
21167 |
+
msgstr ""
|
21168 |
+
|
21169 |
+
#: tracking/class-plugin-usage-tracker.php:1077
|
21170 |
+
msgid "Just Deactivate"
|
21171 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: anbinder, karzin, pluggabl
|
3 |
Tags: woocommerce customization, woocommerce bundle, woocommerce product addon, woocommerce integration, ecommerce plugin
|
4 |
Requires at least: 4.4
|
5 |
-
Tested up to:
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 5.5.
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -108,6 +108,11 @@ To unlock all Booster for WooCommerce features, please install additional paid B
|
|
108 |
|
109 |
== Detailed List of Features ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
**Prices & Currencies**
|
112 |
|
113 |
* *Bulk Price Converter* - Multiply all products prices by set value.
|
@@ -267,6 +272,17 @@ To unlock all Booster for WooCommerce features, please install additional paid B
|
|
267 |
|
268 |
== Changelog ==
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
= 5.5.7 27/04/2022 =
|
271 |
|
272 |
* NEW FEATURE - PDF INVOICING & PACKING SLIPS - PDF Invoicing - Added new shortcode to show 0 VAT message. [wcj_order_vat_func vat_exempt_text=' ']
|
2 |
Contributors: anbinder, karzin, pluggabl
|
3 |
Tags: woocommerce customization, woocommerce bundle, woocommerce product addon, woocommerce integration, ecommerce plugin
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 5.5.8
|
8 |
License: GNU General Public License v3.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
108 |
|
109 |
== Detailed List of Features ==
|
110 |
|
111 |
+
**Subscription Customization**
|
112 |
+
|
113 |
+
* *Subscriptions* - Give customers more control of their subscriptions, Cancellation questionnaire, Change next payment date, Add Products to Existing Subscription, Turn existing one-time products to subscriptions base etc.(Available in paid Booster bundles)
|
114 |
+
|
115 |
+
|
116 |
**Prices & Currencies**
|
117 |
|
118 |
* *Bulk Price Converter* - Multiply all products prices by set value.
|
272 |
|
273 |
== Changelog ==
|
274 |
|
275 |
+
= 5.5.8 25/05/2022 =
|
276 |
+
|
277 |
+
* NEW FEATURE - PRODUCTS - User Products - Send an email to the product owner when a product has been sold.
|
278 |
+
* NEW FEATURE - PAYMENT GATEWAYS - Gateways Fees and Discounts - Added a new feature to apply Payment Gateways Fees by User role.
|
279 |
+
* FIXED - PRICES & CURRENCIES - Prices and Currencies by Country - Added Compatibility with Webtofee subscription Plugin.
|
280 |
+
* FIXED - PRICES & CURRENCIES - Wholesale Price - Exclude/Include product issues that have been fixed in the Wholesale Price Module.
|
281 |
+
* FIXED - PRODUCTS - Add to Cart - Fixed an issue with default variations add to the cart module.
|
282 |
+
* WooCommerce 6.5.1 tested
|
283 |
+
* WordPress 6.0 tested
|
284 |
+
|
285 |
+
|
286 |
= 5.5.7 27/04/2022 =
|
287 |
|
288 |
* NEW FEATURE - PDF INVOICING & PACKING SLIPS - PDF Invoicing - Added new shortcode to show 0 VAT message. [wcj_order_vat_func vat_exempt_text=' ']
|
tracking/README.md
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
put class-plugin-usage-tracker.php into a subfolder called tracking
|
tracking/class-example-settings.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Discussion Board admin class
|
4 |
+
*/
|
5 |
+
|
6 |
+
// this file is used to demonstrate how to add a setting to your own theme
|
7 |
+
// or plugin that will allow the user to opt in or out
|
8 |
+
// of tracking after they've made their initial choice on installation.
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Plugin admin class
|
17 |
+
**/
|
18 |
+
if ( ! class_exists ( 'PUT_Example_Settings' ) ) { // Don't initialise if there's already a Discussion Board activated
|
19 |
+
|
20 |
+
class PUT_Example_Settings {
|
21 |
+
|
22 |
+
public function __construct() {
|
23 |
+
//
|
24 |
+
}
|
25 |
+
|
26 |
+
/*
|
27 |
+
* Initialize the class and start calling our hooks and filters
|
28 |
+
* @since 1.0.0
|
29 |
+
*/
|
30 |
+
public function init() {
|
31 |
+
add_action ( 'admin_menu', array ( $this, 'add_settings_submenu' ) );
|
32 |
+
add_action ( 'admin_init', array ( $this, 'register_options_init' ) );
|
33 |
+
add_action ( 'admin_init', array ( $this, 'save_registered_setting' ) );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* We save this artificially to let the tracker know that we're allowed to export this option's data
|
38 |
+
*/
|
39 |
+
public function save_registered_setting() {
|
40 |
+
$options = get_option( 'wisdom_example_options_settings' );
|
41 |
+
$options['wisdom_registered_setting'] = 1;
|
42 |
+
update_option( 'wisdom_example_options_settings', $options );
|
43 |
+
}
|
44 |
+
|
45 |
+
// Add the menu item
|
46 |
+
public function add_settings_submenu() {
|
47 |
+
add_submenu_page( 'options-general.php', __( 'Example Settings', 'plugin-usage-tracker' ), __( 'Example Settings', 'plugin-usage-tracker' ), 'manage_options', 'example-settings-page', array ( $this, 'options_page' ) );
|
48 |
+
}
|
49 |
+
|
50 |
+
public function register_options_init() {
|
51 |
+
|
52 |
+
register_setting ( 'wisdom_example_options', 'wisdom_example_options_settings' );
|
53 |
+
|
54 |
+
add_settings_section (
|
55 |
+
'wisdom_example_options_section',
|
56 |
+
__( 'Example Settings', 'plugin-usage-tracker' ),
|
57 |
+
array ( $this, 'example_settings_section_callback' ),
|
58 |
+
'wisdom_example_options'
|
59 |
+
);
|
60 |
+
add_settings_field (
|
61 |
+
'text_field_example',
|
62 |
+
__( 'Text field:', 'plugin-usage-tracker' ),
|
63 |
+
array ( $this, 'text_field_example_render' ),
|
64 |
+
'wisdom_example_options',
|
65 |
+
'wisdom_example_options_section'
|
66 |
+
);
|
67 |
+
add_settings_field (
|
68 |
+
'checkbox_example',
|
69 |
+
__( 'Checkbox', 'plugin-usage-tracker' ),
|
70 |
+
array ( $this, 'checkbox_example_render' ),
|
71 |
+
'wisdom_example_options',
|
72 |
+
'wisdom_example_options_section'
|
73 |
+
);
|
74 |
+
add_settings_field (
|
75 |
+
'select_example',
|
76 |
+
__( 'Select', 'plugin-usage-tracker' ),
|
77 |
+
array ( $this, 'select_example_render' ),
|
78 |
+
'wisdom_example_options',
|
79 |
+
'wisdom_example_options_section'
|
80 |
+
);
|
81 |
+
add_settings_field (
|
82 |
+
'wisdom_opt_out',
|
83 |
+
__( 'Opt out', 'plugin-usage-tracker' ),
|
84 |
+
array ( $this, 'opt_out_example_render' ),
|
85 |
+
'wisdom_example_options',
|
86 |
+
'wisdom_example_options_section'
|
87 |
+
);
|
88 |
+
|
89 |
+
// Set default options
|
90 |
+
$options = get_option( 'wisdom_example_options_settings' );
|
91 |
+
if ( false === $options ) {
|
92 |
+
// Get defaults
|
93 |
+
$defaults = $this->get_default_options_settings();
|
94 |
+
update_option( 'wisdom_example_options_settings', $defaults );
|
95 |
+
}
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
public function get_default_options_settings() {
|
100 |
+
$defaults = array(
|
101 |
+
'text_field_example' => __( 'Default setting', 'plugin-usage-tracker' ),
|
102 |
+
'checkbox_example' => 1,
|
103 |
+
'select_example' => 'option-1',
|
104 |
+
'wisdom_opt_out' => '',
|
105 |
+
'wisdom_registered_setting' => 1 // For plugin-usage-tracker
|
106 |
+
);
|
107 |
+
return $defaults;
|
108 |
+
}
|
109 |
+
|
110 |
+
public function text_field_example_render() {
|
111 |
+
$options = get_option( 'wisdom_example_options_settings' );
|
112 |
+
$value = '';
|
113 |
+
if( isset( $options['text_field_example'] ) ) {
|
114 |
+
$value = $options['text_field_example'];
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
<input type='text' name='wisdom_example_options_settings[text_field_example]' value="<?php echo $value; ?>" />
|
118 |
+
<?php
|
119 |
+
}
|
120 |
+
|
121 |
+
public function checkbox_example_render() {
|
122 |
+
$options = get_option( 'wisdom_example_options_settings' );
|
123 |
+
?>
|
124 |
+
<input type='checkbox' name='wisdom_example_options_settings[checkbox_example]' <?php checked ( ! empty ( $options['checkbox_example'] ), 1 ); ?> value='1'>
|
125 |
+
<?php
|
126 |
+
}
|
127 |
+
|
128 |
+
public function opt_out_example_render() {
|
129 |
+
$options = get_option( 'wisdom_example_options_settings' );
|
130 |
+
?>
|
131 |
+
<input type='checkbox' name='wisdom_example_options_settings[wisdom_opt_out]' <?php checked ( ! empty ( $options['wisdom_opt_out'] ), 1 ); ?> value='1'>
|
132 |
+
<p class="description"><?php _e( 'You previously opted in to sending tracking details. You can change that setting here.', 'plugin-usage-tracker' ); ?></p>
|
133 |
+
<?php
|
134 |
+
}
|
135 |
+
|
136 |
+
public function select_example_render() {
|
137 |
+
$options = get_option( 'wisdom_example_options_settings' );
|
138 |
+
$value = '';
|
139 |
+
if( isset( $options['select_example'] ) ) {
|
140 |
+
$value = $options['select_example'];
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
<select name='wisdom_example_options_settings[select_example]'>
|
144 |
+
<option value="option-1" <?php selected( esc_attr( $value ), 'option-1' ); ?>><?php _e( 'Option 1', 'plugin-usage-tracker' ); ?></option>
|
145 |
+
<option value="option-2" <?php selected( esc_attr( $value ), 'option-2' ); ?>><?php _e( 'Option 2', 'plugin-usage-tracker' ); ?></option>
|
146 |
+
<option value="option-3" <?php selected( esc_attr( $value ), 'option-3' ); ?>><?php _e( 'Option 3', 'plugin-usage-tracker' ); ?></option>
|
147 |
+
</select>
|
148 |
+
<?php
|
149 |
+
}
|
150 |
+
|
151 |
+
public function example_settings_section_callback() {
|
152 |
+
echo '<p>' . __( 'These settings are for example only.', 'plugin-usage-tracker' ) . '</p>';
|
153 |
+
}
|
154 |
+
|
155 |
+
public function options_page() { ?>
|
156 |
+
<div class="wrap">
|
157 |
+
<form action='options.php' method='post'>
|
158 |
+
<?php
|
159 |
+
settings_fields( 'wisdom_example_options' );
|
160 |
+
do_settings_sections( 'wisdom_example_options' );
|
161 |
+
submit_button();
|
162 |
+
?>
|
163 |
+
</form>
|
164 |
+
</div><!-- .wrap -->
|
165 |
+
<?php
|
166 |
+
}
|
167 |
+
|
168 |
+
}
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
$PUT_Example_Settings = new PUT_Example_Settings();
|
173 |
+
$PUT_Example_Settings -> init();
|
tracking/class-plugin-usage-tracker.php
ADDED
@@ -0,0 +1,1137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This is the class that sends all the data back to the home site
|
4 |
+
* It also handles opting in and deactivation
|
5 |
+
* @version 1.2.5
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
14 |
+
|
15 |
+
class Plugin_Usage_Tracker {
|
16 |
+
|
17 |
+
private $wisdom_version = '1.2.4';
|
18 |
+
private $home_url = '';
|
19 |
+
private $plugin_file = '';
|
20 |
+
private $plugin_name = '';
|
21 |
+
private $options = array();
|
22 |
+
private $require_optin = true;
|
23 |
+
private $include_goodbye_form = true;
|
24 |
+
private $marketing = false;
|
25 |
+
private $collect_email = false;
|
26 |
+
private $what_am_i = 'plugin';
|
27 |
+
private $theme_allows_tracking = 0;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Class constructor
|
31 |
+
*
|
32 |
+
* @param $_home_url The URL to the site we're sending data to
|
33 |
+
* @param $_plugin_file The file path for this plugin
|
34 |
+
* @param $_options Plugin options to track
|
35 |
+
* @param $_require_optin Whether user opt-in is required (always required on WordPress.org)
|
36 |
+
* @param $_include_goodbye_form Whether to include a form when the user deactivates
|
37 |
+
* @param $_marketing Marketing method:
|
38 |
+
* 0: Don't collect email addresses
|
39 |
+
* 1: Request permission same time as tracking opt-in
|
40 |
+
* 2: Request permission after opt-in
|
41 |
+
*/
|
42 |
+
public function __construct(
|
43 |
+
$_plugin_file,
|
44 |
+
$_home_url,
|
45 |
+
$_options,
|
46 |
+
$_require_optin=true,
|
47 |
+
$_include_goodbye_form=true,
|
48 |
+
$_marketing=false ) {
|
49 |
+
|
50 |
+
$this->plugin_file = $_plugin_file;
|
51 |
+
$this->home_url = trailingslashit( $_home_url );
|
52 |
+
|
53 |
+
// If the filename is 'functions' then we're tracking a theme
|
54 |
+
if( basename( $this->plugin_file, '.php' ) != 'functions' ) {
|
55 |
+
$this->plugin_name = basename( $this->plugin_file, '.php' );
|
56 |
+
} else {
|
57 |
+
$this->what_am_i = 'theme';
|
58 |
+
$theme = wp_get_theme();
|
59 |
+
if( $theme->Name ) {
|
60 |
+
$this->plugin_name = sanitize_text_field( $theme->Name );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
$this->options = $_options;
|
65 |
+
$this->require_optin = $_require_optin;
|
66 |
+
$this->include_goodbye_form = $_include_goodbye_form;
|
67 |
+
$this->marketing = $_marketing;
|
68 |
+
|
69 |
+
// Only use this on switching theme
|
70 |
+
$this->theme_allows_tracking = get_theme_mod( 'wisdom-allow-tracking', 0 );
|
71 |
+
|
72 |
+
// Schedule / deschedule tracking when activated / deactivated
|
73 |
+
if( $this->what_am_i == 'theme' ) {
|
74 |
+
// Need to think about scheduling for sites that have already activated the theme
|
75 |
+
add_action( 'after_switch_theme', array( $this, 'schedule_tracking' ) );
|
76 |
+
add_action( 'switch_theme', array( $this, 'deactivate_this_plugin' ) );
|
77 |
+
} else {
|
78 |
+
register_activation_hook( $this->plugin_file, array( $this, 'schedule_tracking' ) );
|
79 |
+
register_deactivation_hook( $this->plugin_file, array( $this, 'deactivate_this_plugin' ) );
|
80 |
+
}
|
81 |
+
add_filter( 'wcj_modules',array( $this, 'add_tracking_module' ) );
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
// Get it going
|
87 |
+
$this->init();
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
public function init() {
|
93 |
+
// Check marketing
|
94 |
+
if( $this->marketing == 3 ) {
|
95 |
+
$this->set_can_collect_email( true, $this->plugin_name );
|
96 |
+
}
|
97 |
+
|
98 |
+
// Check whether opt-in is required
|
99 |
+
// If not, then tracking is allowed
|
100 |
+
if( ! $this->require_optin ) {
|
101 |
+
$this->set_can_collect_email( true, $this->plugin_name );
|
102 |
+
$this->set_is_tracking_allowed( true );
|
103 |
+
$this->update_block_notice();
|
104 |
+
$this->do_tracking();
|
105 |
+
}
|
106 |
+
|
107 |
+
// Hook our do_tracking function to the weekly action
|
108 |
+
add_filter( 'cron_schedules', array( $this, 'schedule_weekly_event' ) );
|
109 |
+
// It's called weekly, but in fact it could be daily, weekly or monthly
|
110 |
+
add_action( 'put_do_weekly_action', array( $this, 'do_tracking' ) );
|
111 |
+
|
112 |
+
// Use this action for local testing
|
113 |
+
// add_action( 'admin_init', array( $this, 'do_tracking' ) );
|
114 |
+
|
115 |
+
// Display the admin notice on activation
|
116 |
+
add_action( 'admin_init', array( $this, 'set_notification_time' ) );
|
117 |
+
add_action( 'admin_notices', array( $this, 'optin_notice' ) );
|
118 |
+
add_action( 'admin_notices', array( $this, 'marketing_notice' ) );
|
119 |
+
|
120 |
+
// Deactivation
|
121 |
+
add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
|
122 |
+
add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
|
123 |
+
add_action( 'wp_ajax_goodbye_form', array( $this, 'goodbye_form_callback' ) );
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* When the plugin is activated
|
129 |
+
* Create scheduled event
|
130 |
+
* And check if tracking is enabled - perhaps the plugin has been reactivated
|
131 |
+
*
|
132 |
+
* @since 1.0.0
|
133 |
+
*/
|
134 |
+
public function schedule_tracking() {
|
135 |
+
if ( ! wp_next_scheduled( 'put_do_weekly_action' ) ) {
|
136 |
+
$schedule = $this->get_schedule();
|
137 |
+
wp_schedule_event( time(), $schedule, 'put_do_weekly_action' );
|
138 |
+
}
|
139 |
+
$this->do_tracking( true );
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Create weekly schedule
|
144 |
+
*
|
145 |
+
* @since 1.2.3
|
146 |
+
*/
|
147 |
+
public function schedule_weekly_event( $schedules ) {
|
148 |
+
$schedules['weekly'] = array(
|
149 |
+
'interval' => 604800,
|
150 |
+
'display' => __( 'Once Weekly' )
|
151 |
+
);
|
152 |
+
$schedules['monthly'] = array(
|
153 |
+
'interval' => 2635200,
|
154 |
+
'display' => __( 'Once Monthly' )
|
155 |
+
);
|
156 |
+
return $schedules;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get how frequently data is tracked back
|
161 |
+
*
|
162 |
+
* @since 1.2.3
|
163 |
+
*/
|
164 |
+
public function get_schedule() {
|
165 |
+
// Could be daily, weekly or monthly
|
166 |
+
$schedule = apply_filters( 'wisdom_filter_schedule_' . $this->plugin_name, 'monthly' );
|
167 |
+
return $schedule;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* This is our function to get everything going
|
172 |
+
* Check that user has opted in
|
173 |
+
* Collect data
|
174 |
+
* Then send it back
|
175 |
+
*
|
176 |
+
* @since 1.0.0
|
177 |
+
* @param $force Force tracking if it's not time
|
178 |
+
*/
|
179 |
+
public function do_tracking( $force=false ) {
|
180 |
+
|
181 |
+
// If the home site hasn't been defined, we just drop out. Nothing much we can do.
|
182 |
+
if ( ! $this->home_url ) {
|
183 |
+
return;
|
184 |
+
}
|
185 |
+
|
186 |
+
// Check to see if the user has opted in to tracking
|
187 |
+
$allow_tracking = $this->get_is_tracking_allowed();
|
188 |
+
if( ! $allow_tracking ) {
|
189 |
+
return;
|
190 |
+
}
|
191 |
+
|
192 |
+
// Check to see if it's time to track
|
193 |
+
$track_time = $this->get_is_time_to_track();
|
194 |
+
/*if( ! $track_time && ! $force ) {
|
195 |
+
return;
|
196 |
+
}*/
|
197 |
+
|
198 |
+
$this->set_admin_email();
|
199 |
+
|
200 |
+
// Get our data
|
201 |
+
$body = $this->get_data();
|
202 |
+
|
203 |
+
// Send the data
|
204 |
+
$this->send_data( $body );
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* We hook this to admin_init when the user accepts tracking
|
210 |
+
* Ensures the email address is available
|
211 |
+
*
|
212 |
+
* @since 1.2.1
|
213 |
+
*/
|
214 |
+
public function force_tracking() {
|
215 |
+
$this->do_tracking( true ); // Run this straightaway
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Send the data to the home site
|
220 |
+
*
|
221 |
+
* @since 1.0.0
|
222 |
+
*/
|
223 |
+
public function send_data( $body ) {
|
224 |
+
|
225 |
+
$request = wp_remote_post(
|
226 |
+
esc_url( $this->home_url . '?usage_tracker=hello' ),
|
227 |
+
array(
|
228 |
+
'method' => 'POST',
|
229 |
+
'timeout' => 20,
|
230 |
+
'redirection' => 5,
|
231 |
+
'httpversion' => '1.1',
|
232 |
+
'blocking' => true,
|
233 |
+
'body' => $body,
|
234 |
+
'user-agent' => 'PUT/1.0.0; ' . home_url()
|
235 |
+
)
|
236 |
+
);
|
237 |
+
|
238 |
+
$this->set_track_time();
|
239 |
+
|
240 |
+
if( is_wp_error( $request ) ) {
|
241 |
+
return $request;
|
242 |
+
}
|
243 |
+
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* add_tracking_module.
|
248 |
+
*
|
249 |
+
* @version 1.0.0
|
250 |
+
* @since 3.2.4
|
251 |
+
*/
|
252 |
+
|
253 |
+
public function add_tracking_module( $modules_array ) {
|
254 |
+
|
255 |
+
global $tracked_module;
|
256 |
+
$all_module = array();
|
257 |
+
|
258 |
+
foreach ( $modules_array as $key => $modules ) {
|
259 |
+
$cats = $modules['all_cat_ids'];
|
260 |
+
|
261 |
+
if( $key != "dashboard"){
|
262 |
+
|
263 |
+
foreach ( $cats as $module ) {
|
264 |
+
|
265 |
+
$mod = 'wcj_'.$module.'_enabled';
|
266 |
+
array_push($all_module,$mod);
|
267 |
+
|
268 |
+
}
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
$tracked_module = $all_module;
|
273 |
+
|
274 |
+
return $modules_array;
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Here we collect most of the data
|
279 |
+
*
|
280 |
+
* @since 1.0.0
|
281 |
+
*/
|
282 |
+
public function get_data() {
|
283 |
+
|
284 |
+
// Use this to pass error messages back if necessary
|
285 |
+
$body['message'] = '';
|
286 |
+
|
287 |
+
// Use this array to send data back
|
288 |
+
$body = array(
|
289 |
+
'plugin_slug' => sanitize_text_field( $this->plugin_name ),
|
290 |
+
'url' => home_url(),
|
291 |
+
'site_name' => get_bloginfo( 'name' ),
|
292 |
+
'site_version' => get_bloginfo( 'version' ),
|
293 |
+
'site_language' => get_bloginfo( 'language' ),
|
294 |
+
'charset' => get_bloginfo( 'charset' ),
|
295 |
+
'wisdom_version' => $this->wisdom_version,
|
296 |
+
'php_version' => phpversion(),
|
297 |
+
'multisite' => is_multisite(),
|
298 |
+
'file_location' => __FILE__,
|
299 |
+
'product_type' => esc_html( $this->what_am_i )
|
300 |
+
);
|
301 |
+
|
302 |
+
// Collect the email if the correct option has been set
|
303 |
+
if( $this->get_can_collect_email() ) {
|
304 |
+
$body['email'] = $this->get_admin_email();
|
305 |
+
}
|
306 |
+
$body['marketing_method'] = $this->marketing;
|
307 |
+
|
308 |
+
$body['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
|
309 |
+
|
310 |
+
// Extra PHP fields
|
311 |
+
$body['memory_limit'] = ini_get( 'memory_limit' );
|
312 |
+
$body['upload_max_size'] = ini_get( 'upload_max_size' );
|
313 |
+
$body['post_max_size'] = ini_get( 'post_max_size' );
|
314 |
+
$body['upload_max_filesize'] = ini_get( 'upload_max_filesize' );
|
315 |
+
$body['max_execution_time'] = ini_get( 'max_execution_time' );
|
316 |
+
$body['max_input_time'] = ini_get( 'max_input_time' );
|
317 |
+
|
318 |
+
// Retrieve current plugin information
|
319 |
+
if( ! function_exists( 'get_plugins' ) ) {
|
320 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
321 |
+
}
|
322 |
+
|
323 |
+
$plugins = array_keys( get_plugins() );
|
324 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
325 |
+
|
326 |
+
foreach ( $plugins as $key => $plugin ) {
|
327 |
+
if ( in_array( $plugin, $active_plugins ) ) {
|
328 |
+
// Remove active plugins from list so we can show active and inactive separately
|
329 |
+
unset( $plugins[$key] );
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
$body['active_plugins'] = $active_plugins;
|
334 |
+
$body['inactive_plugins'] = $plugins;
|
335 |
+
|
336 |
+
// Check text direction
|
337 |
+
$body['text_direction'] = 'LTR';
|
338 |
+
if( function_exists( 'is_rtl' ) ) {
|
339 |
+
if( is_rtl() ) {
|
340 |
+
$body['text_direction'] = 'RTL';
|
341 |
+
}
|
342 |
+
} else {
|
343 |
+
$body['text_direction'] = 'not set';
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Get our plugin data
|
348 |
+
* Currently we grab plugin name and version
|
349 |
+
* Or, return a message if the plugin data is not available
|
350 |
+
* @since 1.0.0
|
351 |
+
*/
|
352 |
+
$plugin = $this->plugin_data();
|
353 |
+
$body['status'] = 'Active'; // Never translated
|
354 |
+
if( empty( $plugin ) ) {
|
355 |
+
// We can't find the plugin data
|
356 |
+
// Send a message back to our home site
|
357 |
+
$body['message'] .= __( 'We can\'t detect any product information. This is most probably because you have not included the code snippet.', 'singularity' );
|
358 |
+
$body['status'] = 'Data not found'; // Never translated
|
359 |
+
} else {
|
360 |
+
if( isset( $plugin['Name'] ) ) {
|
361 |
+
$body['plugin'] = sanitize_text_field( $plugin['Name'] );
|
362 |
+
}
|
363 |
+
if( isset( $plugin['Version'] ) ) {
|
364 |
+
$body['version'] = sanitize_text_field( $plugin['Version'] );
|
365 |
+
}
|
366 |
+
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Get our plugin options
|
371 |
+
* @since 1.0.0
|
372 |
+
*/
|
373 |
+
$options = $this->options;
|
374 |
+
$plugin_options = array();
|
375 |
+
if( ! empty( $options ) && is_array( $options ) ) {
|
376 |
+
foreach( $options as $option ) {
|
377 |
+
$fields = get_option( $option );
|
378 |
+
// Check for permission to send this option
|
379 |
+
if( isset( $fields['wisdom_registered_setting'] ) ) {
|
380 |
+
foreach( $fields as $key=>$value ) {
|
381 |
+
$plugin_options[$key] = $value;
|
382 |
+
}
|
383 |
+
}
|
384 |
+
}
|
385 |
+
}
|
386 |
+
$body['plugin_options'] = $this->options; // Returns array
|
387 |
+
$body['plugin_options_fields'] = $plugin_options; // Returns object
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Get our theme data
|
391 |
+
* Currently we grab theme name and version
|
392 |
+
* @since 1.0.0
|
393 |
+
*/
|
394 |
+
$theme = wp_get_theme();
|
395 |
+
if( $theme->Name ) {
|
396 |
+
$body['theme'] = sanitize_text_field( $theme->Name );
|
397 |
+
}
|
398 |
+
if( $theme->Version ) {
|
399 |
+
$body['theme_version'] = sanitize_text_field( $theme->Version );
|
400 |
+
}
|
401 |
+
if( $theme->Template ) {
|
402 |
+
$body['theme_parent'] = sanitize_text_field( $theme->Template );
|
403 |
+
}
|
404 |
+
|
405 |
+
global $wpdb;
|
406 |
+
global $tracked_module;
|
407 |
+
|
408 |
+
$names = implode('\', \'', $tracked_module);
|
409 |
+
|
410 |
+
$boosterActivePlugins = $wpdb->get_results("SELECT `option_name` FROM $wpdb->options WHERE `autoload` = 'yes' AND `option_value` = 'yes' AND `option_name` IN ('.$names.')");
|
411 |
+
|
412 |
+
|
413 |
+
$booster_active_plugin = array();
|
414 |
+
foreach($boosterActivePlugins as $boosterPlugin) {
|
415 |
+
$boosterPlugin = str_replace('wcj_', '', $boosterPlugin->option_name);
|
416 |
+
$boosterPluginTitle = str_replace('_enabled', '', $boosterPlugin);
|
417 |
+
$pluginTitle = str_replace('_', ' ', $boosterPluginTitle);
|
418 |
+
$booster_active_plugin[] = ucwords($pluginTitle);
|
419 |
+
}
|
420 |
+
|
421 |
+
$booster_active_plugin = implode(',', $booster_active_plugin );
|
422 |
+
|
423 |
+
|
424 |
+
$body['wisdom_booster_active_plugins'] = $booster_active_plugin;
|
425 |
+
|
426 |
+
// Return the data
|
427 |
+
return $body;
|
428 |
+
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Return plugin data
|
433 |
+
* @since 1.0.0
|
434 |
+
*/
|
435 |
+
public function plugin_data() {
|
436 |
+
// Being cautious here
|
437 |
+
if( ! function_exists( 'get_plugin_data' ) ) {
|
438 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
439 |
+
}
|
440 |
+
// Retrieve current plugin information
|
441 |
+
$plugin = get_plugin_data( $this->plugin_file );
|
442 |
+
return $plugin;
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Deactivating plugin
|
447 |
+
* @since 1.0.0
|
448 |
+
*/
|
449 |
+
public function deactivate_this_plugin() {
|
450 |
+
// Check to see if the user has opted in to tracking
|
451 |
+
if( $this->what_am_i == 'theme' ) {
|
452 |
+
$allow_tracking = $this->theme_allows_tracking;
|
453 |
+
} else {
|
454 |
+
$allow_tracking = $this->get_is_tracking_allowed();
|
455 |
+
}
|
456 |
+
|
457 |
+
if( ! $allow_tracking ) {
|
458 |
+
return;
|
459 |
+
}
|
460 |
+
|
461 |
+
$body = $this->get_data();
|
462 |
+
$body['status'] = 'Deactivated'; // Never translated
|
463 |
+
$body['deactivated_date'] = time();
|
464 |
+
|
465 |
+
// Add deactivation form data
|
466 |
+
if( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
|
467 |
+
$body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
|
468 |
+
}
|
469 |
+
if( false !== get_option( 'wisdom_deactivation_details_' . $this->plugin_name ) ) {
|
470 |
+
$body['deactivation_details'] = get_option( 'wisdom_deactivation_details_' . $this->plugin_name );
|
471 |
+
}
|
472 |
+
|
473 |
+
$this->send_data( $body );
|
474 |
+
// Clear scheduled update
|
475 |
+
wp_clear_scheduled_hook( 'put_do_weekly_action' );
|
476 |
+
|
477 |
+
// Clear the wisdom_last_track_time value for this plugin
|
478 |
+
// @since 1.2.2
|
479 |
+
$track_time = get_option( 'wisdom_last_track_time' );
|
480 |
+
if( isset( $track_time[$this->plugin_name]) ) {
|
481 |
+
unset( $track_time[$this->plugin_name] );
|
482 |
+
}
|
483 |
+
update_option( 'wisdom_last_track_time', $track_time );
|
484 |
+
|
485 |
+
}
|
486 |
+
|
487 |
+
/**
|
488 |
+
* Is tracking allowed?
|
489 |
+
* @since 1.0.0
|
490 |
+
*/
|
491 |
+
public function get_is_tracking_allowed() {
|
492 |
+
|
493 |
+
// First, check if the user has changed their mind and opted out of tracking
|
494 |
+
if( $this->has_user_opted_out() ) {
|
495 |
+
$this->set_is_tracking_allowed( false, $this->plugin_name );
|
496 |
+
return false;
|
497 |
+
}
|
498 |
+
|
499 |
+
if( $this->what_am_i == 'theme' ) {
|
500 |
+
|
501 |
+
$mod = get_theme_mod( 'wisdom-allow-tracking', 0 );
|
502 |
+
if( $mod ) {
|
503 |
+
return true;
|
504 |
+
}
|
505 |
+
|
506 |
+
} else {
|
507 |
+
|
508 |
+
// The wisdom_allow_tracking option is an array of plugins that are being tracked
|
509 |
+
$allow_tracking = get_option( 'wisdom_allow_tracking' );
|
510 |
+
// If this plugin is in the array, then tracking is allowed
|
511 |
+
if( isset( $allow_tracking[$this->plugin_name] ) ) {
|
512 |
+
return true;
|
513 |
+
}
|
514 |
+
|
515 |
+
}
|
516 |
+
|
517 |
+
return false;
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Set if tracking is allowed
|
522 |
+
* Option is an array of all plugins with tracking permitted
|
523 |
+
* More than one plugin may be using the tracker
|
524 |
+
* @since 1.0.0
|
525 |
+
* @param $is_allowed Boolean true if tracking is allowed, false if not
|
526 |
+
*/
|
527 |
+
public function set_is_tracking_allowed( $is_allowed, $plugin=null ) {
|
528 |
+
|
529 |
+
if( empty( $plugin ) ) {
|
530 |
+
$plugin = $this->plugin_name;
|
531 |
+
}
|
532 |
+
|
533 |
+
// The wisdom_allow_tracking option is an array of plugins that are being tracked
|
534 |
+
$allow_tracking = get_option( 'wisdom_allow_tracking' );
|
535 |
+
|
536 |
+
// If the user has decided to opt out
|
537 |
+
if( $this->has_user_opted_out() ) {
|
538 |
+
if( $this->what_am_i == 'theme' ) {
|
539 |
+
set_theme_mod( 'wisdom-allow-tracking', 0 );
|
540 |
+
} else {
|
541 |
+
if( isset( $allow_tracking[$plugin] ) ) {
|
542 |
+
unset( $allow_tracking[$plugin] );
|
543 |
+
}
|
544 |
+
}
|
545 |
+
|
546 |
+
} else if( $is_allowed || ! $this->require_optin ) {
|
547 |
+
// If the user has agreed to allow tracking or if opt-in is not required
|
548 |
+
|
549 |
+
if( $this->what_am_i == 'theme' ) {
|
550 |
+
set_theme_mod( 'wisdom-allow-tracking', 1 );
|
551 |
+
} else {
|
552 |
+
if( empty( $allow_tracking ) || ! is_array( $allow_tracking ) ) {
|
553 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
554 |
+
$allow_tracking = array( $plugin => $plugin );
|
555 |
+
} else {
|
556 |
+
// Else add the plugin name to the array
|
557 |
+
$allow_tracking[$plugin] = $plugin;
|
558 |
+
}
|
559 |
+
}
|
560 |
+
|
561 |
+
} else {
|
562 |
+
|
563 |
+
if( $this->what_am_i == 'theme' ) {
|
564 |
+
set_theme_mod( 'wisdom-allow-tracking', 0 );
|
565 |
+
} else {
|
566 |
+
if( isset( $allow_tracking[$plugin] ) ) {
|
567 |
+
unset( $allow_tracking[$plugin] );
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
}
|
572 |
+
|
573 |
+
update_option( 'wisdom_allow_tracking', $allow_tracking );
|
574 |
+
|
575 |
+
}
|
576 |
+
|
577 |
+
/**
|
578 |
+
* Has the user opted out of allowing tracking?
|
579 |
+
* Note that themes are opt in / plugins are opt out
|
580 |
+
* @since 1.1.0
|
581 |
+
* @return Boolean
|
582 |
+
*/
|
583 |
+
public function has_user_opted_out() {
|
584 |
+
// Different opt-out methods for plugins and themes
|
585 |
+
if( $this->what_am_i == 'theme' ) {
|
586 |
+
// Look for the theme mod
|
587 |
+
$mod = get_theme_mod( 'wisdom-allow-tracking', 0 );
|
588 |
+
if( false === $mod ) {
|
589 |
+
// If the theme mod is not set, then return true - the user has opted out
|
590 |
+
return true;
|
591 |
+
}
|
592 |
+
} else {
|
593 |
+
// Iterate through the options that are being tracked looking for wisdom_opt_out setting
|
594 |
+
if( ! empty( $this->options ) ) {
|
595 |
+
foreach( $this->options as $option_name ) {
|
596 |
+
// Check each option
|
597 |
+
$options = get_option( $option_name );
|
598 |
+
// If we find the setting, return true
|
599 |
+
if( ! empty( $options['wisdom_opt_out'] ) ) {
|
600 |
+
return true;
|
601 |
+
}
|
602 |
+
}
|
603 |
+
}
|
604 |
+
}
|
605 |
+
return false;
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Check if it's time to track
|
610 |
+
* @since 1.1.1
|
611 |
+
*/
|
612 |
+
public function get_is_time_to_track() {
|
613 |
+
// Let's see if we're due to track this plugin yet
|
614 |
+
$track_times = get_option( 'wisdom_last_track_time', array() );
|
615 |
+
if( ! isset( $track_times[$this->plugin_name] ) ) {
|
616 |
+
// If we haven't set a time for this plugin yet, then we must track it
|
617 |
+
return true;
|
618 |
+
} else {
|
619 |
+
// If the time is set, let's get our schedule and check if it's time to track
|
620 |
+
$schedule = $this->get_schedule();
|
621 |
+
if( $schedule == 'daily' ) {
|
622 |
+
$period = 'day';
|
623 |
+
} else if( $schedule == 'weekly' ) {
|
624 |
+
$period = 'week';
|
625 |
+
} else {
|
626 |
+
$period = 'month';
|
627 |
+
}
|
628 |
+
if( $track_times[$this->plugin_name] < strtotime( '-1 ' . $period ) ) {
|
629 |
+
return true;
|
630 |
+
}
|
631 |
+
}
|
632 |
+
return false;
|
633 |
+
}
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Record the time we send tracking data
|
637 |
+
* @since 1.1.1
|
638 |
+
*/
|
639 |
+
public function set_track_time() {
|
640 |
+
// We've tracked, so record the time
|
641 |
+
$track_times = get_option( 'wisdom_last_track_time', array() );
|
642 |
+
// Set different times according to plugin, in case we are tracking multiple plugins
|
643 |
+
$track_times[$this->plugin_name] = time();
|
644 |
+
update_option( 'wisdom_last_track_time', $track_times );
|
645 |
+
}
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Set the time when we can display the opt-in notification
|
649 |
+
* Will display now unless filtered
|
650 |
+
* @since 1.2.4
|
651 |
+
*/
|
652 |
+
public function set_notification_time() {
|
653 |
+
$notification_times = get_option( 'wisdom_notification_times', array() );
|
654 |
+
// Set different times according to plugin, in case we are tracking multiple plugins
|
655 |
+
if( ! isset( $notification_times[$this->plugin_name] ) ) {
|
656 |
+
$delay_notification = apply_filters( 'wisdom_delay_notification_' . $this->plugin_name, 0 );
|
657 |
+
// We can delay the notification time
|
658 |
+
$notification_time = time() + absint( $delay_notification );
|
659 |
+
$notification_times[$this->plugin_name] = $notification_time;
|
660 |
+
update_option( 'wisdom_notification_times', $notification_times );
|
661 |
+
}
|
662 |
+
}
|
663 |
+
|
664 |
+
/**
|
665 |
+
* Get whether it's time to display the notification
|
666 |
+
* @since 1.2.4
|
667 |
+
* @return Boolean
|
668 |
+
*/
|
669 |
+
public function get_is_notification_time() {
|
670 |
+
$notification_times = get_option( 'wisdom_notification_times', array() );
|
671 |
+
$time = time();
|
672 |
+
// Set different times according to plugin, in case we are tracking multiple plugins
|
673 |
+
if( isset( $notification_times[$this->plugin_name] ) ) {
|
674 |
+
$notification_time = $notification_times[$this->plugin_name];
|
675 |
+
if( $time >= $notification_time ) {
|
676 |
+
return true;
|
677 |
+
}
|
678 |
+
}
|
679 |
+
return false;
|
680 |
+
}
|
681 |
+
|
682 |
+
/**
|
683 |
+
* Set if we should block the opt-in notice for this plugin
|
684 |
+
* Option is an array of all plugins that have received a response from the user
|
685 |
+
* @since 1.0.0
|
686 |
+
*/
|
687 |
+
public function update_block_notice( $plugin=null ) {
|
688 |
+
if( empty( $plugin ) ) {
|
689 |
+
$plugin = $this->plugin_name;
|
690 |
+
}
|
691 |
+
$block_notice = get_option( 'wisdom_block_notice' );
|
692 |
+
if( empty( $block_notice ) || ! is_array( $block_notice ) ) {
|
693 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
694 |
+
$block_notice = array( $plugin => $plugin );
|
695 |
+
} else {
|
696 |
+
// Else add the plugin name to the array
|
697 |
+
$block_notice[$plugin] = $plugin;
|
698 |
+
}
|
699 |
+
update_option( 'wisdom_block_notice', $block_notice );
|
700 |
+
}
|
701 |
+
|
702 |
+
/**
|
703 |
+
* Can we collect the email address?
|
704 |
+
* @since 1.0.0
|
705 |
+
*/
|
706 |
+
public function get_can_collect_email() {
|
707 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
708 |
+
$collect_email = get_option( 'wisdom_collect_email' );
|
709 |
+
// If this plugin is in the array, then we can collect the email address
|
710 |
+
if( isset( $collect_email[$this->plugin_name] ) ) {
|
711 |
+
return true;
|
712 |
+
}
|
713 |
+
return false;
|
714 |
+
}
|
715 |
+
|
716 |
+
/**
|
717 |
+
* Set if user has allowed us to collect their email address
|
718 |
+
* Option is an array of all plugins with email collection permitted
|
719 |
+
* More than one plugin may be using the tracker
|
720 |
+
* @since 1.0.0
|
721 |
+
* @param $can_collect Boolean true if collection is allowed, false if not
|
722 |
+
*/
|
723 |
+
public function set_can_collect_email( $can_collect, $plugin=null ) {
|
724 |
+
if( empty( $plugin ) ) {
|
725 |
+
$plugin = $this->plugin_name;
|
726 |
+
}
|
727 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
728 |
+
$collect_email = get_option( 'wisdom_collect_email' );
|
729 |
+
// If the user has agreed to allow tracking or if opt-in is not required
|
730 |
+
if( $can_collect ) {
|
731 |
+
if( empty( $collect_email ) || ! is_array( $collect_email ) ) {
|
732 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
733 |
+
$collect_email = array( $plugin => $plugin );
|
734 |
+
} else {
|
735 |
+
// Else add the plugin name to the array
|
736 |
+
$collect_email[$plugin] = $plugin;
|
737 |
+
}
|
738 |
+
} else {
|
739 |
+
if( isset( $collect_email[$plugin] ) ) {
|
740 |
+
unset( $collect_email[$plugin] );
|
741 |
+
}
|
742 |
+
}
|
743 |
+
update_option( 'wisdom_collect_email', $collect_email );
|
744 |
+
}
|
745 |
+
|
746 |
+
/**
|
747 |
+
* Get the correct email address to use
|
748 |
+
* @since 1.1.2
|
749 |
+
* @return Email address
|
750 |
+
*/
|
751 |
+
public function get_admin_email() {
|
752 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
753 |
+
$email = get_option( 'wisdom_admin_emails' );
|
754 |
+
// If this plugin is in the array, then we can collect the email address
|
755 |
+
if( isset( $email[$this->plugin_name] ) ) {
|
756 |
+
return $email[$this->plugin_name];
|
757 |
+
}
|
758 |
+
return false;
|
759 |
+
}
|
760 |
+
|
761 |
+
/**
|
762 |
+
* Set the correct email address to use
|
763 |
+
* There might be more than one admin on the site
|
764 |
+
* So we only use the first admin's email address
|
765 |
+
* @param $email Email address to set
|
766 |
+
* @param $plugin Plugin name to set email address for
|
767 |
+
* @since 1.1.2
|
768 |
+
*/
|
769 |
+
public function set_admin_email( $email=null, $plugin=null ) {
|
770 |
+
if( empty( $plugin ) ) {
|
771 |
+
$plugin = $this->plugin_name;
|
772 |
+
}
|
773 |
+
// If no email address passed, try to get the current user's email
|
774 |
+
if( empty( $email ) ) {
|
775 |
+
// Have to check that current user object is available
|
776 |
+
if( function_exists( 'wp_get_current_user' ) ) {
|
777 |
+
$current_user = wp_get_current_user();
|
778 |
+
$email = $current_user->user_email;
|
779 |
+
}
|
780 |
+
}
|
781 |
+
// The wisdom_admin_emails option is an array of admin email addresses
|
782 |
+
$admin_emails = get_option( 'wisdom_admin_emails' );
|
783 |
+
if( empty( $admin_emails ) || ! is_array( $admin_emails ) ) {
|
784 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
785 |
+
$admin_emails = array( $plugin => sanitize_email( $email ) );
|
786 |
+
} else if( empty( $admin_emails[$plugin] ) ) {
|
787 |
+
// Else add the email address to the array, if not already set
|
788 |
+
$admin_emails[$plugin] = sanitize_email( $email );
|
789 |
+
}
|
790 |
+
update_option( 'wisdom_admin_emails', $admin_emails );
|
791 |
+
}
|
792 |
+
|
793 |
+
/**
|
794 |
+
* Display the admin notice to users to allow them to opt in
|
795 |
+
*
|
796 |
+
* @since 1.0.0
|
797 |
+
*/
|
798 |
+
public function optin_notice() {
|
799 |
+
// Check for plugin args
|
800 |
+
if( isset( $_GET['plugin'] ) && isset( $_GET['plugin_action'] ) ) {
|
801 |
+
$plugin = sanitize_text_field( $_GET['plugin'] );
|
802 |
+
$action = sanitize_text_field( $_GET['plugin_action'] );
|
803 |
+
if( $action == 'yes' ) {
|
804 |
+
$this->set_is_tracking_allowed( true, $plugin );
|
805 |
+
// Run this straightaway
|
806 |
+
add_action( 'admin_init', array( $this, 'force_tracking' ) );
|
807 |
+
} else {
|
808 |
+
$this->set_is_tracking_allowed( false, $plugin );
|
809 |
+
}
|
810 |
+
$this->update_block_notice( $plugin );
|
811 |
+
}
|
812 |
+
|
813 |
+
// Is it time to display the notification?
|
814 |
+
$is_time = $this->get_is_notification_time();
|
815 |
+
if( ! $is_time ) {
|
816 |
+
return false;
|
817 |
+
}
|
818 |
+
|
819 |
+
// Check whether to block the notice, e.g. because we're in a local environment
|
820 |
+
// wisdom_block_notice works the same as wisdom_allow_tracking, an array of plugin names
|
821 |
+
$block_notice = get_option( 'wisdom_block_notice' );
|
822 |
+
|
823 |
+
if( isset( $block_notice[$this->plugin_name] ) ) {
|
824 |
+
return;
|
825 |
+
}
|
826 |
+
|
827 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
828 |
+
return;
|
829 |
+
}
|
830 |
+
|
831 |
+
// @credit EDD
|
832 |
+
// Don't bother asking user to opt in if they're in local dev
|
833 |
+
$is_local = false;
|
834 |
+
if( stristr( network_site_url( '/' ), '.dev' ) !== false || stristr( network_site_url( '/' ), 'localhost' ) !== false || stristr( network_site_url( '/' ), ':8888' ) !== false ) {
|
835 |
+
$is_local = true;
|
836 |
+
}
|
837 |
+
$is_local = apply_filters( 'wisdom_is_local_' . $this->plugin_name, $is_local );
|
838 |
+
if ( $is_local ) {
|
839 |
+
$this->update_block_notice();
|
840 |
+
} else {
|
841 |
+
|
842 |
+
// Display the notice requesting permission to track
|
843 |
+
// Retrieve current plugin information
|
844 |
+
$plugin = $this->plugin_data();
|
845 |
+
$plugin_name = $plugin['Name'];
|
846 |
+
|
847 |
+
// Args to add to query if user opts in to tracking
|
848 |
+
$yes_args = array(
|
849 |
+
'plugin' => $this->plugin_name,
|
850 |
+
'plugin_action' => 'yes'
|
851 |
+
);
|
852 |
+
|
853 |
+
// Decide how to request permission to collect email addresses
|
854 |
+
if( $this->marketing == 1 ) {
|
855 |
+
// Option 1 combines permissions to track and collect email
|
856 |
+
$yes_args['marketing_optin'] = 'yes';
|
857 |
+
} else if( $this->marketing == 2 ) {
|
858 |
+
// Option 2 enables a second notice that fires after the user opts in to tracking
|
859 |
+
$yes_args['marketing'] = 'yes';
|
860 |
+
}
|
861 |
+
$url_yes = add_query_arg( $yes_args );
|
862 |
+
$url_no = add_query_arg( array(
|
863 |
+
'plugin' => $this->plugin_name,
|
864 |
+
'plugin_action' => 'no'
|
865 |
+
) );
|
866 |
+
|
867 |
+
// Decide on notice text
|
868 |
+
if( $this->marketing != 1 ) {
|
869 |
+
// Standard notice text
|
870 |
+
$notice_text = sprintf(
|
871 |
+
__( 'Thank you for installing our %1$s. We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and %1$s settings, which we will use to help us make improvements to the %1$s. Tracking is completely optional.', 'singularity' ),
|
872 |
+
$this->what_am_i
|
873 |
+
);
|
874 |
+
} else {
|
875 |
+
// If we have option 1 for marketing, we include reference to sending product information here
|
876 |
+
$notice_text = sprintf(
|
877 |
+
__( 'Thank you for installing our %1$s. We\'d like your permission to track its usage on your site. We won\'t record any sensitive data, only information regarding the WordPress environment and %1$s settings, which we will use to help us make improvements to the %1$s. Tracking is completely optional.', 'singularity' ),
|
878 |
+
$this->what_am_i
|
879 |
+
);
|
880 |
+
}
|
881 |
+
// And we allow you to filter the text anyway
|
882 |
+
$notice_text = apply_filters( 'wisdom_notice_text_' . esc_attr( $this->plugin_name ), $notice_text ); ?>
|
883 |
+
|
884 |
+
<div class="notice notice-info updated put-dismiss-notice">
|
885 |
+
<p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
|
886 |
+
<p><?php echo esc_html( $notice_text ); ?></p>
|
887 |
+
<p>
|
888 |
+
<a href="<?php echo esc_url( $url_yes ); ?>" class="button-secondary"><?php _e( 'Allow', 'singularity' ); ?></a>
|
889 |
+
<a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php _e( 'Do Not Allow', 'singularity' ); ?></a>
|
890 |
+
</p>
|
891 |
+
</div>
|
892 |
+
<?php
|
893 |
+
}
|
894 |
+
|
895 |
+
}
|
896 |
+
|
897 |
+
/**
|
898 |
+
* Display the marketing notice to users if enabled
|
899 |
+
* Only displays after the user has opted in to tracking
|
900 |
+
*
|
901 |
+
* @since 1.0.0
|
902 |
+
*/
|
903 |
+
public function marketing_notice() {
|
904 |
+
// Check if user has opted in to marketing
|
905 |
+
if( isset( $_GET['marketing_optin'] ) ) {
|
906 |
+
// Set marketing optin
|
907 |
+
$this->set_can_collect_email( sanitize_text_field( $_GET['marketing_optin'] ), $this->plugin_name );
|
908 |
+
// Do tracking
|
909 |
+
$this->do_tracking( true );
|
910 |
+
} else if( isset( $_GET['marketing'] ) && $_GET['marketing']=='yes' ) {
|
911 |
+
// Display the notice requesting permission to collect email address
|
912 |
+
// Retrieve current plugin information
|
913 |
+
$plugin = $this->plugin_data();
|
914 |
+
$plugin_name = $plugin['Name'];
|
915 |
+
|
916 |
+
$url_yes = add_query_arg( array(
|
917 |
+
'plugin' => $this->plugin_name,
|
918 |
+
'marketing_optin' => 'yes'
|
919 |
+
) );
|
920 |
+
$url_no = add_query_arg( array(
|
921 |
+
'plugin' => $this->plugin_name,
|
922 |
+
'marketing_optin' => 'no'
|
923 |
+
) );
|
924 |
+
|
925 |
+
$marketing_text = sprintf(
|
926 |
+
__( 'Thank you for opting in to tracking. Would you like to receive occasional news about this %s, including details of new features and special offers?', 'singularity' ),
|
927 |
+
$this->what_am_i
|
928 |
+
);
|
929 |
+
$marketing_text = apply_filters( 'wisdom_marketing_text_' . esc_attr( $this->plugin_name ), $marketing_text ); ?>
|
930 |
+
|
931 |
+
<div class="notice notice-info updated put-dismiss-notice">
|
932 |
+
<p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
|
933 |
+
<p><?php echo esc_html( $marketing_text ); ?></p>
|
934 |
+
<p>
|
935 |
+
<a href="<?php echo esc_url( $url_yes ); ?>" data-putnotice="yes" class="button-secondary"><?php _e( 'Yes Please', 'singularity' ); ?></a>
|
936 |
+
<a href="<?php echo esc_url( $url_no ); ?>" data-putnotice="no" class="button-secondary"><?php _e( 'No Thank You', 'singularity' ); ?></a>
|
937 |
+
</p>
|
938 |
+
</div>
|
939 |
+
<?php }
|
940 |
+
}
|
941 |
+
|
942 |
+
/**
|
943 |
+
* Filter the deactivation link to allow us to present a form when the user deactivates the plugin
|
944 |
+
* @since 1.0.0
|
945 |
+
*/
|
946 |
+
public function filter_action_links( $links ) {
|
947 |
+
// Check to see if the user has opted in to tracking
|
948 |
+
if( ! $this->get_is_tracking_allowed() ) {
|
949 |
+
return $links;
|
950 |
+
}
|
951 |
+
if( isset( $links['deactivate'] ) && $this->include_goodbye_form ) {
|
952 |
+
$deactivation_link = $links['deactivate'];
|
953 |
+
// Insert an onClick action to allow form before deactivating
|
954 |
+
$deactivation_link = str_replace( '<a ', '<div class="put-goodbye-form-wrapper"><span class="put-goodbye-form" id="put-goodbye-form-' . esc_attr( $this->plugin_name ) . '"></span></div><a onclick="javascript:event.preventDefault();" id="put-goodbye-link-' . esc_attr( $this->plugin_name ) . '" ', $deactivation_link );
|
955 |
+
$links['deactivate'] = $deactivation_link;
|
956 |
+
}
|
957 |
+
return $links;
|
958 |
+
}
|
959 |
+
|
960 |
+
/*
|
961 |
+
* Form text strings
|
962 |
+
* These are non-filterable and used as fallback in case filtered strings aren't set correctly
|
963 |
+
* @since 1.0.0
|
964 |
+
*/
|
965 |
+
public function form_default_text() {
|
966 |
+
$form = array();
|
967 |
+
$form['heading'] = __( 'Sorry to see you go', 'singularity' );
|
968 |
+
$form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'singularity' );
|
969 |
+
$form['options'] = array(
|
970 |
+
__( 'Set up is too difficult', 'singularity' ),
|
971 |
+
__( 'Lack of documentation', 'singularity' ),
|
972 |
+
__( 'Not the features I wanted', 'singularity' ),
|
973 |
+
__( 'Found a better plugin', 'singularity' ),
|
974 |
+
__( 'Installed by mistake', 'singularity' ),
|
975 |
+
__( 'Only required temporarily', 'singularity' ),
|
976 |
+
__( 'Didn\'t work', 'singularity' )
|
977 |
+
);
|
978 |
+
$form['details'] = __( 'Details (optional)', 'singularity' );
|
979 |
+
return $form;
|
980 |
+
}
|
981 |
+
|
982 |
+
/**
|
983 |
+
* Form text strings
|
984 |
+
* These can be filtered
|
985 |
+
* The filter hook must be unique to the plugin
|
986 |
+
* @since 1.0.0
|
987 |
+
*/
|
988 |
+
public function form_filterable_text() {
|
989 |
+
$form = $this->form_default_text();
|
990 |
+
return apply_filters( 'wisdom_form_text_' . esc_attr( $this->plugin_name ), $form );
|
991 |
+
}
|
992 |
+
|
993 |
+
/**
|
994 |
+
* Form text strings
|
995 |
+
* These can be filtered
|
996 |
+
* @since 1.0.0
|
997 |
+
*/
|
998 |
+
public function goodbye_ajax() {
|
999 |
+
// Get our strings for the form
|
1000 |
+
$form = $this->form_filterable_text();
|
1001 |
+
if( ! isset( $form['heading'] ) || ! isset( $form['body'] ) || ! isset( $form['options'] ) || ! is_array( $form['options'] ) || ! isset( $form['details'] ) ) {
|
1002 |
+
// If the form hasn't been filtered correctly, we revert to the default form
|
1003 |
+
$form = $this->form_default_text();
|
1004 |
+
}
|
1005 |
+
// Build the HTML to go in the form
|
1006 |
+
$html = '<div class="put-goodbye-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
|
1007 |
+
$html .= '<div class="put-goodbye-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
|
1008 |
+
if( is_array( $form['options'] ) ) {
|
1009 |
+
$html .= '<div class="put-goodbye-options"><p>';
|
1010 |
+
foreach( $form['options'] as $option ) {
|
1011 |
+
$html .= '<input type="checkbox" name="put-goodbye-options[]" id="' . str_replace( " ", "", esc_attr( $option ) ) . '" value="' . esc_attr( $option ) . '"> <label for="' . str_replace( " ", "", esc_attr( $option ) ) . '">' . esc_attr( $option ) . '</label><br>';
|
1012 |
+
}
|
1013 |
+
$html .= '</p><label for="put-goodbye-reasons">' . esc_html( $form['details'] ) .'</label><textarea name="put-goodbye-reasons" id="put-goodbye-reasons" rows="2" style="width:100%"></textarea>';
|
1014 |
+
$html .= '</div><!-- .put-goodbye-options -->';
|
1015 |
+
}
|
1016 |
+
$html .= '</div><!-- .put-goodbye-form-body -->';
|
1017 |
+
$html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'singularity' ) . '</p>';
|
1018 |
+
?>
|
1019 |
+
<div class="put-goodbye-form-bg"></div>
|
1020 |
+
<style type="text/css">
|
1021 |
+
.put-form-active .put-goodbye-form-bg {
|
1022 |
+
background: rgba( 0, 0, 0, .5 );
|
1023 |
+
position: fixed;
|
1024 |
+
top: 0;
|
1025 |
+
left: 0;
|
1026 |
+
width: 100%;
|
1027 |
+
height: 100%;
|
1028 |
+
}
|
1029 |
+
.put-goodbye-form-wrapper {
|
1030 |
+
position: relative;
|
1031 |
+
z-index: 999;
|
1032 |
+
display: none;
|
1033 |
+
}
|
1034 |
+
.put-form-active .put-goodbye-form-wrapper {
|
1035 |
+
display: block;
|
1036 |
+
}
|
1037 |
+
.put-goodbye-form {
|
1038 |
+
display: none;
|
1039 |
+
}
|
1040 |
+
.put-form-active .put-goodbye-form {
|
1041 |
+
position: absolute;
|
1042 |
+
bottom: 30px;
|
1043 |
+
left: 0;
|
1044 |
+
max-width: 400px;
|
1045 |
+
background: #fff;
|
1046 |
+
white-space: normal;
|
1047 |
+
}
|
1048 |
+
.put-goodbye-form-head {
|
1049 |
+
background: #0073aa;
|
1050 |
+
color: #fff;
|
1051 |
+
padding: 8px 18px;
|
1052 |
+
}
|
1053 |
+
.put-goodbye-form-body {
|
1054 |
+
padding: 8px 18px;
|
1055 |
+
color: #444;
|
1056 |
+
}
|
1057 |
+
.deactivating-spinner {
|
1058 |
+
display: none;
|
1059 |
+
}
|
1060 |
+
.deactivating-spinner .spinner {
|
1061 |
+
float: none;
|
1062 |
+
margin: 4px 4px 0 18px;
|
1063 |
+
vertical-align: bottom;
|
1064 |
+
visibility: visible;
|
1065 |
+
}
|
1066 |
+
.put-goodbye-form-footer {
|
1067 |
+
padding: 8px 18px;
|
1068 |
+
}
|
1069 |
+
</style>
|
1070 |
+
<script>
|
1071 |
+
jQuery(document).ready(function($){
|
1072 |
+
$("#put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>").on("click",function(){
|
1073 |
+
// We'll send the user to this deactivation link when they've completed or dismissed the form
|
1074 |
+
var url = document.getElementById("put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>");
|
1075 |
+
$('body').toggleClass('put-form-active');
|
1076 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeIn();
|
1077 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").html( '<?php echo $html; ?>' + '<div class="put-goodbye-form-footer"><p><a id="put-submit-form" class="button primary" href="#"><?php _e( 'Submit and Deactivate', 'singularity' ); ?></a> <a class="secondary button" href="'+url+'"><?php _e( 'Just Deactivate', 'singularity' ); ?></a></p></div>');
|
1078 |
+
$('#put-submit-form').on('click', function(e){
|
1079 |
+
// As soon as we click, the body of the form should disappear
|
1080 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-body").fadeOut();
|
1081 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-footer").fadeOut();
|
1082 |
+
// Fade in spinner
|
1083 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .deactivating-spinner").fadeIn();
|
1084 |
+
e.preventDefault();
|
1085 |
+
var values = new Array();
|
1086 |
+
$.each($("input[name='put-goodbye-options[]']:checked"), function(){
|
1087 |
+
values.push($(this).val());
|
1088 |
+
});
|
1089 |
+
var details = $('#put-goodbye-reasons').val();
|
1090 |
+
var data = {
|
1091 |
+
'action': 'goodbye_form',
|
1092 |
+
'values': values,
|
1093 |
+
'details': details,
|
1094 |
+
'security': "<?php echo wp_create_nonce ( 'wisdom_goodbye_form' ); ?>",
|
1095 |
+
'dataType': "json"
|
1096 |
+
}
|
1097 |
+
$.post(
|
1098 |
+
ajaxurl,
|
1099 |
+
data,
|
1100 |
+
function(response){
|
1101 |
+
// Redirect to original deactivation URL
|
1102 |
+
window.location.href = url;
|
1103 |
+
}
|
1104 |
+
);
|
1105 |
+
});
|
1106 |
+
// If we click outside the form, the form will close
|
1107 |
+
$('.put-goodbye-form-bg').on('click',function(){
|
1108 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeOut();
|
1109 |
+
$('body').removeClass('put-form-active');
|
1110 |
+
});
|
1111 |
+
});
|
1112 |
+
});
|
1113 |
+
</script>
|
1114 |
+
<?php }
|
1115 |
+
|
1116 |
+
/**
|
1117 |
+
* AJAX callback when the form is submitted
|
1118 |
+
* @since 1.0.0
|
1119 |
+
*/
|
1120 |
+
public function goodbye_form_callback() {
|
1121 |
+
check_ajax_referer( 'wisdom_goodbye_form', 'security' );
|
1122 |
+
if( isset( $_POST['values'] ) ) {
|
1123 |
+
$values = json_encode( wp_unslash( $_POST['values'] ) );
|
1124 |
+
update_option( 'wisdom_deactivation_reason_' . $this->plugin_name, $values );
|
1125 |
+
}
|
1126 |
+
if( isset( $_POST['details'] ) ) {
|
1127 |
+
$details = sanitize_text_field( $_POST['details'] );
|
1128 |
+
update_option( 'wisdom_deactivation_details_' . $this->plugin_name, $details );
|
1129 |
+
}
|
1130 |
+
$this->do_tracking(); // Run this straightaway
|
1131 |
+
echo 'success';
|
1132 |
+
wp_die();
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
}
|
version-details.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
-
= 5.5.
|
2 |
-
|
3 |
-
*
|
4 |
-
*
|
5 |
-
*
|
|
1 |
+
= 5.5.8 25/05/2022 =
|
2 |
+
|
3 |
+
* NEW FEATURE - PRODUCTS - User Products - Send an email to the product owner when a product has been sold.
|
4 |
+
* NEW FEATURE - PAYMENT GATEWAYS - Gateways Fees and Discounts - Added a new feature to apply Payment Gateways Fees by User role.
|
5 |
+
* WooCommerce 6.5.1 tested
|
6 |
+
* WordPress 6.0 tested
|
woocommerce-jetpack.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: Booster for WooCommerce
|
4 |
Plugin URI: https://booster.io
|
5 |
Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
|
6 |
-
Version: 5.5.
|
7 |
Author: Pluggabl LLC
|
8 |
Author URI: https://booster.io
|
9 |
Text Domain: woocommerce-jetpack
|
10 |
Domain Path: /langs
|
11 |
Copyright: © 2020 Pluggabl LLC.
|
12 |
-
WC tested up to: 6.
|
13 |
License: GNU General Public License v3.0
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
*/
|
@@ -58,7 +58,7 @@ if (!class_exists('WC_Jetpack')) :
|
|
58 |
* @var string
|
59 |
* @since 2.4.7
|
60 |
*/
|
61 |
-
public $version = '5.5.
|
62 |
|
63 |
/**
|
64 |
* @var WC_Jetpack The single instance of the class
|
@@ -120,6 +120,34 @@ if (!function_exists('WCJ')) {
|
|
120 |
return WC_Jetpack::instance();
|
121 |
}
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
WCJ();
|
125 |
|
3 |
Plugin Name: Booster for WooCommerce
|
4 |
Plugin URI: https://booster.io
|
5 |
Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
|
6 |
+
Version: 5.5.8
|
7 |
Author: Pluggabl LLC
|
8 |
Author URI: https://booster.io
|
9 |
Text Domain: woocommerce-jetpack
|
10 |
Domain Path: /langs
|
11 |
Copyright: © 2020 Pluggabl LLC.
|
12 |
+
WC tested up to: 6.5.1
|
13 |
License: GNU General Public License v3.0
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
*/
|
58 |
* @var string
|
59 |
* @since 2.4.7
|
60 |
*/
|
61 |
+
public $version = '5.5.8';
|
62 |
|
63 |
/**
|
64 |
* @var WC_Jetpack The single instance of the class
|
120 |
return WC_Jetpack::instance();
|
121 |
}
|
122 |
}
|
123 |
+
/**
|
124 |
+
*
|
125 |
+
*
|
126 |
+
* @version 5.5.8
|
127 |
+
* @since 1.0.0
|
128 |
+
* @return Booster_Pro
|
129 |
+
*/
|
130 |
+
/**
|
131 |
+
* This function allows you to track usage of your plugin
|
132 |
+
* Place in your main plugin file
|
133 |
+
* Refer to https://wisdomplugin.com/support for help
|
134 |
+
*/
|
135 |
+
if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
136 |
+
require_once dirname( __FILE__ ) . '/tracking/class-plugin-usage-tracker.php';
|
137 |
+
}
|
138 |
+
if( ! function_exists( 'woocommerce_jetpack_start_plugin_tracking' ) ) {
|
139 |
+
function woocommerce_jetpack_start_plugin_tracking() {
|
140 |
+
$wisdom = new Plugin_Usage_Tracker(
|
141 |
+
__FILE__,
|
142 |
+
'https://boosterio.bigscoots-staging.com',
|
143 |
+
array(),
|
144 |
+
true,
|
145 |
+
true,
|
146 |
+
1
|
147 |
+
);
|
148 |
+
}
|
149 |
+
woocommerce_jetpack_start_plugin_tracking();
|
150 |
+
}
|
151 |
|
152 |
WCJ();
|
153 |
|